Skip to content
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

Merged
merged 16 commits into from
Nov 21, 2024

Conversation

Vigorge
Copy link
Contributor

@Vigorge Vigorge commented Jun 17, 2024

Resolves Issue #647

@Vigorge Vigorge marked this pull request as draft June 17, 2024 10:12
@Gedochao
Copy link
Contributor

Hey, thanks for the contribution!
I'll make sure to review this as soon as I am available, but given the volume of code included, I might need a couple days to get to it.

@Gedochao
Copy link
Contributor

Gedochao commented Jun 25, 2024

NOTE: After this is cleaned up and merged, we'll want to merge the scalafix sub-command with the fix sub-command (there's no point to keep them separate).
Individual fix features would probably be enabled/disabled by flags.
We'll do that as a follow-up, no need to worry about it in this PR.

Copy link

@bjaglin bjaglin left a 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!

@tgodzik
Copy link
Member

tgodzik commented Jun 26, 2024

Thanks @bjaglin!

@Vigorge if you are at any point overwhelmed by amount of comments, we are here to help. You already did a lot of great work 😍

@Vigorge
Copy link
Contributor Author

Vigorge commented Jul 4, 2024

Thanks @bjaglin!

@Vigorge if you are at any point overwhelmed by amount of comments, we are here to help. You already did a lot of great work 😍

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

@Gedochao
Copy link
Contributor

Gedochao commented Aug 8, 2024

Not sure why didn't the CI run, but a rebase from main seems to be necessary, anyway.

@SethTisue
Copy link
Contributor

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.

@Vigorge Vigorge marked this pull request as ready for review August 12, 2024 12:27
@Vigorge
Copy link
Contributor Author

Vigorge commented Aug 12, 2024

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.

@bjaglin
Copy link

bjaglin commented Aug 12, 2024

Thanks for the follow-ups @Vigorge 👍 I will take a look at the PR tomorrow.

Copy link

@bjaglin bjaglin left a 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

@Gedochao
Copy link
Contributor

@Vigorge how's the progress on this? Can we unblock you somehow?

@Vigorge
Copy link
Contributor Author

Vigorge commented Sep 17, 2024

@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.

@dos65
Copy link
Contributor

dos65 commented Oct 16, 2024

@Gedochao Hi, we did changes in MR to make scalafix work both in jvm and native builds. Could you approve CI run?

@dos65
Copy link
Contributor

dos65 commented Oct 18, 2024

Update. I need one additionial iteration to go trough comments from @bjaglin
(add a bit more docs and tests) but in general I hope the PR is close to completion.

Copy link

@bjaglin bjaglin left a 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 👍

@dos65
Copy link
Contributor

dos65 commented Nov 6, 2024

@Gedochao could you approve ci run?

@dos65
Copy link
Contributor

dos65 commented Nov 7, 2024

@Gedochao There are some failed native-macos tests. I hope they are flaky. Otherwise I have no idea what might be wrong with them

@dos65
Copy link
Contributor

dos65 commented Nov 8, 2024

Great, now CI is green.

@tgodzik
Copy link
Member

tgodzik commented Nov 8, 2024

Great work @dos65 ! @Gedochao is out seek, so we can wait for him to take a look next week.

Copy link
Contributor

@Gedochao Gedochao left a 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.

@Gedochao Gedochao added the needs-minor-release This change should require a minor version bump. label Nov 13, 2024
@scarf005
Copy link

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!

@Gedochao Gedochao changed the title Scalafix command for scala-cli with basic optionns and tests Scalafix command for scala-cli with basic options and tests Nov 13, 2024
@Gedochao
Copy link
Contributor

I'll merge this once Scala CLI 1.5.3 is out.

...make that 1.5.4 😩 (#3273 (comment))

@Gedochao Gedochao merged commit eec8bde into VirtusLab:main Nov 21, 2024
78 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-minor-release This change should require a minor version bump.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

scalafix command to run library migration & hygiene rules
7 participants