Skip to content

fix(examples): install the antelope build the library resolves - #10

Merged
robrigo merged 1 commit into
mainfrom
fix/examples-type-identity
Aug 21, 2026
Merged

fix(examples): install the antelope build the library resolves#10
robrigo merged 1 commit into
mainfrom
fix/examples-type-identity

Conversation

@robrigo

@robrigo robrigo commented Aug 21, 2026

Copy link
Copy Markdown

Why

The demo specs never reach a test. ts-node/register type-checks by default, so twelve diagnostics throw a TSError while the first spec loads. The examples are unrunnable even for someone who has blanc++ and has built the wasm fixtures, and those absent fixtures were hiding the earlier blocker.

The diagnostics were reporting a real defect, not a compiler artifact. A spec imports Blockchain from ../../dist, which loads @wharfkit/antelope out of the root tree, and imports Name from @wharfkit/antelope, which resolves to the examples tree. Both sides declare the same caret range, but the two lockfiles resolved it years apart: the root tree holds 1.1.1 while the examples tree held 1.2.0. Values built by two different releases of the same class crossed the API on every call, and the private field each release declares is what the compiler refused.

Declaring the version the library itself resolves gives both sides one build. CI then installs the demo and type-checks it, so a later move in the root lockfile cannot split the two apart again while every check stays green.

Thanks for both review points. The first was right that a paths alias would have told the compiler two builds were one while the runtime still crossed them, and the second was right that the alignment was worth nothing unenforced.

Validation

Verified on a clean examples/node_modules: all three trees report @wharfkit/antelope 1.1.1, the root one, the examples one, and the copy the file dependency makes. tsc --noEmit over examples goes from twelve errors to zero, with no compiler-side aliasing involved. Running mocha ./foo/foo.spec.ts -r ts-node/register now fails on the absent foo/foo.wasm instead of on a TSError, which is the real blocker outside a blanc++ toolchain and the one this repository cannot remove.

The new gate was proven to fail rather than merely to pass. Pushing the examples pin to 1.2.0 while the root stays on 1.1.1 returns exactly the twelve diagnostics and exits non-zero; restoring the pin returns zero. It costs about four seconds, two for the install and two for the compile.

Root gates: yarn run test passes, 35 unit tests plus the frozen examples install.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Attempts to make example specs compile by unifying Antelope type resolution.

Changes:

  • Adds a TypeScript path alias for @wharfkit/antelope.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread examples/tsconfig.json Outdated
"moduleResolution": "node",
"baseUrl": ".",
"paths": {
"@wharfkit/antelope": ["node_modules/@wharfkit/antelope"]

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct on both points, and the version claim checks out: the root tree resolves @wharfkit/antelope 1.1.1 while the examples tree resolved 1.2.0, so the paths alias would have told the compiler the two builds were one while the runtime still crossed them.

Replaced the alias with the actual alignment: the examples now declare the version the library resolves. On a clean examples/node_modules all three trees report 1.1.1, and tsc goes to zero errors with no paths entry at all.

@robrigo
robrigo force-pushed the fix/examples-type-identity branch from 4a730aa to 552fd02 Compare August 21, 2026 17:37
@robrigo robrigo changed the title fix(examples): resolve one antelope copy so the demo specs compile fix(examples): install the antelope build the library resolves Aug 21, 2026
@robrigo
robrigo requested a balanced review from Copilot August 21, 2026 17:37

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.

Comment thread examples/package.json
"license": "MIT",
"devDependencies": {
"@atomichub/vert": "file:..",
"@wharfkit/antelope": "1.1.1",

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, and unenforced it was worth little. CI now installs the demo and runs a typecheck script on it, straight after the root build so ../../dist exists.

Proven to fail, not just to pass: pushing the examples pin to 1.2.0 while the root stays on 1.1.1 brings back exactly the twelve diagnostics and exits non-zero, and restoring the pin returns zero. The step costs about four seconds, two for the install and two for the compile.

@robrigo
robrigo force-pushed the fix/examples-type-identity branch from 552fd02 to bf87ca5 Compare August 21, 2026 17:45
@robrigo
robrigo requested a balanced review from Copilot August 21, 2026 17:45

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 3 changed files in this pull request and generated no new comments.

The demo specs fail before any test runs. ts-node type-checks by default, so twelve diagnostics throw a TSError while the first spec loads, which leaves the examples unrunnable even where blanc++ is present and the wasm fixtures are built; the absent fixtures hid an earlier blocker.

Those diagnostics report a real defect rather than a compiler artifact. A spec imports Blockchain from ../../dist, which loads @wharfkit/antelope out of the root tree, and imports Name from @wharfkit/antelope, which resolves to the examples tree. Both sides declare the same caret range, but the two lockfiles resolved it years apart, so the root tree holds 1.1.1 while the examples tree held 1.2.0. Values built by two different releases of the same class crossed the API on every call, and the private field each release declares is what the compiler refused. Declaring the version the library itself resolves gives both sides one build and clears all twelve.

Nothing enforced that alignment, so CI installs the demo and type-checks it from here on. A later move in the root lockfile would otherwise split the two builds apart again with every check still green, and the diagnostics would come back only for whoever ran the demo. The first spec now fails on its absent wasm fixture, which is the real blocker outside a blanc++ toolchain and the one this repository cannot remove.
@robrigo
robrigo force-pushed the fix/examples-type-identity branch from bf87ca5 to 9889543 Compare August 21, 2026 17:48
@robrigo
robrigo merged commit 48d1509 into main Aug 21, 2026
4 checks passed
@robrigo
robrigo deleted the fix/examples-type-identity branch August 21, 2026 17:50
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