-
Notifications
You must be signed in to change notification settings - Fork 24
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
Add patches only to files having error in scala 3 #120
Conversation
Interesting idea! Also if there is some compiler errors you can compute the patches only in the erroneous files and not the other ones. |
I do like this idea. |
|
||
public class QuietReporter extends Reporter { | ||
public void doReport(Diagnostic d, Context ctx) {} | ||
HashSet<String> filesWithErrors = new HashSet<String>(); |
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.
Not used
project/project/metals.sbt
Outdated
// This file makes sure that the JDI tools are in the sbt classpath. | ||
// JDI tools are used by the debug adapter server. | ||
|
||
addSbtPlugin("org.scala-debugger" % "sbt-jdi-tools" % "1.1.1") |
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.
This file should be added to .gitignore
initialFileToMigrate <- buildMigrationFiles(filesWithErr) | ||
_ <- compileInScala3( | ||
initialFileToMigrate, | ||
filesWithoutErrors ++ javaFiles ++ managedSources, | ||
compiler | ||
) |
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.
This should fix the compilation errors in the filesWithErr
but there may be cases where the compiler then find errors in others files, in which case we can loop to add the patches of the new filesWithErr
until there is no more error.
Can be done in a V2 after we have found a case in which it happens.
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.
Good idea. I have to open an issue to get track of this.
To avoid computing unecessary patches
To avoid computing unecessary patches
Still need to improve logging for this commit.