-
Notifications
You must be signed in to change notification settings - Fork 71
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
Cross-compile for Native #700
Conversation
Via #560 (comment) it seems like there could be interest in such a thing!
|
This comment was marked as outdated.
This comment was marked as outdated.
Darn, the munit 1.0.0 API changed which is why we're getting compile errors. |
We seem to be suffering from scala-native/scala-native#2611
Maybe adding more explicit type annotations could help. But I had to work around the issue by not running Scala 3 Native build on Java >= 12 |
I just noticed this PR had been sitting, and I hit "approve" on the CI runs. |
Thanks Seth, looks green :) |
What are the publication implications of adding cross-compilation for native? The diff looks great (thank you for that!) but I wondered what else it changes for releases. |
@@ -37,14 +37,14 @@ val root = project.in(file(".")).settings( | |||
mimaFailOnNoPrevious := false, | |||
publish / skip := true, | |||
) | |||
aggregateProjects(core, sbtplugin, functionalTests) | |||
aggregateProjects(core.jvm, core.native, sbtplugin, functionalTests) |
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.
@dwijnand this is the new native sub-project. It's essentially the same if you added a new (JVM) module. So release should work the same.
Does that answer your question?
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.
So it's a just another jar submitted to Sonatype? And there are no local system requirements? Compilers, libraries, binaries on PATH, etc? No platform, i.e. Mac/Linux/Windows, implications? I'm not thinking about corner cases and bugs, just regular "what adding Scala Native means to library releases" questions.
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.
Ah, yup, it's just another Jar :) it's filled with "NIR" (native intermediate representation) files that downstream projects can use to build native binaries. But there's nothing platform-specific we need to do here—we're not shipping a binary.
#721 makes the necessary tweaks to the release steps |
Opening PR for fun, after a discussion with @keynmol in the #tooling channel on Discord.
However, this basically required no changes and at least the core tests are passing. Maybe some interesting tooling could be built on this.