Repository navigation
fix: three values that reached an output are no longer printed (0.28.1) - #59
Merged
Merged
Conversation
A Forge URL with credentials that a release before 0.27.1 recorded in the registry was relayed by workspaces --json, cache prune and doctor's cache check: a missing or an error row now gives a fixed label and no key, and a cache entry such a row names is named by the label. A forge: with a backslash in place of the // after the scheme read as a path and was printed whole in "Forge not found at"; credentialFault now reads it as it reads the empty authority. A ref: holding a URL with credentials was quoted by the messages that name a ref; shownRef gives the label instead.
… credential ref: are not printed Seven of the ten cases fail on the code before the fix; the other three pin what must not change (a clean recorded URL, a clean cache entry, drive paths). Every credential is assembled at runtime.
…e cache entry name that still is The label changes values of workspaces --json and cache prune --json, and an entry no registered workspace names any more keeps its name in doctor and cache prune: both are said where an upgrading user reads.
…resolve gives the label too (review) A fourth message quoted a ref: holding a URL with credentials — the one remoteTree words when the remote does not answer and the cached copy cannot resolve the ref. A plain ref is still named bare there.
… warnings that carry the label (review) The ref cases called resolveRef only, so the message of a failed fetch went unseen; and the prune case asserted over an empty removed list. They now go through loadForgeSource and ensureTree with a git stub, and cover a removed entry, a removal directory and a held-open warning.
…ill prints an entry name, the fourth ref message (review) The section claimed no exit code changes and listed three ref messages and one doctor line; each was short of what the code does.
… credential ref or entry name (review) The interactive init said a ref: read from craftar.local.yaml as written, and offered a ref answer back as the next question's default; a failure thrown out of cache prune, or doctor's unreadable-cache line, carried the path it failed on, the entry's name in it. Each now goes through the same label.
…a labelled entry (review) Three cases that fail on the code before: the ref said back from craftar.local.yaml, the ref answer offered again, and an error thrown with a path inside an entry named after a URL with credentials.
…at name an entry, exact wording (review) The ref bullet read as exhaustive and was not; the spellings, the doctor line and the prune lines were each a little short of the code.
…he refused ref answer when --forge is given (review) doctor's unreadable-cache line went through hideKeys with no test reaching it, and the refused ref answer was pinned only where the Forge had been asked. A comment in cache.ts says why the rewritten error carries no cause.
…ill print an entry's name (review) A kept entry is printed by name too, and with the registry off doctor names only the entries whose fetch never completed.
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.
Summary
npmenvironmentcraftar workspaces --jsongives a fixed label asforge.sourceandnullasforge.keyon amissingor anerrorrow;craftar cache prune(paths, warnings, a thrown failure) and thecachecheck ofcraftar doctorput the same label where the name of the cache entry such a row names would be.forge:that holds credentials behind a\in place of the//is refused, like every URL with credentials. It was read as a path and printed whole byForge not found at ….ref:that holds a URL with credentials is not printed by the messages that name a ref, nor by the interactiveinit, which also refuses one typed as an answer.Known limit — not closed by this PR
A cache entry that no registered workspace names any more (after the re-sync with a clean URL), and any entry when the registry is off or unreadable, is still printed by its name by
craftar doctorandcraftar cache prune: nothing in the cache says which entry was named after a refused URL. README › Upgrading › to 0.28.1 says so and what to do.Contracts and bytes
--jsonkey is added, removed, renamed or retyped (workspaces,cache prune,doctor). Values change: the label inforge.source,nullinforge.keyfor aremoterow, the label insidekept[].path/removed[].path/warningsand acachefinding'smessage.update.craftar import --write-configon a workspace whoseforge:is the backslash spelling with credentials exits 1 (Forge untouched) where it exited 0.Test plan
npm run typecheck— exit 0npm run build— exit 0npx vitest run --exclude test/ci.test.ts --maxWorkers=6— exit 0: 101 files passed, 1 skipped; 2745 tests passed, 8 skippedtest/ci.test.ts— never part of a by-hand run; this PR's CI is its runtest/printed-recorded-values.test.ts(21 cases): against the code before the fix, 12 of the first 15 fail and the other 3 are controls; the cases added by the review rounds each failed on the round before. Every credential is assembled at runtimenode-cli-revieweranddocs-author: four rounds, clean oncbc3357