-
Notifications
You must be signed in to change notification settings - Fork 1.1k
WIP: delegate dotty compiler info to sbt #1528
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
MasseGuillaume
wants to merge
51
commits into
scala:master
from
MasseGuillaume:feature/sbt-compiler-reporter
Closed
WIP: delegate dotty compiler info to sbt #1528
MasseGuillaume
wants to merge
51
commits into
scala:master
from
MasseGuillaume:feature/sbt-compiler-reporter
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Also eliminates the need for comment processing to be part of the `DocASTPhase`, so this should be put into a DocMiniPhase
To do this, factor out Key from Attachment into a new type, Property.Key.
Not used yet, but we might use it as an alternative to typedArg invalidation later.
Test case in isApplicableSafe.scala. It turns out that this requires a context merge using the new `&' operator. Sequence of actions: 1) Typecheck argument in typerstate 1. 2) Cache argument. 3) Evolve same typer state (to typecheck other arguments, say) leading to a different constraint. 4) Take typechecked argument in same state. It turns out that the merge in TyperState is needed not just for isApplicableSafe but also for (e.g. erased-lubs.scala) as well as many parts of dotty itself.
…lement type. Test case is isApplicableSafe -Ycheck:first.
Need to export just uncommittedAncestor, can hide isCommitted and parent.
The issue fixed here was introduced by 71027f1. The added `csyms.isEmpty` condition on `case nil =>` is always true, which is clearely a bug. t1500c still fails with covariant (or contravariant) type parameters on `::`, but this seams to be a more complicated issue involving the typer.
This commit removes a problematic duplicated `checkBounds` call on `TypeApply`. To verify correctness of this change on has to check that `normalizeTree` used only once [1], and the function using `normalizeTree` already takes care of calling `checkBounds`. [1]: https://github.com/lampepfl/dotty/blob/0e8f05d88bfef95fac59f522fd9d06792126bd11/src/dotty/tools/dotc/transform/PostTyper.scala#L205
Two of these are unavoidable. I moved the tests to diabled/not-representable and added in each case a comment to the main scala file detailing why there is a deviation. The last one (import-rewrite) is fixed.
Scala2 does not conform to spec Section 2, where it says: Bindings of different kinds have a precedence defined on them: 1. Definitions and declarations that are local, inherited, or made available by a package clause and also defined in the same compilation unit as the reference, have highest precedence. 2. Explicit imports have next highest precedence. 3. Wildcard imports have next highest precedence. 4. Definitions made available by a package clause, but not also defined in the same compilation unit as the reference, have lowest precedence. In fact Scala 2, merges (1) and (4) into highest precedence. This commit simulates the Scala2 behavior under -language:Scala2, but gives a migration warning. For the naming-resolution test case we get: dotc *.scala -language:Scala2 -migration callsite.scala:9: migration warning: Name resolution will change. currently selected : naming.resolution.Files in the future, without -language:Scala2: java.nio.file.Files' where Files is a type in package object package which is an alias of java.util.stream.Stream[java.nio.file.Path] Files' is a class in package file def gimmeFiles: Files = Files.list(Paths.get(".")) ^ one warning found
Three goals: 1. Fix crasher in compileStdLib by saving and restoring foundUnderScala2 analogous to iportedFromRoot. 2. Make behavior the same as scalac under Scala2 mode - ListBuffer behaved differently before. 3. Make findRef faster by making it tail-recursive as long as nothing was found.
`apply` nodes should not be inserted in the result parts of a block, if-then-else, match, or try. Instead they should be added to the surrounding statement.
723dbf1
to
2ff7e40
Compare
smarter
reviewed
Sep 21, 2016
@@ -237,6 +239,25 @@ object DottyBuild extends Build { | |||
). | |||
settings(ScriptedPlugin.scriptedSettings: _*). | |||
settings( | |||
cleanBridge := { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a comment explaining that this is necessary until sbt/sbt#2402 is fixed
dotty-bridge/scripted compilerReporter/simple
check dependsOn compile failre otherwise sbt reloads the settings
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.