-
Notifications
You must be signed in to change notification settings - Fork 277
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
Can't use different version for native CLI #4571
Comments
Can confirm this happens on my machine when it's
|
@EnviousSwan why are you submitting this issue here, and not to the maintainer of judging by the error message, that setup-action downloaded a native binary rather than a JVM, and native does not allow the |
Looks like it's not actually native image but a bootstrapped jar, so should work. |
@alexarchambault is it possible that coursier downloads a native version, instead of jvm, if one is available, like for 3.8.4-RC2? judging by the error message ("Can't use different version for native CLI"), it comes from the NativePlatform build, and not the JVMPlatform version. I just downloaded two versions, both of them produce this "Can't use" error:
Yet I added a #4572 test, and both JVM and Native version seem to load the right interface. |
It's weird, I tried to run the locally released assembly version and that works fine, but launching the RC from coursier indeed reproduces the error. I have a suspicion about the |
On the other hand |
Could it be an issue that it's under scalafmt/scalafmt-interfaces/native/src/main/java/org/scalafmt/interfaces/Scalafmt.scala Line 142 in a29aa8a
|
Based on the published sources it looks like the wrong files were used in RC2. RC2 source jars contain the native scala files, which RC1 contains java files in interfaces. This should be reproducible locally when publishing interfaces |
Looks like both interfaces and interfacesNative publish the same jars, which is why this is random. |
Fixes scalameta#4571 crossVersion actually is set differently if you use `crossProject` so if you disable it you get no suffix in all platforms.
Fixes #4571 crossVersion actually is set differently if you use `crossProject` so if you disable it you get no suffix in all platforms.
What action can we take to unblock scala-steward-org/scala-steward#3481 ? |
use an older formatter version, i think. |
Arf I think our test is actually trying to upgrade to the latest. So we are blocked until a release with the fix is out. |
in that case, give us please a couple of days. |
I was able to cap the version upgrade. No rush guys. |
This issue is observable in the following configuration
.scalafmt.conf
Configuration (required)
Command-line parameters (required)
When I run scalafmt via CLI like this:
scalafmt --diff-branch origin/master
Steps
Given a GitHub workflow
Problem
When running
scalafmt
when a PR is raised viaI get the following error
Expectation
I expect
scalafmt
to format the code or just do nothingWorkaround
I've found that by setting scalafmt version in
.scalafmt.conf
to the latest3.4.2-RC2
the issue doesn't happen anymoreNotes
My assumption is that
coursier
pulls the latestscalafmt-cli
as it's configured to latest.releaseThis only started happening yesterday, probably after
3.8.4-RC2
release, because there were no problems when3.8.4-RC1
was the latest.The same issue happens when running scala-steward from GitHub Actions when it tries to reformat changes
The text was updated successfully, but these errors were encountered: