Skip to content

chore: extract assembly read-lock factory into core - #1715

Merged
megha-narayanan merged 2 commits into
aws:feat/cdk-lspfrom
megha-narayanan:refactor/cdk-lsp-assembly-lock-core
Jul 8, 2026
Merged

chore: extract assembly read-lock factory into core#1715
megha-narayanan merged 2 commits into
aws:feat/cdk-lspfrom
megha-narayanan:refactor/cdk-lsp-assembly-lock-core

Conversation

@megha-narayanan

Copy link
Copy Markdown
Contributor

Matching LSP side of #1706. Moves the assembly read-lock acquirer out of
lib/lsp into lib/core/assembly-lock.ts so the LSP and web server build the
read lock from one shared factory. Pure refactor, LSP behavior is unchanged,
and server.ts re-exports AssemblyLock so existing importers keep resolving it.

Fixes #

Checklist

  • This change contains a major version upgrade for a dependency and I confirm all breaking changes are addressed
    • Release notes for the new version:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

Move the AssemblyLock type and the fromAssemblyDirectory().produce()-backed
acquirer out of lib/lsp into lib/core/assembly-lock.ts, so both the LSP and the
web server can build the read lock from one shared factory. Pure refactor: LSP
behavior is unchanged and server.ts re-exports AssemblyLock for existing
importers.
@megha-narayanan
megha-narayanan marked this pull request as ready for review July 8, 2026 16:12
@github-actions github-actions Bot added the p2 label Jul 8, 2026
@aws-cdk-automation
aws-cdk-automation requested a review from a team July 8, 2026 16:12
@megha-narayanan megha-narayanan changed the title refactor(cdk-explorer): extract assembly read-lock factory into core chore(cdk-explorer): extract assembly read-lock factory into core Jul 8, 2026
@megha-narayanan megha-narayanan changed the title chore(cdk-explorer): extract assembly read-lock factory into core chore: extract assembly read-lock factory into core Jul 8, 2026
release(): Promise<void>;
}
// Re-exported from core so existing importers keep resolving `AssemblyLock` here.
export type { AssemblyLock };

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks a little weird to me, why can't we update the import in other places to point towards core?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes oops this is just for the test, fixed

…-export

The type lives in lib/core/assembly-lock now. Point the only remaining
importer (the server test) at core directly and remove the compatibility
re-export from lsp/server.ts so core is the single source for the type.
@megha-narayanan
megha-narayanan merged commit a0b691b into aws:feat/cdk-lsp Jul 8, 2026
7 of 8 checks passed
megha-narayanan added a commit that referenced this pull request Jul 8, 2026
Brings merged LSP work (#1697, #1669, #1670, #1711, #1715) into the explorer
branch. CLI command map now carries both 'cdk explore' and 'cdk lsp';
regenerated the user-input files from cli-config.ts. express remains a bundled
dependency of the explorer web server.
megha-narayanan added a commit to megha-narayanan/aws-cdk-cli that referenced this pull request Jul 8, 2026
…and template

Rebased aws#1706 onto the updated feat/cdk-explorer (now carrying feat/cdk-lsp)
as a single integration commit. Adds source/template/tree navigation with
syntax highlighting, a YAML template view, and a file picker, and serves each
assembly read under the Toolkit read lock via the factory core extracted in
aws#1715. Coexists with the SSE live-refresh from aws#1698: the reload effect and
the navigation state share the same App shell.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants