Skip to content

Commit 72b0cc5

Browse files
hyperpolymathclaude
andcommitted
fix(rescript-tea): resolve committed merge-conflicts; canonical src/tea builds green
ReScript 12.2.0 toolchain installed (~/dev/tools/languages/rescript). Integrity defects found + fixed (botched merge 992e4b4 left committed git conflict markers in JSON config — package was unbuildable): - rescript.json: <<<<<<< HEAD/=======/>>>>>>> resolved to canonical src/tea structure; sources narrowed to [src/tea] (canonical HEAD) - package.json: same conflict resolved to canonical identity (v1.0.0, @rescript/core, github repo); merged in build/test scripts - no .res/.resi carried conflict markers (config-only defect) Validation: `rescript build` -> Parsed/Compiled 75 modules, exit 0. Source-only brought-forward content does not compile vs the canonical API; preserved losslessly in rescript-tea/reconcile/ (NOT in sources), each with a concrete port task (see reconcile/README.adoc): - Tea_Layout.{res,resi} ~750 LOC -> needs-reactdom-to-core-port/ (ReactDOM-coupled; canonical pkg dropped @rescript/react) - test/Tea_{Cmd,Json}_test.res + examples/{02_http,03_swot_dashboard} -> needs-canonical-api-port/ (written vs standalone repo's diverged API) - pre-existing broken examples/SafeDOMExample.res -> quarantined All moves are git renames (history preserved). MIGRATION.adoc exit criteria updated. Standalone repo retirement still deferred (reversible, post-#69-merge). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 0a319f6 commit 72b0cc5

13 files changed

Lines changed: 83 additions & 73 deletions

File tree

rescript-ecosystem/MIGRATION.adoc

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,14 +95,41 @@ Source-only governance/metadata forms (`.machines_readable/6scm/*.scm`,
9595
old `.adoc` duplicates) are **intentionally not** carried forward — the
9696
canonical RSR/a2ml scaffold here supersedes them (SCM→a2ml policy).
9797

98+
=== Build validation (2026-05-17, ReScript 12.2.0 + @rescript/core 1.6.1)
99+
100+
Toolchain installed at `~/dev/tools/languages/rescript/current`
101+
(PATH-per-use). Two **committed git merge-conflict markers** were found
102+
and fixed (botched merge `992e4b4`): `rescript.json` and `package.json`
103+
each had `<<<<<<< HEAD … ======= … >>>>>>>` blocks (HEAD = canonical
104+
`src/tea` / `@rescript/core`; other = old flat `src` / `@rescript/react`).
105+
Resolved to the canonical side. No `.res/.resi` carried conflict markers.
106+
107+
**Canonical package now builds green:** `rescript build` →
108+
`Parsed 75 source files / Compiled 75 modules`, exit 0, sources
109+
`[{"dir":"src/tea"}]`.
110+
111+
Brought-forward source-only content does **not** compile against the
112+
canonical API and is preserved losslessly in
113+
`rescript-tea/reconcile/` (NOT in `sources`), each with a concrete port
114+
task — see `rescript-tea/reconcile/README.adoc`:
115+
116+
* `Tea_Layout.{res,resi}` (~750 LOC) — `ReactDOM`-coupled; canonical
117+
package dropped `@rescript/react`. Port off ReactDOM.
118+
* `test/Tea_{Cmd,Json}_test.res`, `examples/{02_http,03_swot_dashboard}`
119+
— written against the standalone repo's diverged API
120+
(`Tea_Json.decodeValue` absent here; `Tea_Cmd.batch` list-vs-array).
121+
98122
=== Exit criteria for retiring the standalone rescript-tea repo
99123

100-
. Per-module semantic merge of the diverged `src/*` (toolchain-validated).
101-
. Brought-forward tests/examples compile against the canonical modules.
124+
. ✅ Canonical `src/tea` builds green (toolchain-validated).
125+
. ✅ Config integrity defects (conflict markers) resolved.
126+
. Port `reconcile/` items to the canonical API; empty that directory.
127+
. Per-module semantic merge of the diverged `src/*` (e.g. `Tea_Sub`
128+
405↔201) against the standalone source — needs side-by-side review.
102129
. Resolve the `rescript-tea` ↔ `packages/web/tea` duplication.
103130
. Then, and only then: per-repo retirement of
104131
https://github.com/hyperpolymath/rescript-tea (reversible until that PR
105-
merges).
132+
merges, and only after developer-ecosystem#69 merges).
106133

107134
== Go-forward: affinescript-tea
108135

rescript-ecosystem/rescript-tea/examples/SafeDOMExample.res renamed to rescript-ecosystem/rescript-tea/examples/_quarantine_precedent_broken/SafeDOMExample.res.txt

File renamed without changes.
Lines changed: 8 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,26 @@
11
{
22
"name": "rescript-tea",
3-
<<<<<<< HEAD
43
"version": "1.0.0",
54
"description": "The Elm Architecture for ReScript — comprehensive TEA with keyed diffing, HTTP, JSON decoders, SSR, time-travel debugger",
5+
"type": "module",
66
"main": "src/tea/Tea.res.js",
77
"author": "Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>",
88
"license": "SEE LICENSE IN LICENSE",
9-
"peerDependencies": {
10-
"rescript": "^12.0.0",
11-
"@rescript/core": "^1.0.0"
12-
},
13-
"keywords": ["rescript", "elm", "tea", "virtual-dom", "keyed-diffing", "ssr", "http", "json-decoders"]
14-
=======
15-
"version": "0.1.0",
16-
"description": "The Elm Architecture for ReScript",
17-
"keywords": [
18-
"rescript",
19-
"elm",
20-
"tea",
21-
"react",
22-
"architecture",
23-
"functional"
24-
],
25-
"author": "Jonathan D.A. Jewell",
26-
"license": "MIT",
279
"repository": {
2810
"type": "git",
29-
"url": "https://gitlab.com/hyperpolymath/rescript-tea"
11+
"url": "https://github.com/hyperpolymath/rescript-tea"
3012
},
31-
"main": "src/Tea.res.mjs",
13+
"keywords": ["rescript", "elm", "tea", "virtual-dom", "keyed-diffing", "ssr", "http", "json-decoders"],
3214
"scripts": {
3315
"build": "rescript",
3416
"clean": "rescript clean",
3517
"dev": "rescript -w",
36-
"test": "node --test lib/es6/test/*.mjs"
18+
"test": "node --test test/*.res.js"
3719
},
38-
"peerDependencies": {
39-
"@rescript/react": ">=0.12.0",
40-
"react": ">=18.0.0",
41-
"react-dom": ">=18.0.0",
42-
"rescript": ">=11.0.0"
20+
"dependencies": {
21+
"@rescript/core": "^1.0.0"
4322
},
44-
"devDependencies": {
45-
"@rescript/react": "^0.13.0",
46-
"react": "^18.2.0",
47-
"react-dom": "^18.2.0",
48-
"rescript": "^11.1.0"
23+
"peerDependencies": {
24+
"rescript": "^12.0.0"
4925
}
50-
>>>>>>> 992e4b4 (feat: initial implementation of rescript-tea)
5126
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
// SPDX-License-Identifier: PMPL-1.0-or-later
2+
= rescript-tea — reconciliation holding area
3+
:toc:
4+
5+
Source-only content brought forward from the standalone repo
6+
`github.com/hyperpolymath/rescript-tea` that does **not** compile against
7+
the canonical consolidated package. Preserved here losslessly — **not** in
8+
`rescript.json` sources — each with a concrete port task. The canonical
9+
package (`src/tea/`, pure `@rescript/core`) builds green:
10+
`rescript build` → 75 modules, exit 0 (ReScript 12.2.0).
11+
12+
See ../MIGRATION.adoc "rescript-tea" section for the origin/divergence
13+
record.
14+
15+
== needs-reactdom-to-core-port/
16+
17+
* `Tea_Layout.{res,resi}` (~750 LOC) — depends on `ReactDOM.Style.t`.
18+
The canonical package deliberately dropped `@rescript/react` (it is a
19+
pure `@rescript/core` TEA). **Port task:** replace the `ReactDOM`
20+
flex/grid style builders with a plain record or `@rescript/core`
21+
`Dict`, then move back to `src/tea/`.
22+
23+
== needs-canonical-api-port/
24+
25+
These were written against the *standalone source repo's* API, which has
26+
diverged from the canonical modules (the documented two-way divergence):
27+
28+
* `test/Tea_Cmd_test.res` — calls `Tea_Cmd.batch([])` (array); canonical
29+
`Tea_Cmd.batch` takes `list<Tea_Cmd.t<_>>`. Port to the canonical API.
30+
* `test/Tea_Json_test.res` — calls `Tea_Json.decodeValue`, absent in the
31+
canonical `Tea_Json`. Map to the canonical decoder entrypoint.
32+
* `examples/02_http/` (`HttpExample.res`) — validate against canonical
33+
`Tea_Http`/`Tea_App`; port API drift.
34+
* `examples/03_swot_dashboard/` (`SwotDashboard.res`) — same.
35+
36+
Once ported, tests/examples can be re-added to `rescript.json` `sources`
37+
as `type:"dev"` entries and this directory emptied.
38+
39+
== Disposition rule
40+
41+
Nothing here is deleted. Items graduate back into the canonical package
42+
only after they compile against it. Only when this directory is empty AND
43+
the per-module source↔canonical merge is complete may the standalone
44+
`github.com/hyperpolymath/rescript-tea` repo be retired (per-repo PR,
45+
reversible until merge) — see ../MIGRATION.adoc exit criteria.

rescript-ecosystem/rescript-tea/examples/02_http/HttpExample.res renamed to rescript-ecosystem/rescript-tea/reconcile/needs-canonical-api-port/examples/02_http/HttpExample.res

File renamed without changes.

rescript-ecosystem/rescript-tea/examples/02_http/index.html renamed to rescript-ecosystem/rescript-tea/reconcile/needs-canonical-api-port/examples/02_http/index.html

File renamed without changes.

rescript-ecosystem/rescript-tea/examples/03_swot_dashboard/SwotDashboard.res renamed to rescript-ecosystem/rescript-tea/reconcile/needs-canonical-api-port/examples/03_swot_dashboard/SwotDashboard.res

File renamed without changes.

rescript-ecosystem/rescript-tea/examples/03_swot_dashboard/index.html renamed to rescript-ecosystem/rescript-tea/reconcile/needs-canonical-api-port/examples/03_swot_dashboard/index.html

File renamed without changes.

rescript-ecosystem/rescript-tea/test/Tea_Cmd_test.res renamed to rescript-ecosystem/rescript-tea/reconcile/needs-canonical-api-port/test/Tea_Cmd_test.res

File renamed without changes.

rescript-ecosystem/rescript-tea/test/Tea_Json_test.res renamed to rescript-ecosystem/rescript-tea/reconcile/needs-canonical-api-port/test/Tea_Json_test.res

File renamed without changes.

0 commit comments

Comments
 (0)