Skip to content

Transpile the originals against the open-abap-core the runtime was built with - #9

Merged
oblomov-dev merged 1 commit into
mainfrom
claude/sweet-thompson-4b6na8
Oct 1, 2026
Merged

oblomov-dev merged 1 commit into
mainfrom
claude/sweet-thompson-4b6na8

Conversation

@oblomov-dev

Copy link
Copy Markdown
Member

What

scripts/originals.mjs cloned open-abap-core with --depth 1 from HEAD, unpinned, while @abap2ui5/node-runtime records the commit its output was built against (abap2ui5.openAbapCore). The script now reads that field from the runtime it already resolves through @cap2ui5/cds-plugin and fetches exactly that commit into .deps/open-abap-core (git init / fetch --depth 1 / checkout FETCH_HEAD), reusing a checkout already at the commit. Only when the field is absent (1.145.0) does it fall back to the HEAD clone, with a printed warning. README ("The differential test") and CHANGELOG follow.

Checks

npm install, npm test 9/9. The differential test was run for real: abap2UI5/samples fetched at ABAP2UI5_SAMPLES_PIN, originals.mjs checked out open-abap-core at b2d219df… (the recorded commit), 71 classes transpiled, test/differential.mjs: 71 samples, 239 roundtrips, no difference. The reuse, the fallback and the replacement of a stale HEAD checkout were exercised by hand.

Part of a set of changes across the abap2UI5 and cap2UI5 npm packages (same branch name in every repository).

🤖 Generated with Claude Code

https://claude.ai/code/session_01D4ictE8drLTLYcvFQ7tn9u


Generated by Claude Code

…ilt with

scripts/originals.mjs cloned open-abap-core from HEAD, unpinned, so the
differential test transpiled the ABAP originals against whatever
open-abap-core was that day, while the translation runs on the one
@abap2ui5/node-runtime was built against. A change in open-abap-core would
have shown up as a difference between original and translation that is
neither's. Today HEAD is c677145 and the runtime's commit b2d219d.

The runtime records that commit in its package.json since 1.146.0
(abap2ui5.openAbapCore), next to the transpiler version the script already
reads. Fetch exactly that commit - git init, fetch --depth 1 <sha>,
checkout FETCH_HEAD, as node-runtime's README shows - and replace a .deps
checkout that sits at another commit, so a stale clone from before this
change is not kept. A runtime that does not record it (1.145.0) still gets
the HEAD clone, with a warning that says why.

Checked: npm run differential with abap2UI5/samples at the pin - 71
samples, 239 roundtrips, no difference - plus the fallback and the
replacement of a stale checkout by hand.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D4ictE8drLTLYcvFQ7tn9u
@oblomov-dev
oblomov-dev merged commit 5325a3e into main Oct 1, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants