-
Notifications
You must be signed in to change notification settings - Fork 131
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
Scalafix command for scala-cli with basic options and tests #2968
Conversation
modules/cli/src/main/scala/scala/cli/commands/scalafix/Scalafix.scala
Outdated
Show resolved
Hide resolved
modules/cli/src/main/scala/scala/cli/commands/scalafix/Scalafix.scala
Outdated
Show resolved
Hide resolved
Hey, thanks for the contribution! |
modules/cli/src/main/scala/scala/cli/commands/scalafix/Scalafix.scala
Outdated
Show resolved
Hide resolved
modules/integration/src/test/scala/scala/cli/integration/ScalafixTests.scala
Outdated
Show resolved
Hide resolved
NOTE: After this is cleaned up and merged, we'll want to merge the |
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.
Thanks for starting this 🤩
I am not familiar with scala-cli at all, but as the maintainer of sbt-scalafix and scalafix, here is some feedback FWIW!
modules/cli/src/main/scala/scala/cli/commands/scalafix/ScalafixOptions.scala
Outdated
Show resolved
Hide resolved
modules/cli/src/main/scala/scala/cli/commands/scalafix/Scalafix.scala
Outdated
Show resolved
Hide resolved
modules/cli/src/main/scala/scala/cli/commands/scalafix/Scalafix.scala
Outdated
Show resolved
Hide resolved
modules/cli/src/main/scala/scala/cli/commands/scalafix/Scalafix.scala
Outdated
Show resolved
Hide resolved
modules/integration/src/test/scala/scala/cli/integration/ScalafixTests.scala
Outdated
Show resolved
Hide resolved
modules/cli/src/main/scala/scala/cli/commands/scalafix/Scalafix.scala
Outdated
Show resolved
Hide resolved
modules/cli/src/main/scala/scala/cli/commands/scalafix/Scalafix.scala
Outdated
Show resolved
Hide resolved
modules/cli/src/main/scala/scala/cli/commands/scalafix/ScalafixOptions.scala
Outdated
Show resolved
Hide resolved
modules/cli/src/main/scala/scala/cli/commands/scalafix/ScalafixOptions.scala
Outdated
Show resolved
Hide resolved
Thanks a lot for such an impactful feedback! These comments are really helpful and I'll surely take them into account. I really hope that I will resolve them in a few days and add some more features. Unfortunately, I had to take a little break, but now am fully committed to work more on this PR now |
modules/cli/src/main/scala/scala/cli/commands/scalafix/ScalafixOptions.scala
Outdated
Show resolved
Hide resolved
modules/cli/src/main/scala/scala/cli/commands/scalafix/ScalafixOptions.scala
Outdated
Show resolved
Hide resolved
modules/cli/src/main/scala/scala/cli/commands/scalafix/ScalafixOptions.scala
Outdated
Show resolved
Hide resolved
modules/cli/src/main/scala/scala/cli/commands/scalafix/ScalafixOptions.scala
Outdated
Show resolved
Hide resolved
Not sure why didn't the CI run, but a rebase from |
Great to see activity on this — I think this could be big for Scalafix, in terms of people being able to use it more easily. |
2848d16
to
9da5f2a
Compare
modules/integration/src/test/scala/scala/cli/integration/ScalafixTests.scala
Outdated
Show resolved
Hide resolved
Hi, sorry for taking such a long time to resolve all those threads and thanks a lot again for such feedback. The PR is ready for review. |
Thanks for the follow-ups @Vigorge 👍 I will take a look at the PR tomorrow. |
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.
Hey @Vigorge, thanks for all the follow-ups/additions. Having a semantic rule tested against all Scala versions is a great achievement!
I went through a thorough second review to avoid any surprise in the third/final round. From my very own perspective (again, I am not familiar with scala-cli), here are the outstanding comments to be addressed before this could be released
- workspace / current directory injection seems broken - I did not manage to use the CLI
- diagnostics/linters are ignored under
--check
- using scalafix-interfaces with native-image is impossible and raises a cryptic error - a more actionnable error message should be added until this is sorted out in a further PR
modules/cli/src/main/scala/scala/cli/commands/scalafix/Scalafix.scala
Outdated
Show resolved
Hide resolved
modules/cli/src/main/scala/scala/cli/commands/scalafix/Scalafix.scala
Outdated
Show resolved
Hide resolved
modules/integration/src/test/scala/scala/cli/integration/ScalafixTests213.scala
Outdated
Show resolved
Hide resolved
modules/cli/src/main/scala/scala/cli/commands/scalafix/ScalafixOptions.scala
Outdated
Show resolved
Hide resolved
modules/cli/src/main/scala/scala/cli/commands/scalafix/ScalafixOptions.scala
Outdated
Show resolved
Hide resolved
modules/cli/src/main/scala/scala/cli/commands/scalafix/Scalafix.scala
Outdated
Show resolved
Hide resolved
modules/cli/src/main/scala/scala/cli/commands/scalafix/Scalafix.scala
Outdated
Show resolved
Hide resolved
modules/cli/src/main/scala/scala/cli/commands/scalafix/Scalafix.scala
Outdated
Show resolved
Hide resolved
modules/cli/src/main/scala/scala/cli/commands/scalafix/Scalafix.scala
Outdated
Show resolved
Hide resolved
modules/cli/src/main/scala/scala/cli/commands/scalafix/Scalafix.scala
Outdated
Show resolved
Hide resolved
@Vigorge how's the progress on this? Can we unblock you somehow? |
HI, still am working on the native image solution and gonna add feature in few days. Thanks for support! I will comment here if some help will be needed. |
@Gedochao Hi, we did changes in MR to make scalafix work both in jvm and native builds. Could you approve CI run? |
a409057
to
52f6591
Compare
Update. I need one additionial iteration to go trough comments from @bjaglin |
9d908a2
to
d1a7ae9
Compare
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.
Wow, great effort @dos65 👏
I added some comments as potential follow-ups/simplifications, but based on a review (I can't test right now), that's looking more than enough for an initial release from a Scalafix perspective 👍
modules/integration/src/test/scala/scala/cli/integration/ScalafixTestDefinitions.scala
Outdated
Show resolved
Hide resolved
modules/integration/src/test/scala/scala/cli/integration/ScalafixTestDefinitions.scala
Outdated
Show resolved
Hide resolved
modules/integration/src/test/scala/scala/cli/integration/ScalafixTestDefinitions.scala
Outdated
Show resolved
Hide resolved
6bb8c5b
to
789f70a
Compare
@Gedochao could you approve ci run? |
ae7f0c9
to
78384d2
Compare
@Gedochao There are some failed native-macos tests. I hope they are flaky. Otherwise I have no idea what might be wrong with them |
Great, now CI is green. |
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.
LGTM
I'll merge this once Scala CLI 1.5.3 is out.
Sorry for nitpicking, but the title seems to have a typo: - Scalafix command for scala-cli with basic optionns and tests
+ Scalafix command for scala-cli with basic options and tests Really looking forward to this PR! |
...make that 1.5.4 😩 (#3273 (comment)) |
Resolves Issue #647