3.9 KiB
3.9 KiB
| id | ticket | title | status | created | ref_decisions | tags | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| PLN-0108 | multi-frontend-compiler-vs-language-services | Move PBS editor assistance behind optional language service | done | 2026-07-15 |
|
|
Briefing
DEC-0041 allows PBS to keep rich editor assistance, but that behavior must become a PBS-provided optional capability instead of a common frontend requirement. This plan moves PBS completion, hover, signature help, semantic token production, and related editorial behavior behind the optional language-service boundary.
Objective
Expose PBS editor assistance through FrontendProvider.languageService() while preserving current PBS behavior and keeping FrontendProvider.compiler() sufficient for compilation.
Dependencies
- Accepted decision:
DEC-0041. PLN-0107should define the documented boundary before final implementation review.- Existing PBS editorial support classes and LSP bridge behavior.
Scope
- Introduce or extend PBS language-service implementation under the PBS frontend module.
- Make
PBSFrontendProvider.languageService()return a PBS language service. - Keep
PBSFrontendProvider.compiler()unchanged as the required compiler path. - Move PBS-specific editorial calls into the PBS language-service implementation or adapter.
- Preserve existing completion, hover, signature help, semantic token, and documentation behavior for PBS.
Non-Goals
- Change PBS language semantics.
- Add new editor features.
- Rewrite the LSP protocol layer.
- Implement capability-aware LSP fallbacks; that belongs to
PLN-0109. - Split every editor feature into independent top-level service interfaces unless strictly required by local implementation shape.
Execution Method
- Inspect
prometeu-compiler/prometeu-frontend-api/src/main/java/p/studio/compiler/services/FrontendLanguageService.javaand define the minimum capability accessors needed by current PBS editor behavior. - Add a PBS language-service implementation in the PBS frontend module, colocated with existing PBS editorial support classes.
- Move or delegate completion, hover, signature help, and semantic token behavior from PBS-specific bridge code into the PBS language-service implementation without changing output models unless the boundary requires neutral compiler-facing DTOs.
- Update
prometeu-compiler/frontends/prometeu-frontend-pbs/src/main/java/p/studio/compiler/PBSFrontendProvider.javato returnOptional.of(pbsLanguageService). - Keep compile/analyze/build paths independent of
languageService(). - Preserve current PBS editorial tests by redirecting setup to the new PBS language-service surface where appropriate.
Acceptance Criteria
- PBS provider exposes a non-empty optional language service.
- PBS compilation still works when only
compiler()is used. - PBS completion, hover, signature help, semantic tokens, and documentation behavior remain equivalent to current behavior.
- Common compiler modules do not instantiate PBS editorial implementation directly.
- No new requirement is introduced for non-PBS frontends to implement editor assistance.
Tests
- Run PBS frontend tests covering editorial support.
- Run LSP tests that currently assert PBS completion, hover, signature help, semantic tokens, and documentation behavior.
- Add or update provider tests proving PBS has a language service while a compile-only provider can omit it.
- Run targeted Gradle tasks for changed compiler frontend and LSP modules.
Affected Artifacts
prometeu-compiler/prometeu-frontend-api/src/main/java/p/studio/compiler/services/FrontendLanguageService.javaprometeu-compiler/frontends/prometeu-frontend-pbs/src/main/java/p/studio/compiler/PBSFrontendProvider.java- PBS editorial support classes under
prometeu-compiler/frontends/prometeu-frontend-pbs/src/main/java - Related PBS frontend tests.
- Related LSP bridge tests.