implements PLN-0137 (1/7) diagnostic-source
Lock DSC-0066 on Q1-A and Q2-A. Retire AGD-0048 through AGD-0056 into AGD-0069, DEC-0058, and PLN-0137. Published editor diagnostics use the bound frontend language id as source. For PBS that is pbs. The stable compiler code stays in code and is not copied into source. Related locations, phase, and repair payload stay unpublished.
This commit is contained in:
parent
20adc196d9
commit
099857b636
@ -1,4 +1,5 @@
|
||||
{"type":"meta","next_id":{"DSC":66,"AGD":69,"DEC":58,"PLN":137,"LSN":74,"CLSN":1}}
|
||||
{"type":"meta","next_id":{"DSC":67,"AGD":70,"DEC":59,"PLN":138,"LSN":74,"CLSN":1}}
|
||||
{"type":"discussion","id":"DSC-0066","status":"in_progress","ticket":"pbs-lsp-remaining-editor-surface","title":"PBS LSP Remaining Editor Surface","created_at":"2026-09-22","updated_at":"2026-09-22","tags":["studio","lsp","vscode","compiler-pbs","editor"],"agendas":[{"id":"AGD-0069","file":"AGD-0069-pbs-lsp-remaining-editor-surface.md","status":"accepted","created_at":"2026-09-22","updated_at":"2026-09-22"}],"decisions":[{"id":"DEC-0058","file":"DEC-0058-pbs-lsp-remaining-editor-surface.md","status":"accepted","created_at":"2026-09-22","updated_at":"2026-09-22","ref_agenda":"AGD-0069"}],"plans":[{"id":"PLN-0137","file":"PLN-0137-pbs-lsp-remaining-editor-surface.md","status":"in_progress","created_at":"2026-09-22","updated_at":"2026-09-22","ref_decisions":["DEC-0058"]}],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0065","status":"done","ticket":"multi-frontend-avoid-premature-abstractions","title":"Evitar abstracoes prematuras na preparacao multi-frontend","created_at":"2026-07-15","updated_at":"2026-09-19","tags":["compiler","compiler-general","studio","frontend","architecture","multi-frontend","simplicity"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0067","file":"discussion/lessons/DSC-0065-multi-frontend-avoid-premature-abstractions/LSN-0067-multi-frontend-phase-rejects-premature-infrastructure.md","status":"done","created_at":"2026-09-19","updated_at":"2026-09-19"}]}
|
||||
{"type":"discussion","id":"DSC-0064","status":"done","ticket":"multi-frontend-architectural-tests","title":"Testes arquiteturais para fronteiras multi-frontend","created_at":"2026-07-15","updated_at":"2026-09-19","tags":["compiler","compiler-general","studio","frontend","architecture","tests","multi-frontend"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0066","file":"discussion/lessons/DSC-0064-multi-frontend-architectural-tests/LSN-0066-archunit-guards-java-multi-frontend-boundaries.md","status":"done","created_at":"2026-09-19","updated_at":"2026-09-19"}]}
|
||||
{"type":"discussion","id":"DSC-0063","status":"done","ticket":"multi-frontend-synthetic-test-frontend","title":"Frontend sintetico de teste para provar neutralidade do pipeline","created_at":"2026-07-15","updated_at":"2026-09-19","tags":["compiler","compiler-general","frontend","tests","backend","multi-frontend"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0065","file":"discussion/lessons/DSC-0063-multi-frontend-synthetic-test-frontend/LSN-0065-synthetic-test-frontend-proves-pipeline-neutrality.md","status":"done","created_at":"2026-09-19","updated_at":"2026-09-19"}]}
|
||||
@ -11,15 +12,15 @@
|
||||
{"type":"discussion","id":"DSC-0056","status":"done","ticket":"multi-frontend-remove-pbs-branches","title":"Generalizar o contrato LSP/editorial para frontends","created_at":"2026-07-15","updated_at":"2026-07-15","tags":["compiler","compiler-general","compiler-pbs","studio","frontend","coupling","multi-frontend"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0058","file":"discussion/lessons/DSC-0056-multi-frontend-remove-pbs-branches/LSN-0058-generic-frontend-editorial-contract-for-lsp.md","status":"done","created_at":"2026-07-15","updated_at":"2026-07-15"}]}
|
||||
{"type":"discussion","id":"DSC-0055","status":"done","ticket":"multi-frontend-compiler-vs-language-services","title":"Separar compilacao de servicos editoriais de frontend","created_at":"2026-07-15","updated_at":"2026-07-15","tags":["compiler","compiler-general","studio","lsp","editor","frontend","multi-frontend"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0056","file":"discussion/lessons/DSC-0055-multi-frontend-compiler-vs-language-services/LSN-0056-compile-first-frontends-with-optional-editorial-capabilities.md","status":"done","created_at":"2026-07-15","updated_at":"2026-07-15"}]}
|
||||
{"type":"discussion","id":"DSC-0054","status":"done","ticket":"multi-frontend-provider-contract","title":"Introduzir provider completo de frontend","created_at":"2026-07-15","updated_at":"2026-07-15","tags":["compiler","compiler-general","studio","frontend","registry","multi-frontend"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0055","file":"discussion/lessons/DSC-0054-multi-frontend-provider-contract/LSN-0055-static-frontend-providers-before-plugin-architecture.md","status":"done","created_at":"2026-07-15","updated_at":"2026-07-15"}]}
|
||||
{"type":"discussion","id":"DSC-0053","status":"open","ticket":"pbs-lsp-call-and-type-hierarchy","title":"PBS LSP Call and Type Hierarchy","created_at":"2026-07-15","updated_at":"2026-07-15","tags":["studio","lsp","vscode","compiler-pbs","editor","call-hierarchy","type-hierarchy"],"agendas":[{"id":"AGD-0056","file":"AGD-0056-pbs-lsp-call-and-type-hierarchy.md","status":"open","created_at":"2026-07-15","updated_at":"2026-07-15"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0052","status":"open","ticket":"pbs-lsp-document-links","title":"PBS LSP Document Links","created_at":"2026-07-15","updated_at":"2026-07-15","tags":["studio","lsp","vscode","compiler-pbs","editor","document-links","imports"],"agendas":[{"id":"AGD-0055","file":"AGD-0055-pbs-lsp-document-links.md","status":"open","created_at":"2026-07-15","updated_at":"2026-07-15"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0051","status":"open","ticket":"pbs-lsp-diagnostics-ux","title":"PBS LSP Diagnostics UX","created_at":"2026-07-15","updated_at":"2026-07-15","tags":["studio","lsp","vscode","compiler-pbs","editor","diagnostics","ux"],"agendas":[{"id":"AGD-0054","file":"AGD-0054-pbs-lsp-diagnostics-ux.md","status":"open","created_at":"2026-07-15","updated_at":"2026-07-15"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0050","status":"open","ticket":"pbs-lsp-folding-and-selection-ranges","title":"PBS LSP Folding and Selection Ranges","created_at":"2026-07-15","updated_at":"2026-07-15","tags":["studio","lsp","vscode","compiler-pbs","editor","folding","selection-range"],"agendas":[{"id":"AGD-0053","file":"AGD-0053-pbs-lsp-folding-and-selection-ranges.md","status":"open","created_at":"2026-07-15","updated_at":"2026-07-15"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0049","status":"open","ticket":"pbs-lsp-completion-depth","title":"PBS LSP Completion Depth","created_at":"2026-07-15","updated_at":"2026-07-15","tags":["studio","lsp","vscode","compiler-pbs","editor","completion"],"agendas":[{"id":"AGD-0052","file":"AGD-0052-pbs-lsp-completion-depth.md","status":"open","created_at":"2026-07-15","updated_at":"2026-07-15"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0048","status":"open","ticket":"pbs-lsp-performance-cache-and-snapshots","title":"PBS LSP Performance Cache and Snapshots","created_at":"2026-07-15","updated_at":"2026-07-15","tags":["studio","lsp","vscode","compiler-pbs","editor","performance","caching"],"agendas":[{"id":"AGD-0051","file":"AGD-0051-pbs-lsp-performance-cache-and-snapshots.md","status":"open","created_at":"2026-07-15","updated_at":"2026-07-15"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0047","status":"open","ticket":"pbs-lsp-semantic-tokens-semantic-classification","title":"PBS LSP Semantic Token Classification","created_at":"2026-07-15","updated_at":"2026-07-15","tags":["studio","lsp","vscode","compiler-pbs","editor","semantic-tokens"],"agendas":[{"id":"AGD-0050","file":"AGD-0050-pbs-lsp-semantic-token-classification.md","status":"open","created_at":"2026-07-15","updated_at":"2026-07-15"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0046","status":"open","ticket":"pbs-lsp-import-assistance","title":"PBS LSP Import Assistance","created_at":"2026-07-15","updated_at":"2026-07-15","tags":["studio","lsp","vscode","compiler-pbs","editor","imports","completion"],"agendas":[{"id":"AGD-0049","file":"AGD-0049-pbs-lsp-import-assistance.md","status":"open","created_at":"2026-07-15","updated_at":"2026-07-15"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0045","status":"open","ticket":"pbs-lsp-formatting","title":"PBS LSP Formatting","created_at":"2026-07-15","updated_at":"2026-07-15","tags":["studio","lsp","vscode","compiler-pbs","editor","formatting"],"agendas":[{"id":"AGD-0048","file":"AGD-0048-pbs-lsp-formatting.md","status":"open","created_at":"2026-07-15","updated_at":"2026-07-15"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0053","status":"abandoned","ticket":"pbs-lsp-call-and-type-hierarchy","title":"PBS LSP Call and Type Hierarchy","created_at":"2026-07-15","updated_at":"2026-09-22","tags":["studio","lsp","vscode","compiler-pbs","editor","call-hierarchy","type-hierarchy"],"agendas":[{"id":"AGD-0056","file":"AGD-0056-pbs-lsp-call-and-type-hierarchy.md","status":"abandoned","created_at":"2026-07-15","updated_at":"2026-09-22","_override_reason":"Merged into DSC-0066 / AGD-0069 on 2026-09-22. Separate agendas were stale against the shipped LSP. Explicit user request to consolidate before any decision."}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0052","status":"abandoned","ticket":"pbs-lsp-document-links","title":"PBS LSP Document Links","created_at":"2026-07-15","updated_at":"2026-09-22","tags":["studio","lsp","vscode","compiler-pbs","editor","document-links","imports"],"agendas":[{"id":"AGD-0055","file":"AGD-0055-pbs-lsp-document-links.md","status":"abandoned","created_at":"2026-07-15","updated_at":"2026-09-22","_override_reason":"Merged into DSC-0066 / AGD-0069 on 2026-09-22. Separate agendas were stale against the shipped LSP. Explicit user request to consolidate before any decision."}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0051","status":"abandoned","ticket":"pbs-lsp-diagnostics-ux","title":"PBS LSP Diagnostics UX","created_at":"2026-07-15","updated_at":"2026-09-22","tags":["studio","lsp","vscode","compiler-pbs","editor","diagnostics","ux"],"agendas":[{"id":"AGD-0054","file":"AGD-0054-pbs-lsp-diagnostics-ux.md","status":"abandoned","created_at":"2026-07-15","updated_at":"2026-09-22","_override_reason":"Merged into DSC-0066 / AGD-0069 on 2026-09-22. Separate agendas were stale against the shipped LSP. Explicit user request to consolidate before any decision."}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0050","status":"abandoned","ticket":"pbs-lsp-folding-and-selection-ranges","title":"PBS LSP Folding and Selection Ranges","created_at":"2026-07-15","updated_at":"2026-09-22","tags":["studio","lsp","vscode","compiler-pbs","editor","folding","selection-range"],"agendas":[{"id":"AGD-0053","file":"AGD-0053-pbs-lsp-folding-and-selection-ranges.md","status":"abandoned","created_at":"2026-07-15","updated_at":"2026-09-22","_override_reason":"Merged into DSC-0066 / AGD-0069 on 2026-09-22. Separate agendas were stale against the shipped LSP. Explicit user request to consolidate before any decision."}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0049","status":"abandoned","ticket":"pbs-lsp-completion-depth","title":"PBS LSP Completion Depth","created_at":"2026-07-15","updated_at":"2026-09-22","tags":["studio","lsp","vscode","compiler-pbs","editor","completion"],"agendas":[{"id":"AGD-0052","file":"AGD-0052-pbs-lsp-completion-depth.md","status":"abandoned","created_at":"2026-07-15","updated_at":"2026-09-22","_override_reason":"Merged into DSC-0066 / AGD-0069 on 2026-09-22. Separate agendas were stale against the shipped LSP. Explicit user request to consolidate before any decision."}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0048","status":"abandoned","ticket":"pbs-lsp-performance-cache-and-snapshots","title":"PBS LSP Performance Cache and Snapshots","created_at":"2026-07-15","updated_at":"2026-09-22","tags":["studio","lsp","vscode","compiler-pbs","editor","performance","caching"],"agendas":[{"id":"AGD-0051","file":"AGD-0051-pbs-lsp-performance-cache-and-snapshots.md","status":"abandoned","created_at":"2026-07-15","updated_at":"2026-09-22","_override_reason":"Merged into DSC-0066 / AGD-0069 on 2026-09-22. Separate agendas were stale against the shipped LSP. Explicit user request to consolidate before any decision."}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0047","status":"abandoned","ticket":"pbs-lsp-semantic-tokens-semantic-classification","title":"PBS LSP Semantic Token Classification","created_at":"2026-07-15","updated_at":"2026-09-22","tags":["studio","lsp","vscode","compiler-pbs","editor","semantic-tokens"],"agendas":[{"id":"AGD-0050","file":"AGD-0050-pbs-lsp-semantic-token-classification.md","status":"abandoned","created_at":"2026-07-15","updated_at":"2026-09-22","_override_reason":"Merged into DSC-0066 / AGD-0069 on 2026-09-22. Separate agendas were stale against the shipped LSP. Explicit user request to consolidate before any decision."}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0046","status":"abandoned","ticket":"pbs-lsp-import-assistance","title":"PBS LSP Import Assistance","created_at":"2026-07-15","updated_at":"2026-09-22","tags":["studio","lsp","vscode","compiler-pbs","editor","imports","completion"],"agendas":[{"id":"AGD-0049","file":"AGD-0049-pbs-lsp-import-assistance.md","status":"abandoned","created_at":"2026-07-15","updated_at":"2026-09-22","_override_reason":"Merged into DSC-0066 / AGD-0069 on 2026-09-22. Separate agendas were stale against the shipped LSP. Explicit user request to consolidate before any decision."}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0045","status":"abandoned","ticket":"pbs-lsp-formatting","title":"PBS LSP Formatting","created_at":"2026-07-15","updated_at":"2026-09-22","tags":["studio","lsp","vscode","compiler-pbs","editor","formatting"],"agendas":[{"id":"AGD-0048","file":"AGD-0048-pbs-lsp-formatting.md","status":"abandoned","created_at":"2026-07-15","updated_at":"2026-09-22","_override_reason":"Merged into DSC-0066 / AGD-0069 on 2026-09-22. Separate agendas were stale against the shipped LSP. Explicit user request to consolidate before any decision."}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0044","status":"done","ticket":"pbs-lsp-code-actions","title":"PBS LSP Code Actions and Quick Fixes","created_at":"2026-07-15","updated_at":"2026-09-22","tags":["studio","lsp","vscode","compiler-pbs","editor","code-actions","quick-fix"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0073","file":"discussion/lessons/DSC-0044-pbs-lsp-code-actions/LSN-0073-pbs-quick-fixes-are-frontend-repairs-transported-by-the-lsp.md","status":"done","created_at":"2026-09-22","updated_at":"2026-09-22"}]}
|
||||
{"type":"discussion","id":"DSC-0043","status":"done","ticket":"pbs-lsp-rename-symbol","title":"PBS LSP Rename Symbol","created_at":"2026-07-15","updated_at":"2026-09-22","tags":["studio","lsp","vscode","compiler-pbs","editor","rename"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0072","file":"discussion/lessons/DSC-0043-pbs-lsp-rename-symbol/LSN-0072-pbs-rename-is-a-validated-physical-workspace-edit.md","status":"done","created_at":"2026-09-22","updated_at":"2026-09-22"}]}
|
||||
{"type":"discussion","id":"DSC-0042","status":"done","ticket":"pbs-lsp-workspace-symbols","title":"PBS LSP Workspace Symbols","created_at":"2026-07-15","updated_at":"2026-09-21","tags":["studio","lsp","vscode","compiler-pbs","editor","workspace-symbols"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0071","file":"discussion/lessons/DSC-0042-pbs-lsp-workspace-symbols/LSN-0071-pbs-workspace-symbols-are-a-physical-named-declaration-search.md","status":"done","created_at":"2026-09-21","updated_at":"2026-09-21"}]}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
id: AGD-0048
|
||||
ticket: pbs-lsp-formatting
|
||||
title: PBS LSP Formatting
|
||||
status: open
|
||||
status: abandoned
|
||||
created: 2026-07-15
|
||||
resolved:
|
||||
decision:
|
||||
@ -55,7 +55,7 @@ Formatter decision should define canonical style before implementation.
|
||||
|
||||
## Resolution
|
||||
|
||||
Ainda em aberto.
|
||||
Aposentada em 2026-09-22. O tema foi consolidado em [AGD-0069](AGD-0069-pbs-lsp-remaining-editor-surface.md) / DSC-0066. Este texto não é normativo.
|
||||
|
||||
## Next Step
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
id: AGD-0049
|
||||
ticket: pbs-lsp-import-assistance
|
||||
title: PBS LSP Import Assistance
|
||||
status: open
|
||||
status: abandoned
|
||||
created: 2026-07-15
|
||||
resolved:
|
||||
decision:
|
||||
@ -55,7 +55,7 @@ This should be coordinated with code actions and formatter.
|
||||
|
||||
## Resolution
|
||||
|
||||
Ainda em aberto.
|
||||
Aposentada em 2026-09-22. O tema foi consolidado em [AGD-0069](AGD-0069-pbs-lsp-remaining-editor-surface.md) / DSC-0066. Este texto não é normativo.
|
||||
|
||||
## Next Step
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
id: AGD-0050
|
||||
ticket: pbs-lsp-semantic-tokens-semantic-classification
|
||||
title: PBS LSP Semantic Token Classification
|
||||
status: open
|
||||
status: abandoned
|
||||
created: 2026-07-15
|
||||
resolved:
|
||||
decision:
|
||||
@ -55,7 +55,7 @@ This can proceed independently but benefits from LSP snapshot/cache work.
|
||||
|
||||
## Resolution
|
||||
|
||||
Ainda em aberto.
|
||||
Aposentada em 2026-09-22. O tema foi consolidado em [AGD-0069](AGD-0069-pbs-lsp-remaining-editor-surface.md) / DSC-0066. Este texto não é normativo.
|
||||
|
||||
## Next Step
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
id: AGD-0051
|
||||
ticket: pbs-lsp-performance-cache-and-snapshots
|
||||
title: PBS LSP Performance Cache and Snapshots
|
||||
status: open
|
||||
status: abandoned
|
||||
created: 2026-07-15
|
||||
resolved:
|
||||
decision:
|
||||
@ -55,7 +55,7 @@ Define snapshot lifecycle, invalidation triggers, and cancellation policy.
|
||||
|
||||
## Resolution
|
||||
|
||||
Ainda em aberto.
|
||||
Aposentada em 2026-09-22. O tema foi consolidado em [AGD-0069](AGD-0069-pbs-lsp-remaining-editor-surface.md) / DSC-0066. Este texto não é normativo.
|
||||
|
||||
## Next Step
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
id: AGD-0052
|
||||
ticket: pbs-lsp-completion-depth
|
||||
title: PBS LSP Completion Depth
|
||||
status: open
|
||||
status: abandoned
|
||||
created: 2026-07-15
|
||||
resolved:
|
||||
decision:
|
||||
@ -55,7 +55,7 @@ Define completion contexts and ranking before adding snippets or resolve.
|
||||
|
||||
## Resolution
|
||||
|
||||
Ainda em aberto.
|
||||
Aposentada em 2026-09-22. O tema foi consolidado em [AGD-0069](AGD-0069-pbs-lsp-remaining-editor-surface.md) / DSC-0066. Este texto não é normativo.
|
||||
|
||||
## Next Step
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
id: AGD-0053
|
||||
ticket: pbs-lsp-folding-and-selection-ranges
|
||||
title: PBS LSP Folding and Selection Ranges
|
||||
status: open
|
||||
status: abandoned
|
||||
created: 2026-07-15
|
||||
resolved:
|
||||
decision:
|
||||
@ -55,7 +55,7 @@ This is an editor UX feature with low semantic dependency and can be planned ind
|
||||
|
||||
## Resolution
|
||||
|
||||
Ainda em aberto.
|
||||
Aposentada em 2026-09-22. O tema foi consolidado em [AGD-0069](AGD-0069-pbs-lsp-remaining-editor-surface.md) / DSC-0066. Este texto não é normativo.
|
||||
|
||||
## Next Step
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
id: AGD-0054
|
||||
ticket: pbs-lsp-diagnostics-ux
|
||||
title: PBS LSP Diagnostics UX
|
||||
status: open
|
||||
status: abandoned
|
||||
created: 2026-07-15
|
||||
resolved:
|
||||
decision:
|
||||
@ -55,7 +55,7 @@ This agenda should inform code actions before quick fixes become broad.
|
||||
|
||||
## Resolution
|
||||
|
||||
Ainda em aberto.
|
||||
Aposentada em 2026-09-22. O tema foi consolidado em [AGD-0069](AGD-0069-pbs-lsp-remaining-editor-surface.md) / DSC-0066. Este texto não é normativo.
|
||||
|
||||
## Next Step
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
id: AGD-0055
|
||||
ticket: pbs-lsp-document-links
|
||||
title: PBS LSP Document Links
|
||||
status: open
|
||||
status: abandoned
|
||||
created: 2026-07-15
|
||||
resolved:
|
||||
decision:
|
||||
@ -55,7 +55,7 @@ Coordinate stdlib target handling with go-to-definition.
|
||||
|
||||
## Resolution
|
||||
|
||||
Ainda em aberto.
|
||||
Aposentada em 2026-09-22. O tema foi consolidado em [AGD-0069](AGD-0069-pbs-lsp-remaining-editor-surface.md) / DSC-0066. Este texto não é normativo.
|
||||
|
||||
## Next Step
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
id: AGD-0056
|
||||
ticket: pbs-lsp-call-and-type-hierarchy
|
||||
title: PBS LSP Call and Type Hierarchy
|
||||
status: open
|
||||
status: abandoned
|
||||
created: 2026-07-15
|
||||
resolved:
|
||||
decision:
|
||||
@ -55,7 +55,7 @@ This should wait until definition and references are complete.
|
||||
|
||||
## Resolution
|
||||
|
||||
Ainda em aberto.
|
||||
Aposentada em 2026-09-22. O tema foi consolidado em [AGD-0069](AGD-0069-pbs-lsp-remaining-editor-surface.md) / DSC-0066. Este texto não é normativo.
|
||||
|
||||
## Next Step
|
||||
|
||||
|
||||
@ -0,0 +1,127 @@
|
||||
---
|
||||
id: AGD-0069
|
||||
ticket: pbs-lsp-remaining-editor-surface
|
||||
title: PBS LSP Remaining Editor Surface
|
||||
status: accepted
|
||||
created: 2026-09-22
|
||||
resolved:
|
||||
decision:
|
||||
tags: [studio, lsp, vscode, compiler-pbs, editor]
|
||||
---
|
||||
|
||||
## Pain
|
||||
|
||||
Domain owner: `studio`
|
||||
|
||||
Nove agendas de LSP (AGD-0048 a AGD-0056, discussões DSC-0045 a DSC-0053) continuavam abertas como se cada tema partisse do zero. O servidor já anuncia hover, completion, signature help, definition, references, document symbols, workspace symbols, rename, quick fix e semantic tokens. Várias perguntas dessas agendas já foram respondidas pelo código, ou pedem trabalho cuja premissa deixou de existir. Decidir uma a uma repetiria debate vencido e produziria nove decisions para uma superfície só.
|
||||
|
||||
## Context
|
||||
|
||||
Esta agenda substitui, sem herdar o texto como normativo:
|
||||
|
||||
| Agenda aposentada | Discussão | O que o código já fez com o tema |
|
||||
| --- | --- | --- |
|
||||
| AGD-0048 formatting | DSC-0045 | Não há `documentFormattingProvider`, `rangeFormatting` nem `onTypeFormatting`. |
|
||||
| AGD-0049 import assistance | DSC-0046 | Não há auto-import nem organize imports. Imports existem como `ImportDecl` / `ModuleRef`. |
|
||||
| AGD-0050 semantic tokens | DSC-0047 | Tokens full-document já saem de `PBSSemanticTokenProvider`. |
|
||||
| AGD-0051 cache e snapshots | DSC-0048 | Cada pedido reconstrói análise. References e rename já existem sem cache. |
|
||||
| AGD-0052 completion depth | DSC-0049 | Completion já existe, eager, gatilho `.`, `resolveProvider` falso. |
|
||||
| AGD-0053 folding e selection | DSC-0050 | Não há folding nem selection range. Outline não é folding. |
|
||||
| AGD-0054 diagnostics UX | DSC-0051 | Diagnóstico já publica range, severity, message e code. Quick fix já casa code + range. |
|
||||
| AGD-0055 document links | DSC-0052 | Não há `documentLinkProvider`. Definition já recusa alvo que não seja arquivo físico. |
|
||||
| AGD-0056 call e type hierarchy | DSC-0053 | Não há call hierarchy nem type hierarchy. References não são grafo de chamadas. |
|
||||
|
||||
O que o initialize anuncia hoje, em `Lsp4jProtocolMessageMapper`: sync full, hover, completion, signature help, definition, references, document symbol, workspace symbol, rename com prepare, code action só `quickfix`, semantic tokens full. Nada além disso.
|
||||
|
||||
Fatos que esta agenda trata como fechados, porque o código já os fixou:
|
||||
|
||||
1. Análise de LSP é local ao pedido. `CompilerLanguageServiceBridge.analyzeDocument` monta um `AnalysisSnapshot` novo com overlay do documento aberto. Não há cache de projeto, cancelamento nem reanálise em background. References, rename e workspace symbols já foram entregues em cima desse modelo. Cache não é pré-requisito de mais nenhuma feature desta onda.
|
||||
2. Semantic tokens não estão por fazer. `PBSSemanticTokenProvider` lexa o arquivo, classifica token léxico direto e classifica identificador por token vizinho, mapa de declaração do próprio arquivo e kinds importados da stdlib. A legenda é `PbsSemanticKind`. Não existem keys de field, local ou parameter. Arquivo quebrado continua tokenizável porque o lexer não depende do sucesso semântico.
|
||||
3. Completion não está por fazer. `PbsEditorialSupportService.completion` faz duas coisas: se o token anterior é `.`, membros do tipo; senão keywords, parâmetros, locals, símbolos importados e top-level do arquivo. Documentação volta no próprio item. Não há snippets, não há `completionItem/resolve`, não há score de ranking.
|
||||
4. Diagnóstico não carrega remediação. Spec 23 §8.3 e o quick fix já entregue exigem que o reparo não seja campo do diagnóstico nem venha de parse da mensagem. O mapper copia range, severity, message e code. O campo `source` está errado: `toBaselineIssue` grava o code estável também em `source` (ou `"Prometeu Studio"` quando o code vem vazio). Não há `relatedInformation`.
|
||||
5. Não há um code de diagnóstico cujo significado seja "nome não importado". Os codes de nome não resolvido que existem são casos pontuais (`E_SEM_CONST_UNRESOLVED_REFERENCE`, `E_SEM_APPLY_UNRESOLVED_OVERLOAD`, `E_SEM_ASSIGN_TARGET_UNRESOLVED`, `E_SEM_EXEC_LOWERING_UNRESOLVED_CALLEE`). Inserir import em cima deles mistura typo com import faltando.
|
||||
6. Definition, references e rename só apontam arquivo físico. Alvo virtual de stdlib não é destino de navegação.
|
||||
7. A política de indentação em `LSN-0033` pertence ao editor embutido removido. Não é estilo canônico de PBS e não manda no formatter do LSP.
|
||||
8. Outline, workspace symbols, rename e quick fix não absorvem folding, links, hierarquia nem organize imports.
|
||||
|
||||
Fora desta onda, de propósito:
|
||||
|
||||
- cache de snapshot, cancelamento e reanálise em background;
|
||||
- type hierarchy, implementações de contract e grafo de host/intrinsic como feature separada;
|
||||
- `completionItem/resolve`, snippets e modelo de ranking;
|
||||
- formatting por range ou on-type;
|
||||
- organize imports e quick fix de import faltando;
|
||||
- `relatedInformation`, fase do compilador dentro do diagnóstico, e campo de remediação;
|
||||
- keys novas de semantic token;
|
||||
- links para assets, addressables, docs ou URI virtual de stdlib.
|
||||
|
||||
## Open Questions
|
||||
|
||||
- [x] **Q1. Qual pacote o plano único executa?** Travada em 2026-09-22: **A**.
|
||||
- **A.** Os sete passos da recomendação, nesta ordem, um commit cada. Inclui formatter e call hierarchy.
|
||||
- **B.** Os mesmos passos sem o 7 (call hierarchy fica fora).
|
||||
- **C.** Os mesmos passos sem o 4 (formatter fica fora até existir estilo aceito).
|
||||
- **D.** Só os passos que não escolhem estilo nem grafo novo: 1, 2, 3 e 6.
|
||||
|
||||
- [x] **Q2. Se o passo 4 entrar, qual estilo o formatter aplica?** Travada em 2026-09-22: **A**.
|
||||
- **A.** Reimpressão do token stream. Não reordena declarações. Não junta nem parte linhas para embelezar. Indentação de 4 espaços só onde o aninhamento de chaves, parênteses ou bloco muda. Interior de text block `Doc` intocado. Comentário permanece na linha do token a que já estava preso. Documento inteiro apenas.
|
||||
- **B.** Não travar estilo. O passo 4 sai do plano mesmo se Q1 escolher A ou B.
|
||||
|
||||
## Options
|
||||
|
||||
### Option A - Uma onda, um plano, commits por passo
|
||||
|
||||
- **Approach:** Uma decision e um plan. O plan copia os passos abaixo que Q1/Q2 deixarem vivos. Cada passo é um commit na mesma branch. Lesson e housekeep só depois do último passo.
|
||||
- **Pro:** O código atual vira o piso. Tema vencido não vira decision. A série continua um commit por entrega, sem nove discussões.
|
||||
- **Con:** Formatter e call hierarchy ainda são maiores que links ou o rótulo de `source`.
|
||||
- **Maintainability:** Forte se cada passo não reabrir cache, type hierarchy ou auto-import.
|
||||
|
||||
### Option B - Só o que já não tem escolha de produto
|
||||
|
||||
- **Approach:** Mesma discussão única, mas o plano fica em diagnóstico `source`, document links físicos, folding/selection e completion de module ref.
|
||||
- **Pro:** Evita travar estilo e evita um grafo de chamadas novo.
|
||||
- **Con:** Formatting e call hierarchy continuam sem dono depois de aposentar as agendas velhas.
|
||||
- **Maintainability:** Boa, e menor.
|
||||
|
||||
## Tradeoffs
|
||||
|
||||
Juntar as nove agendas num plano só é seguro porque o piso já está no código. O risco é enfiar de volta, como "passo pequeno", cache, contrato novo de diagnóstico ou auto-import. Esses três não cabem: o primeiro perdeu a premissa, o segundo quebra o quick fix já aceito, o terceiro não tem diagnóstico estável para se pendurar.
|
||||
|
||||
Formatter é o único passo que ainda escolhe estilo. Por isso ele é um passo isolado: recusar Q2 tira só esse commit. Call hierarchy não pode reusar o índice de references; references são usos da mesma identidade, não chamadas. Ou entra como caminhada de `CallExpr` no último commit, ou fica de fora.
|
||||
|
||||
## Recommendation
|
||||
|
||||
Aceitar Option A com Q1-A e Q2-A.
|
||||
|
||||
Forma do plano, obrigatória:
|
||||
|
||||
- uma decision e um plan desta discussão;
|
||||
- branch `dev/pbs-lsp-remaining-editor-surface`, não uma branch por passo e não commit em `master`;
|
||||
- cada passo vivo vira um commit `implements PLN-NNNN (k/N) <slug>`;
|
||||
- sem push;
|
||||
- spec 23 §8.3 só ganha parágrafo do passo que a superfície realmente passa a anunciar;
|
||||
- lesson e `discussion housekeep` só no commit do último passo.
|
||||
|
||||
Passos, nesta ordem. Passo que Q1 ou Q2 tirar não é renumerado no meio da implementação: o plan lista só os que sobreviverem, em ordem.
|
||||
|
||||
1. **Diagnostic source.** `source` passa a ser o language id do frontend (`pbs`). `code` continua o code estável. Sem `relatedInformation`, sem fase, sem data de reparo.
|
||||
2. **Document links.** Link só no span do `ModuleRef` de um import cujo destino já resolve para arquivo físico regular. Sem destino físico, sem link. Stdlib virtual, asset e doc ficam de fora.
|
||||
3. **Folding e selection range.** Span de AST quando a árvore recuperada tem o nó: declaração top-level (`fn`, `struct`, `service`, `contract`, `enum`, `error`, `callback`, `host`), corpo, lista de parâmetros e text block `Doc`. Fallback de token só para chave, parêntese ou text block que a árvore não cobre. Selection, do interno para o externo: identificador, lista de argumento ou parâmetro, bloco ou text block, declaração. Lista vazia quando não houver range. Não reutilizar document symbols.
|
||||
4. **Formatting de documento inteiro.** Só se Q2 travar estilo. Sem range e sem on-type. Preserva comentário e interior de text block `Doc`. Não é pretty-printer de AST.
|
||||
5. **Overlay semântico em cima do token atual.** Não substituir `PBSSemanticTokenProvider`. Onde a mesma resolução de hover já nomeia o símbolo, trocar o kind fraco por um `PbsSemanticKind` que já existe. Falha, arquivo quebrado ou símbolo desconhecido mantém o token de hoje. Nenhuma key nova.
|
||||
6. **Completion de module ref.** No cursor dentro de `ModuleRef`, candidatos que o resolver atual já sabe nomear, módulo de projeto e stdlib. Continua eager. `resolveProvider` continua falso. Sem snippets e sem score novo. Fora de module ref, o completion atual não muda.
|
||||
7. **Call hierarchy.** Incoming e outgoing de função e método por caminhada de callsite na AST, não pelo índice de references. Cursor que não é callable devolve vazio. Sem type hierarchy e sem cache.
|
||||
|
||||
## Discussion
|
||||
|
||||
As agendas AGD-0048 a AGD-0056 foram aposentadas a pedido, neste consolidado, antes de qualquer accept. O texto delas não é decisão. A CLI `discussion` não tem comando de abandon; a aposentadoria ficou no índice e no frontmatter, com a lacuna registrada para um comando futuro.
|
||||
|
||||
Não aceitar esta agenda até Q1 e Q2 terem resposta explícita. A recomendação é o pacote, não um convite para preencher o resto na implementação.
|
||||
|
||||
## Resolution
|
||||
|
||||
Q1-A e Q2-A travados pelo usuário em 2026-09-22. O pacote da recomendação é a escolha que a decision torna normativa.
|
||||
|
||||
## Next Step
|
||||
|
||||
Decision aceita e plan desta discussão. Implementar os sete passos em série, um commit cada.
|
||||
@ -0,0 +1,78 @@
|
||||
---
|
||||
id: DEC-0058
|
||||
ticket: pbs-lsp-remaining-editor-surface
|
||||
title: PBS LSP remaining editor surface
|
||||
status: accepted
|
||||
created: 2026-09-22
|
||||
ref_agenda: AGD-0069
|
||||
tags: [studio, lsp, vscode, compiler-pbs, editor]
|
||||
---
|
||||
|
||||
## Context
|
||||
|
||||
AGD-0069 consolidou AGD-0048 a AGD-0056. Essas agendas foram aposentadas e não são normativas. O usuário travou Q1-A e Q2-A em 2026-09-22.
|
||||
|
||||
O LSP já anuncia hover, completion, signature help, definition, references, document symbols, workspace symbols, rename, quick fix e semantic tokens full. Cada pedido reconstrói a análise. Definition, references e rename só devolvem arquivo físico. Quick fix é um `WorkspaceEdit` produzido pelo frontend, casado por code e range, sem remediação dentro do diagnóstico. `PBSSemanticTokenProvider` já classifica o documento a partir do lexer. Completion já cobre membro depois de `.` e o contexto geral, com documentação no próprio item e sem `resolve`.
|
||||
|
||||
O que falta é a superfície desta decision. O campo `source` do diagnóstico publicado está errado: hoje recebe o code estável, ou `"Prometeu Studio"` quando o code vem vazio.
|
||||
|
||||
## Decision
|
||||
|
||||
A discussão DSC-0066 tem uma decision e um plan. O plan executa sete passos, nesta ordem, um commit cada, na branch `dev/pbs-lsp-remaining-editor-surface`. Lesson e housekeep acontecem só no commit do último passo. Não há push nesta decision.
|
||||
|
||||
O frontend produz o resultado editorial. O LSP transporta. O LSP MUST NOT inventar reparo, link, range, formatação, token ou chamada que o frontend não devolveu. Capacidade ausente MUST NOT ser anunciada e MUST devolver lista vazia, não erro de protocolo.
|
||||
|
||||
### 1. Diagnostic source
|
||||
|
||||
O `source` de um diagnóstico editorial publicado MUST ser o `languageId` do `LspProjectContext` daquele pedido. Numa sessão PBS esse valor é `pbs`. O `code` MUST continuar o code estável do diagnóstico do compilador, vazio quando o compilador não tem code. O LSP MUST NOT copiar o code para `source`. O LSP MUST NOT publicar `relatedInformation`, fase do compilador ou payload de reparo nesse diagnóstico.
|
||||
|
||||
### 2. Document links
|
||||
|
||||
O servidor MUST anunciar `documentLink` só para esta capacidade. Cada link MUST cobrir o span do `ModuleRef` de um import cujo destino o resolver atual já entrega como arquivo físico regular. Sem arquivo físico, MUST NOT haver link. Stdlib virtual, asset, addressable, doc e URI sintético MUST NOT ser alvo. O link MUST NOT substituir definition.
|
||||
|
||||
### 3. Folding e selection range
|
||||
|
||||
O servidor MUST anunciar folding range e selection range. Range de declaração top-level (`fn`, `struct`, `service`, `contract`, `enum`, `error`, `callback`, `host`), corpo, lista de parâmetros e text block `Doc` MUST vir do span da árvore recuperada quando o nó existe. Chave, parêntese ou text block que a árvore não cobre MUST usar fallback de token. Selection, do interno para o externo, MUST ser: identificador, lista de argumento ou parâmetro, bloco ou text block, declaração. Sem range, a resposta MUST ser lista vazia. Document symbols MUST NOT ser reutilizados como folding.
|
||||
|
||||
### 4. Formatting
|
||||
|
||||
O servidor MUST anunciar formatting só de documento inteiro. Range formatting e on-type formatting MUST NOT ser anunciados. O formatter MUST reimprimir o token stream. MUST NOT reordenar declarações. MUST NOT juntar ou partir linhas para embelezar. Indentação MUST ser 4 espaços, aplicada só onde o aninhamento de chaves, parênteses ou bloco muda. O interior de text block `Doc` MUST permanecer intocado. Comentário MUST permanecer na linha do token a que já estava preso. Pretty-printer de AST MUST NOT ser o formatter. `LSN-0033` MUST NOT definir esse estilo.
|
||||
|
||||
### 5. Overlay semântico
|
||||
|
||||
`PBSSemanticTokenProvider` MUST continuar sendo a base lexical. Onde a mesma resolução usada pelo hover nomeia o símbolo e existe um `PbsSemanticKind` para esse símbolo, o token MUST trocar o kind fraco por esse kind existente. Falha de resolução, arquivo quebrado ou símbolo sem kind existente MUST manter o token que o provider emitiu. Esta onda MUST NOT criar key nova de semantic token.
|
||||
|
||||
### 6. Completion de module ref
|
||||
|
||||
Com o cursor dentro de um `ModuleRef`, completion MUST oferecer módulos de projeto e de stdlib que o resolver atual já sabe nomear. Fora de `ModuleRef`, o completion atual MUST permanecer. A resposta MUST continuar eager. `resolveProvider` MUST continuar falso. Snippets e score novo de ranking MUST NOT entrar.
|
||||
|
||||
### 7. Call hierarchy
|
||||
|
||||
O servidor MUST anunciar call hierarchy para função e método. Incoming e outgoing MUST ser uma caminhada de callsite na AST. O índice de references MUST NOT ser tratado como grafo de chamadas. Cursor que não está num callable MUST devolver vazio. Type hierarchy, implementações de contract e grafo separado de host ou intrinsic MUST NOT entrar.
|
||||
|
||||
### Fora desta decision
|
||||
|
||||
Esta decision MUST NOT pedir cache de snapshot, cancelamento, reanálise em background, organize imports, quick fix de import faltando, `completionItem/resolve`, formatting por range ou on-type, `relatedInformation`, ou links que não sejam o `ModuleRef` físico do passo 2.
|
||||
|
||||
## Rationale
|
||||
|
||||
Q1-A mantém os sete passos porque cada um cobre um buraco real e o piso já está implementado. Q2-A isola o estilo no formatter para ele não vazar para os outros passos. Cache deixou de ser pré-requisito quando references e rename saíram em análise local ao pedido. Auto-import não tem diagnóstico cujo significado seja "nome não importado". Type hierarchy não compartilha modelo com call hierarchy.
|
||||
|
||||
## Implications
|
||||
|
||||
Os passos 2, 3, 4 e 7 acrescentam capacidade anunciada. Os passos 1, 5 e 6 corrigem ou estendem capacidade que o servidor já anuncia. Nenhum passo reabre o contrato de quick fix nem o de definition física. Spec 23 §8.3 ganha o parágrafo do passo no commit daquele passo, não antes.
|
||||
|
||||
## Propagation Targets
|
||||
|
||||
- specs: `docs/specs/compiler/23. Compiler Pipeline Entry Points Specification.md` §8.3, um parágrafo por passo, no commit desse passo.
|
||||
- plans: um plan de DSC-0066 com os sete passos e um commit cada.
|
||||
- code: `prometeu-compiler` onde o frontend produz o resultado; `prometeu-lsp` onde o protocolo transporta. `source` do diagnóstico usa `LspProjectContext.languageId`.
|
||||
- tests: bridge e, quando a capacidade é nova, o anúncio no mapper. Arquivo quebrado continua coberto em token e folding.
|
||||
- docs: nenhum outro. A lesson em inglês só no housekeep do último passo.
|
||||
|
||||
## References
|
||||
|
||||
- Agenda: AGD-0069
|
||||
- Discussões aposentadas: DSC-0045 a DSC-0053, AGD-0048 a AGD-0056
|
||||
- Spec: `docs/specs/compiler/23. Compiler Pipeline Entry Points Specification.md` §8.3
|
||||
- Lessons de piso: LSN-0068, LSN-0069, LSN-0070, LSN-0071, LSN-0072, LSN-0073
|
||||
@ -0,0 +1,126 @@
|
||||
---
|
||||
id: PLN-0137
|
||||
ticket: pbs-lsp-remaining-editor-surface
|
||||
title: PBS LSP remaining editor surface
|
||||
status: in_progress
|
||||
created: 2026-09-22
|
||||
ref_decisions: [DEC-0058]
|
||||
tags: [studio, lsp, vscode, compiler-pbs, editor]
|
||||
---
|
||||
|
||||
## Briefing
|
||||
|
||||
DEC-0058 locks one PBS LSP wave on top of the editor surface that already ships. Seven steps run in order on `dev/pbs-lsp-remaining-editor-surface`. Each step is one commit. The frontend produces the editorial result. The LSP transports it and does not invent a second policy.
|
||||
|
||||
## Objective
|
||||
|
||||
Land diagnostic source, physical import document links, folding and selection ranges, full-document formatting, a semantic-token overlay, module-ref completion, and function/method call hierarchy. Leave snapshot cache, type hierarchy, auto-import, and resolve completion out.
|
||||
|
||||
## Dependencies
|
||||
|
||||
Shipped and unchanged by this plan: request-local analysis, physical definition and references, rename, document symbols, workspace symbols, quick fix (LSN-0073), `PBSSemanticTokenProvider`, and eager completion in `PbsEditorialSupportService`. Spec 23 §8.3 is the only normative doc updated, one paragraph in the commit of the step that introduces that rule.
|
||||
|
||||
## Scope
|
||||
|
||||
Local to studio LSP and the PBS frontend. Shared compiler entry points do not gain a cache or a new pipeline phase. New LSP capabilities follow the code-action pattern: `FrontendLanguageService` defaults to unsupported, PBS overrides support, `BaselineServerDescription` advertises only that flag, and a missing flag is an empty list.
|
||||
|
||||
### Step 1. Diagnostic source
|
||||
|
||||
In `CompilerLanguageServiceBridge.toBaselineIssue`, set `BaselineDocumentIssue.source` from `LspProjectContext.languageId`. Keep `code` as the trimmed compiler code, empty when the compiler code is null or blank. Do not special-case `"Prometeu Studio"`. `Lsp4jProtocolMessageMapper.mapDiagnostic` already copies `source` and `code` and must stay without `relatedInformation` or `data`.
|
||||
|
||||
Spec 23 §8.3 gains one paragraph: published editor diagnostic `source` is the bound frontend `languageId`; `code` is the stable compiler code or empty; tooling must not copy the code into `source` and must not publish related locations, phase, or a repair payload.
|
||||
|
||||
### Step 2. Document links
|
||||
|
||||
Add a frontend document-link result: span of a `ModuleRef` plus a physical file target. Default on `FrontendLanguageService` is an empty list and `documentLinksSupported` false. PBS returns a link only when the resolver the compiler already uses yields a regular file. No link for virtual stdlib, assets, docs, or an unresolved module. Do not add a second module resolver.
|
||||
|
||||
LSP: baseline message, `documentLinkProvider`, `PrometeuTextDocumentService.documentLink`, mapper. Unsupported stays unadvertised and returns an empty list.
|
||||
|
||||
### Step 3. Folding and selection ranges
|
||||
|
||||
Frontend produces both lists from the recovered AST when the node has a span: top-level `fn`, `struct`, `service`, `contract`, `enum`, `error`, `callback`, and `host`; their bodies; parameter lists; `Doc` text blocks. Token fallback covers only a brace, parenthesis, or text-block delimiter the tree does not cover. Selection order, inner to outer: identifier, argument or parameter list, block or text block, declaration. Empty when there is nothing. Do not build either list from document symbols.
|
||||
|
||||
LSP advertises `foldingRangeProvider` and `selectionRangeProvider` only when the frontend flags are true.
|
||||
|
||||
### Step 4. Full-document formatting
|
||||
|
||||
Frontend formatter reprints the token stream. It does not reorder declarations, join lines, or split lines to beautify. Indent is four spaces and changes only where brace, parenthesis, or block nesting changes. `Doc` text-block interiors are copied unchanged. A comment stays on the token line it already belongs to. No AST pretty-printer. No range formatting. No on-type formatting. Do not read `.studio/setup.json` or LSN-0033.
|
||||
|
||||
LSP advertises `documentFormattingProvider` only.
|
||||
|
||||
### Step 5. Semantic-token overlay
|
||||
|
||||
Keep `PBSSemanticTokenProvider` as the lexical baseline. After that pass, where the same resolution hover uses names a symbol and an existing `PbsSemanticKind` matches it, replace the weaker key. On resolution failure, a broken file, or a symbol with no existing key, keep the provider token. Add no `PbsSemanticKind` constant. The server already advertises semantic tokens; do not add a second provider.
|
||||
|
||||
### Step 6. Module-ref completion
|
||||
|
||||
When the completion offset sits inside a `ModuleRef`, return project and stdlib modules the current resolver can already name. Every other offset keeps today's member or general completion. Items stay eager. `CompletionOptions.resolveProvider` stays false. No snippets. No new rank score. No new trigger-character policy beyond what module-ref detection needs inside the existing completion request.
|
||||
|
||||
### Step 7. Call hierarchy
|
||||
|
||||
Frontend walks `CallExpr` callsites for incoming and outgoing calls of functions and methods. Do not query the references index. A cursor that is not on a callable returns empty. No type hierarchy and no separate host or intrinsic graph.
|
||||
|
||||
LSP advertises call hierarchy only. This commit also writes the English lesson, runs `discussion housekeep DSC-0066 --lesson <path>`, and `discussion validate`.
|
||||
|
||||
## Non-Goals
|
||||
|
||||
- Project snapshot cache, cancellation, and background reanalysis.
|
||||
- Type hierarchy, contract implementation hierarchy, and a separate host or intrinsic graph.
|
||||
- `completionItem/resolve`, snippets, and a ranking model.
|
||||
- Range formatting and on-type formatting.
|
||||
- Organize imports and a missing-import quick fix.
|
||||
- `relatedInformation`, compiler phase on the diagnostic, and repair data.
|
||||
- New semantic-token keys.
|
||||
- Document links for assets, addressables, docs, or virtual stdlib URIs.
|
||||
- Reusing document symbols as folding ranges.
|
||||
- Pushing the branch.
|
||||
|
||||
## Execution Method
|
||||
|
||||
1. Work on `dev/pbs-lsp-remaining-editor-surface`. Do not commit on `master`.
|
||||
2. Mark this plan `in_progress` before step 1 code.
|
||||
3. Implement one step, then run the tests listed for that step.
|
||||
4. Commit that step before starting the next. Subject: `implements PLN-0137 (k/7) <slug>`.
|
||||
5. Stage `discussion`, `docs`, `prometeu-compiler`, and `prometeu-lsp` as the step touches them. Do not stage `AGENTS.md`.
|
||||
6. Spec 23 §8.3 is edited in the same commit as the step whose rule it states.
|
||||
7. Steps are not reordered and are not parallel. A later step may use the capability flags introduced earlier; it must not reopen a closed step.
|
||||
8. The seventh commit includes the lesson and housekeep. Earlier commits keep DEC-0058 and this plan in the tree.
|
||||
|
||||
Commit slugs:
|
||||
|
||||
1. `diagnostic-source`
|
||||
2. `document-links`
|
||||
3. `folding-and-selection-ranges`
|
||||
4. `document-formatting`
|
||||
5. `semantic-token-overlay`
|
||||
6. `module-ref-completion`
|
||||
7. `call-hierarchy`
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
- Step 1: every issue from `analyzeDocument` on a PBS project has `source` equal to `pbs`, `code` is the stable compiler code, and `source` is not that code. No related information is mapped.
|
||||
- Step 2: a `ModuleRef` that resolves to a regular file becomes one document link on that span. Virtual stdlib and unresolved modules produce no link. The provider is advertised only when supported.
|
||||
- Step 3: a well-formed declaration, body, parameter list, and `Doc` text block fold from AST spans. An unmatched brace still produces a token fallback range. Selection nests in the decided order. Document symbols are unchanged.
|
||||
- Step 4: formatting a document does not change `Doc` text-block interiors, does not move a comment off its token line, does not reorder declarations, and only changes indent by four spaces at nesting changes. Range and on-type providers stay off.
|
||||
- Step 5: an identifier hover can resolve changes to an existing semantic key; a broken file still returns the lexical tokens; `PbsSemanticKind` gains no constant.
|
||||
- Step 6: completion inside a `ModuleRef` lists resolver-known modules; completion after `.` is unchanged; `resolveProvider` is false.
|
||||
- Step 7: incoming and outgoing calls report function and method callsites found in the AST. A non-callable cursor is empty. Type hierarchy is not advertised. `discussion validate` passes after housekeep, and the lesson states the seven rules.
|
||||
|
||||
## Tests
|
||||
|
||||
- `CompilerLanguageServiceBridgeTest` for diagnostic source, and for each new bridge method as it lands.
|
||||
- `Lsp4jProtocolMessageMapperTest` for capability advertisement of each new provider, and for the absence of range formatting, on-type formatting, resolve, related information, and type hierarchy.
|
||||
- PBS frontend tests for links, folding, selection, formatting, the token overlay, module-ref completion, and call hierarchy. Include one broken-file case for tokens and one unmatched-delimiter case for folding.
|
||||
- Do not require a running VS Code instance. Bridge and mapper tests are the protocol gate.
|
||||
|
||||
## Affected Artifacts
|
||||
|
||||
- `discussion/workflow/agendas/AGD-0069-pbs-lsp-remaining-editor-surface.md`
|
||||
- `discussion/workflow/decisions/DEC-0058-pbs-lsp-remaining-editor-surface.md`
|
||||
- `discussion/workflow/plans/PLN-0137-pbs-lsp-remaining-editor-surface.md`
|
||||
- `discussion/index.ndjson`
|
||||
- `docs/specs/compiler/23. Compiler Pipeline Entry Points Specification.md`
|
||||
- `prometeu-compiler/prometeu-frontend-api` (`FrontendLanguageService` and new result types)
|
||||
- `prometeu-compiler/frontends/prometeu-frontend-pbs` (PBS implementations)
|
||||
- `prometeu-lsp/prometeu-lsp-v1` (bridge, baseline messages, text document service, mapper)
|
||||
- Lesson, only in the step 7 commit: `discussion/lessons/DSC-0066-pbs-lsp-remaining-editor-surface/`
|
||||
@ -286,6 +286,8 @@ When a frontend exposes code actions, the result MUST be quick fixes only: one w
|
||||
|
||||
Compiler diagnostics and editor diagnostics are distinct ownership surfaces. Diagnostics returned by `analyze`, `compile`, and `build` are compiler contract output. Editor diagnostics MAY reuse compiler analysis results, live overlays, caches, or cancellation-aware tooling state, but a frontend MUST NOT be required to provide editor diagnostics in order to compile.
|
||||
|
||||
When tooling publishes an editor diagnostic, `source` MUST be the `languageId` of the bound frontend project. `code` MUST be the stable compiler diagnostic code when one exists, and MUST be empty when the compiler diagnostic has none. Tooling MUST NOT copy that code into `source`. Tooling MUST NOT publish related locations, compiler phase, or a repair payload on the editor diagnostic.
|
||||
|
||||
`FrontendSpec` remains the source of static frontend-owned presentation metadata such as semantic vocabularies, host projections, and visual themes. Producing semantic tokens for a live document is an optional editor-facing capability; the existence of static presentation metadata MUST NOT imply that every frontend can provide live semantic-token results.
|
||||
|
||||
The frontend registry MUST resolve providers by `languageId`. A lookup for an unknown `languageId` MUST fail explicitly with a diagnostic-friendly error. Unknown languages MUST NOT silently fall back to PBS or to any other frontend.
|
||||
|
||||
@ -85,7 +85,11 @@ public final class CompilerLanguageServiceBridge implements LanguageServiceBridg
|
||||
final Path documentPath = normalizeDocumentPath(documentUri);
|
||||
final String effectiveText = StringUtils.isBlank(text) ? "" : text;
|
||||
final AnalysisSnapshot snapshot = analyzeProject(context, Map.of(documentPath, effectiveText));
|
||||
return new BaselineDocumentAnalysis(mapDiagnostics(snapshot, documentPath, effectiveText));
|
||||
return new BaselineDocumentAnalysis(mapDiagnostics(
|
||||
snapshot,
|
||||
documentPath,
|
||||
effectiveText,
|
||||
context.languageId()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -541,7 +545,8 @@ public final class CompilerLanguageServiceBridge implements LanguageServiceBridg
|
||||
private List<BaselineDocumentIssue> mapDiagnostics(
|
||||
final AnalysisSnapshot snapshot,
|
||||
final Path documentPath,
|
||||
final String text) {
|
||||
final String text,
|
||||
final String languageId) {
|
||||
final ArrayList<BaselineDocumentIssue> issues = new ArrayList<>();
|
||||
final DocumentPositionMapper positionMapper = new DocumentPositionMapper(text);
|
||||
for (final BuildingIssue diagnostic : snapshot.diagnostics()) {
|
||||
@ -556,14 +561,15 @@ public final class CompilerLanguageServiceBridge implements LanguageServiceBridg
|
||||
if (!sourceHandle.getCanonPath().toAbsolutePath().normalize().equals(documentPath)) {
|
||||
continue;
|
||||
}
|
||||
issues.add(toBaselineIssue(diagnostic, positionMapper));
|
||||
issues.add(toBaselineIssue(diagnostic, positionMapper, languageId));
|
||||
}
|
||||
return List.copyOf(issues);
|
||||
}
|
||||
|
||||
private BaselineDocumentIssue toBaselineIssue(
|
||||
final BuildingIssue diagnostic,
|
||||
final DocumentPositionMapper positionMapper) {
|
||||
final DocumentPositionMapper positionMapper,
|
||||
final String languageId) {
|
||||
final int startOffset = diagnostic.getStart() == null ? 0 : diagnostic.getStart();
|
||||
final int endOffset = diagnostic.getEnd() == null ? startOffset : Math.max(startOffset, diagnostic.getEnd());
|
||||
final DocumentPosition start = positionMapper.positionOf(startOffset);
|
||||
@ -575,7 +581,7 @@ public final class CompilerLanguageServiceBridge implements LanguageServiceBridg
|
||||
end.line(),
|
||||
end.character(),
|
||||
diagnostic.isError() ? BaselineIssueSeverity.ERROR : BaselineIssueSeverity.WARNING,
|
||||
code.isBlank() ? "Prometeu Studio" : code,
|
||||
languageId,
|
||||
diagnostic.getMessage(),
|
||||
code);
|
||||
}
|
||||
|
||||
@ -100,6 +100,9 @@ class CompilerLanguageServiceBridgeTest {
|
||||
assertTrue(analysis.issues().stream().anyMatch(issue -> issue.severity() == BaselineIssueSeverity.ERROR));
|
||||
assertTrue(analysis.issues().stream().anyMatch(issue -> issue.startLine() == 1));
|
||||
assertTrue(analysis.issues().stream().noneMatch(issue -> issue.message().contains("Compiler-backed baseline")));
|
||||
assertTrue(analysis.issues().stream().allMatch(issue -> issue.source().equals("pbs")));
|
||||
assertTrue(analysis.issues().stream().noneMatch(issue -> issue.source().equals(issue.code())));
|
||||
assertTrue(analysis.issues().stream().anyMatch(issue -> !issue.code().isBlank()));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@ -269,12 +269,14 @@ final class Lsp4jProtocolMessageMapperTest {
|
||||
1,
|
||||
18,
|
||||
BaselineIssueSeverity.ERROR,
|
||||
"E_SEM_DUPLICATE_RESERVED_ATTRIBUTE",
|
||||
"pbs",
|
||||
"Duplicate Doc attribute on the same declaration surface",
|
||||
"E_SEM_DUPLICATE_RESERVED_ATTRIBUTE"))));
|
||||
final var diagnostic = published.getDiagnostics().getFirst();
|
||||
assertEquals("pbs", diagnostic.getSource());
|
||||
assertEquals("E_SEM_DUPLICATE_RESERVED_ATTRIBUTE", diagnostic.getCode().getLeft());
|
||||
assertNull(diagnostic.getData());
|
||||
assertTrue(diagnostic.getRelatedInformation() == null || diagnostic.getRelatedInformation().isEmpty());
|
||||
|
||||
final var mapped = mapper.mapCodeActions(new BaselineCodeActions(List.of(new BaselineCodeAction(
|
||||
"Remove duplicate reserved attribute",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user