Skip to content

Commit 7aa2f67

Browse files
committed
docs: describe Scala version lines without patch pins
Motivation: The development docs should tell contributors which Scala lines the project tracks: the latest 2.12.x maintenance line for JVM, plus the latest 2.13.x and 3.3.x LTS lines. Embedding exact patch versions in docs still drifts when build.mill changes. Modification: Describe the configured Scala version lines in CLAUDE.md and readme.md, keep exact patch versions delegated to build.mill, and retain Mill wildcard cross targets for JVM compile, test, and assembly commands. Result: The docs communicate the intended Scala release lines while build.mill remains the single source of truth for exact versions and the documented commands continue to resolve against the current build matrix. References: - https://www.scala-lang.org/download/all.html - build.mill owns scalaVersions and jvmScalaVersions.
1 parent e686d89 commit 7aa2f67

2 files changed

Lines changed: 20 additions & 17 deletions

File tree

CLAUDE.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,26 @@
22

33
## Build & Test
44

5-
Uses [Mill](https://mill-build.org/) 1.1.2. Cross-built for Scala 3.3.7, 2.13.18, and 2.12.21 (JVM only).
5+
Uses the [Mill](https://mill-build.org/) version declared in `build.mill`. Cross-built against the latest patch releases on the configured Scala 2.12.x (JVM only), 2.13.x, and 3.3.x LTS lines; exact versions are declared by `scalaVersions` and `jvmScalaVersions` in `build.mill`.
66

77
```bash
8-
# Compile (JVM, Scala 3)
9-
./mill 'sjsonnet.jvm[3.3.7]'.compile
8+
# Compile all JVM Scala versions
9+
./mill 'sjsonnet.jvm[_]'.compile
1010

11-
# Run all JVM tests (Scala 3)
12-
./mill 'sjsonnet.jvm[3.3.7]'.test
11+
# Run all JVM tests
12+
./mill 'sjsonnet.jvm[_]'.test
1313

1414
# Run all tests across all platforms
1515
./mill __.test
1616

17-
# Build assembly JAR
18-
./mill 'sjsonnet.jvm[3.3.7]'.assembly
17+
# Build assembly JARs
18+
./mill 'sjsonnet.jvm[_]'.assembly
1919

2020
# GraalVM native image
2121
./mill sjsonnet.graal.nativeImage
2222
```
2323

24-
The assembly JAR is at `out/sjsonnet/jvm/3.3.7/assembly.dest/out.jar`. Run it with `java -Xss100m -jar out.jar`.
24+
Assembly JARs are written under `out/sjsonnet/jvm/<scala-version>/assembly.dest/out.jar`. Run one with `java -Xss100m -jar out.jar`.
2525

2626
## Formatting
2727

@@ -71,7 +71,7 @@ Every bug fix should include a regression test:
7171
2. Create `new_test_suite/<descriptive_name>.jsonnet.golden` with expected output.
7272
- Success tests: JSON output followed by a newline, using `std.assertEqual` chains ending in `true`.
7373
- Error tests (filename starts with `error.`): expected stderr including stack traces.
74-
3. Run `./mill 'sjsonnet.jvm[3.3.7]'.test` to verify.
74+
3. Run `./mill 'sjsonnet.jvm[_]'.test` to verify.
7575

7676
## Debug Stats
7777

readme.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -335,16 +335,19 @@ To generate the static files without starting a server:
335335
The output is a single `index.html` file (with the Sjsonnet JS engine inlined) written to `out/playground/bundle.dest/`. You can open it directly in a browser — no server needed — or serve it with any static file server. The editor UI (CodeMirror) is loaded from a CDN at runtime, so an internet connection is required.
336336
337337
## Development
338-
To compile the JVM version:
338+
339+
The configured build tracks the latest patch releases on the Scala 2.12.x (JVM only), 2.13.x, and 3.3.x LTS lines. Exact versions are declared in `build.mill`.
340+
341+
To compile the JVM versions:
339342
340343
```bash
341-
./mill 'sjsonnet.jvm[3.3.7]'.compile
344+
./mill 'sjsonnet.jvm[_]'.compile
342345
```
343346
344-
To run the tests:
347+
To run the JVM tests:
345348
346349
```bash
347-
./mill 'sjsonnet.jvm[3.3.7]'.test
350+
./mill 'sjsonnet.jvm[_]'.test
348351
```
349352
350353
If you want to test for all platforms and versions, you can run
@@ -357,16 +360,16 @@ If you want to test for all platforms and versions, you can run
357360
358361
Sjsonnet comes with a built in thin-client and background server, to help
359362
mitigate the unfortunate JVM warmup overhead that adds ~1s to every invocation
360-
down to 0.2-0.3s. For the simple non-client-server executable, you can use
363+
down to 0.2-0.3s. For the simple non-client-server executables, you can use
361364
362365
```bash
363-
./mill -i show sjsonnet[3.3.7].jvm.assembly
366+
./mill -i show 'sjsonnet.jvm[_].assembly'
364367
```
365368
366-
To create the executable. For the client-server executable, you can use
369+
For the client-server executables, you can use
367370
368371
```bash
369-
./mill -i show sjsonnet[3.3.7].server.assembly
372+
./mill -i show 'sjsonnet.jvm[_].server.assembly'
370373
```
371374
372375
By default, the Sjsonnet background server lives in `~/.sjsonnet`, and lasts 5

0 commit comments

Comments
 (0)