Store compilers with dependencies *and* scalacOptions. #425
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The main reason behind this change is that in Metals when a user adds or
removes a
$scalac
magic import, it has no affect unless they closeMetals and restart it. This leads to people assuming that the
$scalac
imports aren't working in Metals.
This is because when we do a looking into the ctx compilers we are only
taking into consideration the dependencies instead of the scalacOptions.
This slight changes just makes the key
(Dependencies, scalacOptions)
instead of
Dependencies
so that when a user changes the$scalac
import, it's taken into consideration when doing the lookup or providing
a new compiler.
Address the following comment in #397
Old Behavior (appears that it isn't working)
New Behavior