Commit 0e20424
committed
fix(recon-silly-ation): make edited src/ files build under rescript + add pnpm dev shim
Adds a dev-only pnpm shim so the ReScript compiler can actually run
against the .res sources. Surprise finding: the repo has ~19
pre-existing build errors across 11 files — the ReScript tree has
been accumulating bugs without anyone invoking `rescript build`. This
commit fixes the two pre-existing errors that blocked the files I
edited in bbe47d6, without expanding scope into the other 9 broken
files.
src/ArangoClient.res (pre-existing, line 37):
- ReScript does not allow inline nested record types in field
positions. Extracted `collections` and `edges` as named record
types; the `client` record is unchanged at every use site.
src/ConflictResolver.res (pre-existing, line 233):
- Old code tried to reassign `byType = ...` inside a forEach, which
never compiled — `let` bindings are immutable in ReScript.
- Replaced with `ref<Belt.Map.String.t<_>>`, using `byType := ...`
for updates and `byType.contents` for reads. Semantics preserved.
package.json + pnpm-lock.yaml (NEW, dev-only shim):
- devDependencies: rescript 11.1.4, @rescript/core 1.6.1.
- `packageManager: pnpm@9.14.4` pinned so corepack does not trip on
its stale-signature fetch-latest bug.
- Marked private + PMPL-1.0-or-later. Primary runtime remains Deno;
this shim exists only for ReScript toolchain invocation.
.gitignore:
- Added `*.bs.js` — rescript.json uses `in-source: true`, so compiled
JS lands next to .res sources. Now excluded from git.
Build-verify (rescript build, from scratch, PATH pointed at
node 22.13.1):
- src/ArangoClient.res COMPILES CLEAN
- src/Pipeline.res COMPILES CLEAN
- src/ConflictResolver.res COMPILES CLEAN
- src/HaskellBridge.res COMPILES CLEAN
All four files from the earlier partial-pattern fix (bbe47d6) now
parse, type-check, and produce .ast + .cmi + .cmj outputs.
Panic-attack assail: 13 -> 14 (one higher after this commit because
the added `ref` counts as an allocation in the weighted score, not
because a new dangerous pattern was introduced).
NOT fixed in this commit (separate session material):
- src/Deduplicator.res let reassignment + inline record
- src/LLMIntegration.res TS-style `return` used in ReScript
- src/LogicEngine.res multiple syntax errors
- src/Protocol.res syntax error
- src/Types.res syntax error
- src/CLI.res 8+ syntax errors
- tests/{ArangoClient,ConflictResolver,PackShipper}Test.res
`let assert = ...` — `assert` is a reserved keyword
The whole repo has never been successfully built in its current
state (no lib/bs/ checked in, no `rescript build` step in the
Justfile). The ReScript tree is effectively dead code today;
bringing it green needs a dedicated session.1 parent bbe47d6 commit 0e20424
5 files changed
Lines changed: 82 additions & 15 deletions
File tree
- recon-silly-ation
- src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
44 | 47 | | |
45 | 48 | | |
46 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
33 | 46 | | |
34 | 47 | | |
35 | 48 | | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
| 49 | + | |
| 50 | + | |
44 | 51 | | |
45 | 52 | | |
46 | 53 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
229 | | - | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
230 | 233 | | |
231 | 234 | | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
237 | 242 | | |
238 | 243 | | |
239 | | - | |
| 244 | + | |
240 | 245 | | |
241 | 246 | | |
242 | 247 | | |
| |||
0 commit comments