Skip to content

Commit

Permalink
Push scala-native version to published v0.5.0-RC1 (#47)
Browse files Browse the repository at this point in the history
* Push scala-native dependency to 0.5-RC1

* Remove scala-native from vendored dependencies

* Update instructions

* Remove scala-native builds from JVM CI

* Set stress test memory limit to 128M
  • Loading branch information
natsukagami authored Mar 1, 2024
1 parent eb17247 commit d7053b4
Show file tree
Hide file tree
Showing 9 changed files with 7 additions and 41 deletions.
22 changes: 1 addition & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,6 @@ jobs:
with:
distribution: temurin
java-version: 21
- name: Get submodule status hash
id: get-submodules
run: echo "submodules=$(git submodule status | sha256sum | awk '{print $1}')" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
with:
path: |
./dependencies/**/target
key: ${{ runner.os }}-${{ steps.get-submodules.outputs.submodules }}-scala-native-only
- name: Build dependencies
run: ./dependencies/publish-deps.sh --scala-native-only
- name: Test Formatting
run: sbt scalafmtCheckAll
test-jvm:
Expand All @@ -45,16 +35,6 @@ jobs:
with:
distribution: temurin
java-version: 21
- name: Get submodule status hash
id: get-submodules
run: echo "submodules=$(git submodule status | sha256sum | awk '{print $1}')" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
with:
path: |
./dependencies/**/target
key: ${{ runner.os }}-${{ steps.get-submodules.outputs.submodules }}-scala-native-only
- name: Build dependencies
run: ./dependencies/publish-deps.sh --scala-native-only
- name: Test
run: sbt rootJVM/test
test-native:
Expand Down Expand Up @@ -86,4 +66,4 @@ jobs:
- name: Test
run: sbt rootNative/test
- name: Stress Test with Lower Memory
run: env GC_MAXIMUM_HEAP_SIZE=512M sbt 'rootNative/testOnly StressTest'
run: env GC_MAXIMUM_HEAP_SIZE=128M sbt 'rootNative/testOnly StressTest'
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[submodule "dependencies/scala-native"]
path = dependencies/scala-native
url = https://github.com/scala-native/scala-native.git
[submodule "dependencies/munit"]
path = dependencies/munit
url = https://github.com/natsukagami/munit.git
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

`gears` currently require:
- **On the JVM**: JVM with support for virtual threads. This usually means JVM 21+, or 19+ with `--enable-preview`.
- **On Scala Native**: Scala Native with delimited continuations support. See the pinned versions in [`dependencies`](./dependencies/README.md).
- **On Scala Native**: Scala Native with delimited continuations support. Right now we are using `0.5-RC1`.

All of the needed dependencies can be loaded by the included Nix Flake. If you have `nix` with `flake` enabled, run
```
Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ lazy val root =
nativeConfig ~= { c =>
c.withMultithreadingSupport(true)
},
libraryDependencies += "org.scalameta" %%% "munit" % "1.0.0-M10+16-4e2ab919-SNAPSHOT" % Test
libraryDependencies += "org.scalameta" %%% "munit" % "1.0.0-M10+17-0ca7e7e9-SNAPSHOT" % Test
)
)
7 changes: 1 addition & 6 deletions dependencies/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,7 @@ nix develop .#dependencies -c dependencies/publish-deps.sh

### What are included?

- The current snapshot version of Scala Native, pinned in `scala-native`: for the delimited continuation support.
This needs to be published for both `3.3.1` (for `gears`) and `3.1.2` (for `munit`):
```bash
sbt "publish-local-dev 3; ++3.1.2 publishLocal"
```
- A fork of `munit` that uses the above snapshot, with a simple fix (https://github.com/scalameta/munit/pull/714) to make it compile.
- A fork of `munit` that uses `scala-native` 0.5-RC1.
Pinned in `munit`.
```bash
sbt "munitNative/publishLocal"
Expand Down
2 changes: 1 addition & 1 deletion dependencies/munit
Submodule munit updated 1 files
+1 −1 project/plugins.sbt
7 changes: 1 addition & 6 deletions dependencies/publish-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,5 @@ set -e

cd "$(dirname "${BASH_SOURCE[0]}")" # change to this directory

cd scala-native && sbt 'publish-local-dev 2.12' && cd ..

if test "$1" != "--scala-native-only"; then
cd scala-native && sbt '++3.3.1 publishLocal; ++3.1.2 publishLocal' && cd ..
cd munit && sbt "++3.1.2 munitNative/publishLocal" && cd ..
fi
cd munit && sbt "++3.1.2 munitNative/publishLocal" && cd ..

1 change: 0 additions & 1 deletion dependencies/scala-native
Submodule scala-native deleted from 174fcb
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.2.0")
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.5.0-SNAPSHOT")
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.5.0-RC1")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6")

0 comments on commit d7053b4

Please sign in to comment.