-
Notifications
You must be signed in to change notification settings - Fork 278
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
refactor: Use Scala Native instead of native image #4738
base: main
Are you sure you want to change the base?
Conversation
1bf9105
to
006a710
Compare
006a710
to
edcfb8e
Compare
Looks like it's simpler than I thought. I also added windows and macos runners. |
I wonder if we should be so strict with the version incompatibility? Maybe we should allow version of the image higher than the version in the config? |
- uses: sbt/setup-sbt@v1 | ||
- run: bin/build-native-image.sh | ||
- run: sbt scala-native |
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.
should we create a script as well, bin/build-scala-native.sh
and hide all the overly specific logic pertaining to scala-2.13
or target location or current architecture (what you have under deploy.XXX)?
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.
I can do that for sure, but it's not a lot of logic really and I would have to also deal with windows scripts 😅
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.
let me continue this comment above, under deploy
.
where does this come into play? |
We have a check for scala native that if the version of the binary is different than the one in config it will throw an exception. |
- uses: sbt/setup-sbt@v1 | ||
- run: bin/build-native-image.sh | ||
- run: sbt scala-native |
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.
let me continue this comment above, under deploy
.
NATIVE_IMAGE_STATIC: musl | ||
env: ${{ matrix.env }} | ||
deploy: [ | ||
{ os : macOS-13, name: scalafmt-x86_64-apple-darwin, path: "scalafmt-cli/native/target/scala-2.13/scalafmt-cli"}, |
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.
i just thought that perhaps all these OS and architecture values can be easily deduced from the environment and don't have to be hardcoded...
also, should we just call sbt and ask for the location of the target directory, instead of hardcoding with scala-2.13
?
if that can be done, then i am ok without a script.
I wouldn't do that. we must use the version specified in the config file, that's the contract. how is "higher version" better than "lower version"? both can produce a slightly different formatting, even if higher likely won't fail on newer configuration parameters. |
Fixes #4729