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

Cross-build for Scala Native #93

Merged
merged 2 commits into from
Sep 26, 2022
Merged

Cross-build for Scala Native #93

merged 2 commits into from
Sep 26, 2022

Conversation

kubukoz
Copy link
Contributor

@kubukoz kubukoz commented Sep 26, 2022

Closes #92.

@hejfelix
Copy link
Collaborator

hejfelix commented Sep 26, 2022

could you add the native build to the root project like so:

lazy val root =
  project
    .in(file("."))
    .aggregate(core.jvm, core.js, core.native, http4s.jvm, http4s.js, http4s.native, slf4j)
    .settings(
      publish / skip := true,
    )

@kubukoz
Copy link
Contributor Author

kubukoz commented Sep 26, 2022

Ah, yes, I was sure I did it. I think there's a way to get all axes without enumerating them, I'll update the PR later today.

@hejfelix
Copy link
Collaborator

Just note that slf4j only has one target whereas the rest have 3. I think for that to work we to change the commands to be something like "sbt +test +publish", right?

@hejfelix
Copy link
Collaborator

Ah. Nvm I'm thinking of scala versions. Maybe we just gotta leave out the suffix for the crossprojects?

@kubukoz
Copy link
Contributor Author

kubukoz commented Sep 26, 2022

Not sure what you mean - the platform-specific suffix gets added automatically.

Published artifacts look like this:

tree -L 2 ~/.ivy2/local/org.legogroup
/Users/kubukoz/.ivy2/local/org.legogroup
├── woof-core_3
│   └── 0.4.6+1-819eed6c+20220926-1934-SNAPSHOT
├── woof-core_native0.4_3
│   └── 0.4.6+1-819eed6c+20220926-1934-SNAPSHOT
├── woof-core_sjs1_3
│   └── 0.4.6+1-819eed6c+20220926-1934-SNAPSHOT
├── woof-http4s_3
│   └── 0.4.6+1-819eed6c+20220926-1934-SNAPSHOT
├── woof-http4s_native0.4_3
│   └── 0.4.6+1-819eed6c+20220926-1934-SNAPSHOT
├── woof-http4s_sjs1_3
│   └── 0.4.6+1-819eed6c+20220926-1934-SNAPSHOT
└── woof-slf4j_3
    └── 0.4.6+1-819eed6c+20220926-1934-SNAPSHOT

@kubukoz
Copy link
Contributor Author

kubukoz commented Sep 26, 2022

@hejfelix updated to include the aggregation - it's not super convenient syntax, but at least we don't have to list out all the individual platform-specific projects.

@hejfelix
Copy link
Collaborator

Looks good to me now, I'll merge and cut a new release soon. Thank you very much for working on this 👌

@hejfelix hejfelix merged commit 1eb7a27 into LEGO:main Sep 26, 2022
@kubukoz kubukoz deleted the scala-native branch September 26, 2022 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Consider publishing for scala-native
2 participants