3.2 KiB
3.2 KiB
| id | ticket | title | status | created | ref_decisions | tags | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| PLN-0112 | multi-frontend-remove-pbs-branches | Migrate semantic tokens to generic frontend language service | open | 2026-07-15 |
|
|
Briefing
DEC-0042 requires the LSP common path to project semantic token behavior from the selected frontend through generic frontend contracts. Semantic presentation already lives mostly in FrontendSpec, so this is the lowest-risk capability migration.
Objective
Make LSP semantic token handling consume generic frontend language-service APIs while preserving frontend-owned semantic presentation and PBS semantic token behavior.
Dependencies
- Depends on
PLN-0111for the generic frontend editorial surface. - Requires accepted decision
DEC-0042.
Scope
- Route semantic token requests through the provider's optional generic language service.
- Preserve
FrontendSpec.getSemanticPresentation()as the source of token keys, host projections, themes, and default theme. - Keep deterministic empty semantic tokens when a frontend has no language service or no semantic-token capability.
Non-Goals
- Changing PBS semantic classification rules.
- Implementing semantic-token improvements from PBS-specific agendas.
- Migrating completion, hover, or signature help.
- Removing every PBS import from
CompilerLanguageServiceBridge.
Execution Method
- Inspect
CompilerLanguageServiceBridge.semanticTokens(...)andPBSFrontendLanguageService.semanticTokens(...). - Add a generic semantic-token method to the frontend language-service surface if not already introduced by
PLN-0111. - Adapt
PBSFrontendLanguageServiceto return generic frontend semantic token records or a compatible generic token model. - Update
CompilerLanguageServiceBridge.semanticTokens(...)to resolveFrontendProviderbycontext.languageId(), read presentation fromprovider.specification(), and call the generic semantic-token capability when present. - Ensure missing capability returns an empty token list with the frontend presentation legend.
- Keep VS Code/LSP4J mapping inside
prometeu-lsp.
Acceptance Criteria
- LSP semantic token handling no longer needs PBS-specific language-service casts.
- Frontend semantic presentation remains frontend-owned.
- PBS semantic token regression tests continue to pass.
- Compile-only or no-language-service providers return deterministic empty semantic tokens.
Tests
- Existing LSP semantic token tests.
- PBS frontend semantic presentation tests.
- Missing language-service fallback tests in
CompilerLanguageServiceBridgeTest.
Affected Artifacts
prometeu-lsp/prometeu-lsp-v1/src/main/java/p/studio/lsp/services/compiler/CompilerLanguageServiceBridge.javaprometeu-compiler/frontends/prometeu-frontend-pbs/src/main/java/p/studio/compiler/PBSFrontendLanguageService.javaprometeu-compiler/prometeu-frontend-api/src/main/java/p/studio/compiler/services/...- LSP semantic-token tests.
TBD.
Objective
TBD.
Dependencies
TBD.
Scope
TBD.
Non-Goals
TBD.
Execution Method
TBD.
Acceptance Criteria
TBD.
Tests
TBD.
Affected Artifacts
TBD.