You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CLAUDE.md
+27Lines changed: 27 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,29 @@ redirects to ossum.tech. Do not add new documentation here.
21
21
22
22
RIDDL (Reactive Interface to Domain Definition Language) is a specification language for designing distributed, reactive, cloud-native systems using DDD principles. It's a **monorepo** containing multiple cross-platform Scala modules.
23
23
24
+
## Backward Compatibility Policy
25
+
26
+
RIDDL is a heavily used library both by Ossum Inc. and external
27
+
consumers. **Never make incompatible changes** to public APIs without
28
+
following this process:
29
+
30
+
1.**No removal of public API** — Do not remove public methods, classes,
31
+
traits, or extension methods. If functionality must be retired, add
32
+
`@deprecated` annotations with a migration message and the target
33
+
major version for removal (e.g., `@deprecated("Use flatten() instead",
34
+
"2.0.0")`).
35
+
2.**No breaking signature changes** — Do not change parameter types,
36
+
return types, or add required parameters to existing public methods.
37
+
New parameters must have defaults.
38
+
3.**Deprecation warnings until next major release** — Deprecated APIs
39
+
must remain functional through the current major version (1.x). They
40
+
may only be removed in the next major release (2.0.0).
41
+
4.**Additive changes only** — New methods, extension methods, classes,
42
+
and traits are always safe. Prefer adding new APIs alongside old ones
43
+
rather than modifying existing ones.
44
+
45
+
When in doubt, **add, don't change**.
46
+
24
47
## Critical Build Information
25
48
26
49
### Scala Version & Syntax
@@ -658,3 +681,7 @@ Then add to root aggregation: `.aggregate(..., mymodule, mymoduleJS, mymoduleNat
658
681
25.**gh auth needs write:packages for npm** - Run `gh auth refresh -s write:packages` if publishing to GH Packages npm registry
659
682
26.**OutlinePass and TreePass** - Lightweight HierarchyPass subclasses in `passes/shared/.../passes/`. OutlinePass produces flat `Seq[OutlineEntry]`; TreePass produces recursive `Seq[TreeNode]`. Exposed via `RiddlAPI.getOutline()` and `RiddlAPI.getTree()` with TypeScript declarations
660
683
27.**riddlLibJS test runner crashes are benign** - `RPCCore$ClosedException` in `riddlLibJS/Test` is a Scala.js test adapter teardown issue, not a code failure. The module has no test classes; all actual tests pass
684
+
28.**NEVER put `import '`, `import "`, or `import(` in shared string literals** - ESM shim plugins scan the JS bundle and rewrite these patterns. Use string concatenation (`"im" + "port"`) or rephrase the message. `ESMSafetyTest` in `riddlLib/jvm/src/test/` enforces this by scanning the fullLinkJS bundle
685
+
29.**Container.flatten() extension** - Recursively removes Include/BASTImport wrappers in-place. Lives in `language/shared/.../Contents.scala`. FlattenPass delegates to `root.flatten()`. Use base `Pass` not `DepthFirstPass` — mutating contents during traversal corrupts ArrayBuffer iteration
686
+
30.**release.yml automates multi-platform builds** - Triggered by `gh release create`. Builds native riddlc on macOS ARM64, macOS x86_64, Linux x86_64, plus JVM. Auto-updates homebrew-tap formula with SHA256 hashes
687
+
31.**Homebrew formula supports native + JVM fallback** - macOS ARM64 gets native binary (no JDK). Other platforms get JVM version with openjdk@21 dependency. Formula at `../homebrew-tap/Formula/riddlc.rb`
0 commit comments