fix(bench): address the dummy remote as a file:// URL#181
Merged
Conversation
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.
Follow-up to #178, which fixed a real bug but not the one that mattered.
semantic-releasestill contributes zero cells: I checked the artifact from the run after #178 shipped rather than trusting the green tick, and it is still absent.#178 fixed the dangling remote
HEAD(fatal: couldn't find remote ref HEAD). That was real — semantic-release now gets past itsgit fetchand hyperfine measures it on thefloorfixture (1.352 s ± 0.024 s, 30 runs). Butfloorcells are stripped frombenchmarksby design, and the one fixture that matters still SKIPs:It analyses the commits fine, then dies generating notes. semantic-release derives
repositoryUrlfromoriginand hands it tonew URL(). Our origin is the bare pathmktemp -dreturned:That last line is why #178 looked right. My local verification passed because a Windows path parses as a URL —
C:reads as a scheme. The release notes it produced were full ofhttps://C/Users/bryan/...links and I did not stop to ask why. On Linux the same code throws.floormasks it further: one commit, nothing releasable, so semantic-release exits beforegenerateNotesever runs.Addressing the remote as
file://fixes it — a valid URL, and git clones and fetches from it identically. Verified end to end:generateNotesnow completes, and semantic-release resolves "the next release version is 0.2.0".Tests, because this bug has now outlived two fixes.
setup_dummy_remoteis sourced out ofrun.shand pinned on: origin is afile://URL,new URL()accepts it, the remote'sHEADmatches the pushed branch,git fetchworks, refs and tags land, a detached HEAD fails loudly, and a re-run is not fatal. The bare-path regression is verified to make test 1 fail.One caveat worth stating: the
new URL()test only bites on POSIX — on Windows it goes green even with the bare path, the same trap as above. Thefile://prefix assertion is the portable guard; that test is documentation of why. It is commented as such.