Skip to content

Commit ae6f834

Browse files
respencer-nclclaude
andcommitted
Update CLAUDE.md and NOTEBOOK.md for Scala 3.7.4 and packaging
CLAUDE.md updated to reflect Scala 3.7.4 as the actual version in use (with explanation of the 3.3.x compiler bug). NOTEBOOK.md updated with current packaging infrastructure status and Scala version notes. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent ba185b9 commit ae6f834

2 files changed

Lines changed: 22 additions & 6 deletions

File tree

CLAUDE.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ RIDDL (Reactive Interface to Domain Definition Language) is a specification lang
2424
## Critical Build Information
2525

2626
### Scala Version & Syntax
27-
- **Scala 3.3.7 LTS** (not Scala 2!)
27+
- **Scala 3.7.4** (not Scala 2!) — overrides sbt-ossuminc's 3.3.7 LTS
28+
default due to a compiler infinite loop bug in 3.3.x with opaque
29+
types and intersection types (see `build.sbt` header comment)
2830
- **ALWAYS use Scala 3 syntax**:
2931
- `while i < end do ... end while` (NOT `while (i < end) { ... }`)
3032
- No `null` checks - use `Option(x)` instead
@@ -41,8 +43,9 @@ RIDDL (Reactive Interface to Domain Definition Language) is a specification lang
4143

4244
#### Common Configurations:
4345
```scala
44-
// Scala 3.3.7 LTS (recommended for projects)
46+
// Scala 3.7.4 (overridden from sbt-ossuminc's 3.3.7 LTS default)
4547
.configure(With.scala3) // Sets scalaVersion to 3.3.7 LTS
48+
// Then override: scalaVersion := "3.7.4"
4649

4750
// Scala.js configuration
4851
.jsConfigure(With.ScalaJS(
@@ -231,18 +234,19 @@ sbt-ossuminc updates its default), the following files **MUST** be updated:
231234
**sbt-ossuminc Version Policy**:
232235
- sbt-ossuminc always defaults to the latest Scala LTS version
233236
- When sbt-ossuminc is updated, check if its default Scala version changed
234-
- Current LTS: **3.3.7** (3.3.x series)
237+
- Current LTS: **3.3.7** (3.3.x series), but riddl uses **3.7.4**
238+
due to compiler bug (see build.sbt)
235239
- Next LTS expected: **3.9.x** (Q2 2026)
236240

237241
**Quick Search to Find All References**:
238242
```bash
239243
grep -r "scala-3\." .github/workflows/
240244
```
241245

242-
**Example Fix** (3.3.7 → 3.9.0):
246+
**Example Fix** (3.7.4 → 3.9.0):
243247
```bash
244248
# In each workflow file, replace all occurrences:
245-
sed -i 's/scala-3.3.7/scala-3.9.0/g' .github/workflows/*.yml
249+
sed -i 's/scala-3.7.4/scala-3.9.0/g' .github/workflows/*.yml
246250
```
247251

248252
## Testing Patterns
@@ -614,7 +618,7 @@ Then add to root aggregation: `.aggregate(..., mymodule, mymoduleJS, mymoduleNat
614618
10. **Share code via utils/shared/** - For code used by both JVM and JS variants
615619
11. **BAST code lives in language module** - `language/shared/.../bast/`, NOT standalone directory
616620
12. **BAST readNode() vs readTypeExpression()** - Disjoint tag sets; mixing causes byte misalignment
617-
13. **Use `With.scala3` for Scala version** - Sets Scala 3.3.7 LTS; don't hardcode `scalaVersion`
621+
13. **Scala version is 3.7.4** - Each module overrides `scalaVersion := "3.7.4"` (3.3.x has compiler bug with opaque types)
618622
14. **BAST location comparisons use offsets** - Compare offset/endOffset, not line/col
619623
15. **Scala version changes require workflow updates** - Update `scala-X.Y.Z` paths in workflows
620624
16. **All RIDDL documentation goes to ossum.tech** - Don't add docs to this repo's `doc/` directory

NOTEBOOK.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,21 @@ This is the central engineering notebook for the RIDDL project. It tracks curren
88

99
**Last Updated**: February 3, 2026
1010

11+
**Scala Version**: 3.7.4 (overrides sbt-ossuminc's 3.3.7 LTS default due to
12+
compiler infinite loop bug with opaque types/intersection types in 3.3.x).
13+
All workflow paths updated to `scala-3.7.4`.
14+
1115
**Release 1.2.2 Published**: Fixed Scala.js null newline bug that was causing error
1216
message truncation in synapify. All 715 tests pass. Published to GitHub Packages.
1317

18+
**Packaging Infrastructure**: Docker, npm, and TypeScript support added:
19+
- `Dockerfile` — Multi-stage build with custom JRE via jlink (~80-100MB image)
20+
- `docker-publish.yml` — CI workflow for Docker image publishing to ghcr.io
21+
- `npm-publish.yml` — CI workflow for npm package publishing
22+
- `riddlLib/js/types/index.d.ts` — TypeScript type definitions
23+
- `package.json.template` — Enhanced with TypeScript and ES module support
24+
- `pack-npm-modules.sh` — Updated with TypeScript definitions integration
25+
1426
**Homebrew Tap Created**: `ossuminc/homebrew-tap` provides `brew install riddlc`.
1527

1628
**Branch Cleanup Complete**: All stale feature/bugfix branches deleted. Only `main`

0 commit comments

Comments
 (0)