#913: enforce --pin on link and jeo:assemble#921
Merged
Conversation
|
@bibonix Hey! Just a heads up - the branch name |
|
@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. |
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.
@yegor256 this PR fixes #913.
Problem
In
src/eoc.js, every build command exceptlinkandjeo:assemblecallspin(program.opts())as the first statement of its action handler — that's the helper that compares--pin=X.Y.Zagainst the runningeocversion and exits 1 withVersion mismatch: ...on a mismatch. Becauselinkandjeo:assemblewere missing that call, a project pinned to a specificeocversion would silently bypass the version check when those two commands were invoked.Changes
Two small commits:
#913: add failing tests for --pin on link and jeo:assemble— adds two regression tests intest/test_eoc.jsthat invokeeoc --pin=29.9.4 --alone linkandeoc --pin=29.9.4 jeo:assemble, asserting the standardVersion mismatch: you are running eoc <X.Y.Z>, but --pin option requires 29.9.4error is raised. Without the fix both tests fail:link --aloneruns to completion silently, andjeo:assemblefails downstream inside Maven for an unrelated reason.#913: enforce --pin in link and jeo:assemble action handlers— addspin(program.opts())as the first statement of each handler, mirroring the pattern used bycompile,transpile,clean,register,parse,assemble,lint,resolve,dataize,test,print,docs,jeo:disassemble,latex,normalize, andfmt.Net diff: +2 lines in
src/eoc.js, +18 lines intest/test_eoc.js.Verification
npx eslint— clean.npx mocha test/test_eoc.js— all 8 tests pass (6 pre-existing + 2 new).Ready for merge.