Skip to content

Commit afec58b

Browse files
committed
MeTTaScript 2.1.0
1 parent 7796591 commit afec58b

37 files changed

Lines changed: 386 additions & 117 deletions

RELEASE_NOTES.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,31 @@
1+
# MeTTaScript 2.1.0
2+
3+
Imports are now transitive, deduplicated, and cycle-safe. A module you import can itself import other
4+
modules, and their definitions become available; importing the same module twice is a no-op; and a cycle of
5+
imports resolves instead of failing. Import order already did not matter. Every terminating program from
6+
2.0.4 produces the same output, validated byte-identical across the full corpus, so upgrading is safe.
7+
8+
## Transitive, deduplicated, cycle-safe imports
9+
10+
Before this release, `(import! &self <module>)` brought in only that module's own definitions. If the module
11+
itself imported another, those transitive definitions did not follow; importing the same module twice
12+
duplicated its rules; and a cycle of imports left calls unresolved.
13+
14+
Now `import!` resolves the whole definition closure. When you import a module, its definitions load, and so
15+
do the definitions of every module it imports, transitively. Each module loads once per space, so a
16+
duplicate import is a no-op and a cycle of imports terminates. This matches Hyperon on transitivity and
17+
deduplication, and it is cycle-safe where Hyperon loops, which affects no terminating program.
18+
19+
The model stays definition-oriented. Importing a module brings its definitions and follows its `import!`
20+
edges, but does not execute the module's other top-level `!` directives, so a module's own tests or prints
21+
do not re-run when you import it.
22+
23+
## Compatibility
24+
25+
Nothing changes for programs that do not use nested, duplicate, or cyclic imports, which is the whole
26+
existing corpus: 124 of 124 programs are byte-identical to 2.0.4. The new behavior only activates for the
27+
import shapes that previously did not work.
28+
129
# MeTTaScript 2.0.4
230

331
A packaging fix for the browser compatibility package. `@metta-ts/browser` declared `sideEffects: false`

compat/browser/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@metta-ts/browser",
3-
"version": "2.0.4",
3+
"version": "2.1.0",
44
"license": "MIT",
55
"type": "module",
66
"main": "./dist/index.js",

compat/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@metta-ts/core",
3-
"version": "2.0.4",
3+
"version": "2.1.0",
44
"license": "MIT",
55
"type": "module",
66
"main": "./dist/index.js",

compat/das-client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@metta-ts/das-client",
3-
"version": "2.0.4",
3+
"version": "2.1.0",
44
"license": "MIT",
55
"type": "module",
66
"main": "./dist/index.js",

compat/das-gateway/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@metta-ts/das-gateway",
3-
"version": "2.0.4",
3+
"version": "2.1.0",
44
"license": "MIT",
55
"type": "module",
66
"main": "./dist/index.js",

compat/debug/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@metta-ts/debug",
3-
"version": "2.0.4",
3+
"version": "2.1.0",
44
"license": "MIT",
55
"type": "module",
66
"main": "./dist/index.js",

compat/edsl/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@metta-ts/edsl",
3-
"version": "2.0.4",
3+
"version": "2.1.0",
44
"license": "MIT",
55
"type": "module",
66
"main": "./dist/index.js",

compat/grapher/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@metta-ts/grapher",
3-
"version": "2.0.4",
3+
"version": "2.1.0",
44
"license": "MIT",
55
"type": "module",
66
"main": "./dist/index.js",

compat/hyperon/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@metta-ts/hyperon",
3-
"version": "2.0.4",
3+
"version": "2.1.0",
44
"license": "MIT",
55
"type": "module",
66
"main": "./dist/index.js",

compat/libraries/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@metta-ts/libraries",
3-
"version": "2.0.4",
3+
"version": "2.1.0",
44
"license": "MIT",
55
"type": "module",
66
"main": "./dist/index.js",

0 commit comments

Comments
 (0)