Repository navigation
Transpile the originals against the open-abap-core the runtime was built with - #9
Merged
Merged
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
scripts/originals.mjscloned open-abap-core with--depth 1from HEAD, unpinned, while@abap2ui5/node-runtimerecords the commit its output was built against (abap2ui5.openAbapCore). The script now reads that field from the runtime it already resolves through@cap2ui5/cds-pluginand 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 test9/9. The differential test was run for real: abap2UI5/samples fetched atABAP2UI5_SAMPLES_PIN,originals.mjschecked out open-abap-core atb2d219df…(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