Fix pre rename install - #1
Open
sajonaro wants to merge 2 commits into
Open
Conversation
…checkout The extension appeared in the marketplace pane as `pol`, flagged "invalid extensions detected", offering to Install Locally a thing that was not there. An install made before "rename: pol becomes writ" is a symlink named pol.pol-0.1.0 pointing into a directory the rename took away. VS Code scans its extensions directory, cannot read a manifest through a dangling link, and reports the extension as invalid — naming `pol`, which the user cannot remove from the UI, because there is nothing behind it to uninstall. The entry in extensions.json outlives the directory and is what keeps re-reporting it. install.sh only ever removed writ.writ-0.1.0, so nothing cleaned this up: the rename shipped without a migration path, and every pre-rename install stayed broken and visible. It now purges legacy ids on INSTALL as well as uninstall — the person hitting this is installing the new extension, not remembering an old one — and tests `-e` OR `-L`, because `-e` is false for exactly the dangling case being cleaned. The removal is of the link, never through it, which would delete a live checkout. Underneath that sat a second failure the first one hid. candidates() joined the relative default onto workspace folders only, so the split into separate writ/ and writ-vscode/ repositories broke it: the natural thing to open is the directory holding both, and the default then resolves against a folder with no _build in it. The extension said "no language server" with a perfectly good one a single directory down — the same symptom as never having built it, which sends you off to check the wrong thing entirely. It now also tries checkouts one level below each workspace folder, identified by dune-project rather than by being named `writ`. One level, deliberately: this must not become a walk of the workspace, which on a large tree would cost more than it saves. install.sh had the same blind spot from the other side, looking only at $here/../.. for the engine — which in the split layout is the directory containing both repositories and never the engine itself. It now accepts $WRIT_REPO, ../.., or ../writ. Its verify step no longer pipes into an empty command name when there is no server to verify, which reported a shell error about "" rather than the thing that was actually true. TESTED, because all of this fails silently. test-resolve.js gains the split layout, exercised against a real directory tree: that a checkout one level down is found, that the workspace root still wins, that a sibling which is not a checkout is not guessed at, that the nested build still beats PATH, and that a workspace folder which does not exist is survivable rather than fatal at activation. The legacy purge was checked by recreating the dangling symlink and re-running the installer against it. Also: package-lock.json still called the package politics-constructor, and the run-path comments still named tooling/vscode/, which no longer exists.
…t of the .vsix The grammar's comments said .afk-flow/check-grammar.py asserts the guard, effect and rules-builtin alternations against the engine, and told the reader to keep them as whole ( | ) alternatives so that it could. No such script is in this repository, or in writ's. The word lists are still right — they match `guard_words` and `builtins` in core/syntax/rules_parser.ml, checked by hand here — but a comment promising a check that does not run is worse than no comment at all: it is exactly why nobody notices when the grammar drifts from the engine. The formatting rule stays, now with the reason that is actually true: so the sets can be diffed against that list by eye, and so a word added to the engine is visibly missing here. Only the "comment" fields changed. Every match regex is untouched, so nothing about the highlighting moves. .vscodeignore additionally keeps the tests, install.sh, the lockfile, .mailmap and .github/ out of a .vsix — shipping the installer inside the thing it installs is a loop that can only confuse, and the rest is repository plumbing that is invisible in the source tree and rides along unnoticed. docs/ stays in deliberately, because README.md embeds docs/images/writ-mark-200.png and the marketplace page loses its mark without it, as do LICENSE, NOTICE and AUTHORS, which ship with the work. VERIFIED with vsce rather than reasoned about, which is how .mailmap and .github/ were found at all — nothing else lists them. `vsce package` now yields 340 files, of which exactly fourteen are this extension's: the manifest, the client, the grammar, the language configuration, the icon, the README and its images, and the notices. The other 326 are node_modules and vsce's own two generated manifests.
sajonaro
force-pushed
the
fix-pre-rename-install
branch
from
August 14, 2026 19:43
4619f89 to
974b2f1
Compare
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.
No description provided.