Repository navigation
@thoremin/ext-air: the air extension as a workspace package (ADR follow-up c, part 3) - #301
Merged
Merged
Conversation
…ow-up c, part 3) - src/extensions/air moves to packages/ext-air/src (git mv, 257 specifiers rewritten: the extension's own imports relative, tests and scripts via @thoremin/ext-air/...); extensions.json names the package, the list declaration is typed from it - the package imports only packages (packages_purity): an extension physically cannot import the app - the static guards that scanned src/extensions (write path, layering, command firewall, timescale boundary, extension boundary) find extension sources from extensions.json (SHIPPED_EXTENSION_DIRS) and fail if they find none; probed with planted violations - the core-alone bundle check flags any packages/ext-* module (probed)
…nsions.json, so tests no longer depend on the working directory
…t, in-tree or a package); rule 2 resolves the file an import reaches, so a pure file cannot reach its React half by an explicit .tsx or a directory
7 of 9 tasks
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 (c), part 3 of the instruments-as-graphs ADR (#268): the air extension becomes a workspace package,
@thoremin/ext-air. With #298 (sdk) and #300 (sdk-ui), that completes O2 (§4.3) for the first extension. O3, separate repositories, still waits on #262.What moved
src/extensions/air→packages/ext-air/src, bygit mv. 257 specifiers were rewritten mechanically: the extension's own imports became relative, and tests and scripts now import@thoremin/ext-air/....extensions.jsonnames the package (@thoremin/ext-air,@thoremin/ext-air/ui), and the generated list declaration types it from there.packages_purity), so an extension physically cannot import the app.Guards that would otherwise have gone vacuous
A review of #300 noted five static guards that found extensions by scanning
src/extensions. After this move they would have scanned nothing and stayed green. They now find extension sources fromextensions.json(SHIPPED_EXTENSION_DIRSintest/helpers/extensions.ts) and fail if they find none:dials_write_path,layering,commands_firewall,timescale_boundary,extensions_boundary.@/appimport, an sdk-ui import and an app-side import intolib/notes.ts. All three were caught.packages/ext-*module. A probe import of@thoremin/ext-air/lib/notesfrommain.tsxwas caught.index.ts/ui.tsxexist.Verified
npm run typecheck(now includespackages/ext-air/src, minus its.tsx),typecheck:core,npm test(2442 passed),npm run build(the full bundle carries the air nodes), andnpm run test:core(2335 passed / 87 skipped, bundle check clean): all green.npm ci && npm run buildat the root links the new workspace.Refs #268.