Skip to content

#913: enforce --pin on link and jeo:assemble#921

Merged
yegor256 merged 3 commits into
objectionary:masterfrom
bibonix:fix-pin-link-jeo-assemble
Apr 29, 2026
Merged

#913: enforce --pin on link and jeo:assemble#921
yegor256 merged 3 commits into
objectionary:masterfrom
bibonix:fix-pin-link-jeo-assemble

Conversation

@bibonix
Copy link
Copy Markdown
Contributor

@bibonix bibonix commented Apr 29, 2026

@yegor256 this PR fixes #913.

Problem

In src/eoc.js, every build command except link and jeo:assemble calls pin(program.opts()) as the first statement of its action handler — that's the helper that compares --pin=X.Y.Z against the running eoc version and exits 1 with Version mismatch: ... on a mismatch. Because link and jeo:assemble were missing that call, a project pinned to a specific eoc version would silently bypass the version check when those two commands were invoked.

Changes

Two small commits:

  1. #913: add failing tests for --pin on link and jeo:assemble — adds two regression tests in test/test_eoc.js that invoke eoc --pin=29.9.4 --alone link and eoc --pin=29.9.4 jeo:assemble, asserting the standard Version mismatch: you are running eoc <X.Y.Z>, but --pin option requires 29.9.4 error is raised. Without the fix both tests fail: link --alone runs to completion silently, and jeo:assemble fails downstream inside Maven for an unrelated reason.

  2. #913: enforce --pin in link and jeo:assemble action handlers — adds pin(program.opts()) as the first statement of each handler, mirroring the pattern used by compile, transpile, clean, register, parse, assemble, lint, resolve, dataize, test, print, docs, jeo:disassemble, latex, normalize, and fmt.

Net diff: +2 lines in src/eoc.js, +18 lines in test/test_eoc.js.

Verification

  • npx eslint — clean.
  • npx mocha test/test_eoc.js — all 8 tests pass (6 pre-existing + 2 new).
  • All 16 CI checks green on this PR (grunt build × 3 OSes, itest × 3 OSes, eslint, typos, pdd, xcop, copyrights, reuse, yamllint, markdown-lint, shellcheck, actionlint).

Ready for merge.

@yegor256 yegor256 merged commit d93db49 into objectionary:master Apr 29, 2026
16 checks passed
@0crat
Copy link
Copy Markdown

0crat commented Apr 29, 2026

@bibonix Hey! Just a heads up - the branch name fix-pin-link-jeo-assemble doesn't follow our naming convention, so that's -6 points according to our policy. It's really not a good idea to name branches this way. Next time, just use the ticket number - so for this one, 920 would've been perfect! Your running score is +70, so you're still doing great overall. Don't forget to check your Zerocracy account too! 🚀

@0crat
Copy link
Copy Markdown

0crat commented Apr 29, 2026

@bibonix Thanks for the contribution! You've earned +12 points for this: +16 as a basis, +1 for 20 hits-of-code (0.05 each), and -4 for contributing less than 40 hits-of-code, and -1 for no code review. Please keep them coming. Your running score is +82; don't forget to check your Zerocracy account too.

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.

link and jeo:assemble commands disregard --pin version constraint

3 participants