lampepfl / gears

A strawman for a low-level async library in Scala 3.
https://lampepfl.github.io/gears/
Apache License 2.0
257 stars 26 forks source link

Publish scala-native snapshot to maven center #34

Closed He-Pin closed 6 months ago

He-Pin commented 11 months ago

image I got errors when resolving the dependencies.

[error]   not found: https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.scala-native/sbt-scala-native/scala_2.12/sbt_1.0/0.5.0-SNAPSHOT/ivys/ivy.xml
[error]   not found: https://repo.typesafe.com/typesafe/ivy-releases/org.scala-native/sbt-scala-native/scala_2.12/sbt_1.0/0.5.0-SNAPSHOT/ivys/ivy.xml
[warn] Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? (default: r)
natsukagami commented 11 months ago

Yes, unfortunately scala native 0.5 is not yet out, so the current way to set it up for gears is to locally publish it. I wrote some guides in CONTRIBUTING.md; but the tl;dr is if you're on Unix a git submodule update followed by dependencies/publish-deps.sh should prepare all the dependencies for you.

armanbilge commented 11 months ago

Scala Native 0.5.0 snapshots are available if you configure the snapshot resolver.

https://oss.sonatype.org/content/repositories/snapshots/org/scala-native/nativelib_native0.5.0-SNAPSHOT_3/

He-Pin commented 10 months ago
[error] (rootNative / update) sbt.librarymanagement.ResolveException: Error downloading org.scalameta:munit_native0.5.0-SNAPSHOT_3:1.0.0-M10+16-4e2ab919-SNAPSHOT
[error]   Not found
[error]   Not found
[error]   not found: C:\Users\hepin\.ivy2\local\org.scalameta\munit_native0.5.0-SNAPSHOT_3\1.0.0-M10+16-4e2ab919-SNAPSHOT\ivys\ivy.xml
[error]   not found: https://repo1.maven.org/maven2/org/scalameta/munit_native0.5.0-SNAPSHOT_3/1.0.0-M10+16-4e2ab919-SNAPSHOT/munit_native0.5.0-SNAPSHOT_3-1.0.0-M10+16-4e2ab919-SNAPSHOT.pom
[error]   not found: https://oss.sonatype.org/content/repositories/snapshots/org/scalameta/munit_native0.5.0-SNAPSHOT_3/1.0.0-M10+16-4e2ab919-SNAPSHOT/munit_native0.5.0-SNAPSHOT_3-1.0.0-M10+16-4e2ab919-SNAPSHOT.pom
[error] Total time: 20 s, completed 2024年1月24日 22:23:48

@armanbilge Munit is not published.

ThisBuild / resolvers += "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots/"

natsukagami commented 9 months ago

I plan to release 0.2 alongside SN 0.5.0 when the latter is available.

barriem commented 7 months ago

building the dependencies locally worked for me, thanks! One issue I had was with the nix flake when running nix develop - I'm not sure why, but the SBT override wasn't being picked up.

Explicitly setting the JDK as a dependency for the dev shell solved this for me - e.g:

 devShells.default = pkgs.mkShell {
          buildInputs = with pkgs; [
            jdk21
            # Scala deps
            (sbt.override { jre = jdk21; })
            ....
            etc
natsukagami commented 6 months ago

It's published ;)