Compare commits
14
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a0a5050d5e
|
||
|
|
10f1b3f87c
|
||
|
|
7011209675 | ||
|
|
274ce28e8d
|
||
|
|
1fcecdb04d
|
||
|
|
e456bb8d7a
|
||
|
|
202c785f94
|
||
|
|
7629a73e0a
|
||
|
|
ce2e3e4cd3
|
||
|
|
3320f222bb
|
||
|
|
099857b636
|
||
|
|
20adc196d9 | ||
|
|
ae891262e1
|
||
|
|
6f45f4f205 |
@@ -24,3 +24,8 @@ build
|
||||
**/.studio/**
|
||||
|
||||
.DS_Store
|
||||
|
||||
# Discussion workflow state is local; only consolidated lessons are versioned.
|
||||
discussion/*
|
||||
!discussion/lessons/
|
||||
!discussion/lessons/**
|
||||
|
||||
@@ -8,8 +8,10 @@ This repository packages the Studio shell together with the embedded services it
|
||||
|
||||
The root project is a monorepo with these main areas:
|
||||
|
||||
- `prometeu-app`: JavaFX application entry point (`p.studio.App`).
|
||||
- `prometeu-studio`: Studio UI, workspaces, project session lifecycle, play/stop flow, and debugger-facing surfaces.
|
||||
- `prometeu-app`: Spring Boot non-web composition, concrete adapters, packaging, and JavaFX entry point (`p.studio.app.StudioLauncher`).
|
||||
- `prometeu-studio-api`: toolkit-neutral Studio contracts and operation surfaces.
|
||||
- `prometeu-studio-core`: JavaFX-free project, session, assets, shipper, runtime, and execution services.
|
||||
- `prometeu-studio-ui-javafx`: the current human-facing JavaFX adapter.
|
||||
- `prometeu-packer`: embedded packer APIs and implementation used by Studio.
|
||||
- `prometeu-compiler`: compiler core, build pipeline, frontend APIs, and the PBS frontend.
|
||||
- `prometeu-infra`: shared infrastructure used across modules.
|
||||
@@ -64,9 +66,11 @@ Generate the aggregated coverage report:
|
||||
If you are new to the codebase, this order is usually the fastest path:
|
||||
|
||||
1. Start at `prometeu-app` to see application bootstrap.
|
||||
2. Read `prometeu-studio` for the shell, workspaces, and user-facing flows.
|
||||
3. Read `prometeu-packer` for asset and packaging boundaries.
|
||||
4. Read `prometeu-compiler` when you need compiler or PBS language behavior.
|
||||
2. Read `prometeu-studio-api` and `prometeu-studio-core` for Studio contracts and application services.
|
||||
3. Read `prometeu-studio-ui-javafx` for the current shell, workspaces, and human-facing flows.
|
||||
4. Read `prometeu-app` for Spring composition and provider gateways.
|
||||
5. Read `prometeu-packer` for asset and packaging boundaries.
|
||||
6. Read `prometeu-compiler` when you need compiler or PBS language behavior.
|
||||
|
||||
## Specs And Architecture
|
||||
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
{"type":"meta","next_id":{"DSC":14,"AGD":15,"DEC":10,"PLN":19,"LSN":28,"CLSN":1}}
|
||||
{"type":"discussion","id":"DSC-0001","status":"done","ticket":"studio-docs-import","title":"Import docs/studio into discussion-framework artifacts","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["studio","migration","discussion-framework","docs-import"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0001","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0001-assets-workspace-execution-wave-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0002","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0002-bank-composition-editor-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0003","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0003-mental-model-asset-mutations-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0004","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0004-mental-model-assets-workspace-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0005","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0005-mental-model-studio-events-and-components-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0006","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0006-mental-model-studio-shell-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0007","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0007-pack-wizard-shell-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0008","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0008-project-scoped-state-and-activity-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0016","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0016-studio-docs-import-pattern.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"}]}
|
||||
{"type":"discussion","id":"DSC-0002","status":"open","ticket":"palette-management-in-studio","title":"Palette Management in Studio","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["studio","legacy-import","palette-management","tile-bank","packer-boundary"],"agendas":[{"id":"AGD-0002","file":"AGD-0002-palette-management-in-studio.md","status":"open","created_at":"2026-03-26","updated_at":"2026-03-26"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0003","status":"done","ticket":"packer-docs-import","title":"Import docs/packer into discussion-framework artifacts","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["packer","migration","discussion-framework","docs-import"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0009","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0009-mental-model-packer-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0010","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0010-asset-identity-and-runtime-contract-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0011","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0011-foundations-workspace-runtime-and-build-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0012","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0012-runtime-ownership-and-studio-boundary-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0013","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0013-metadata-convergence-and-runtime-sink-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0014","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0014-pack-wizard-summary-validation-and-pack-execution-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0015","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0015-tile-bank-packing-contract-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0017","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0017-packer-docs-import-pattern.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"}]}
|
||||
{"type":"discussion","id":"DSC-0004","status":"open","ticket":"tilemap-and-metatile-runtime-binary-layout","title":"Tilemap and Metatile Runtime Binary Layout","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["packer","legacy-import","tilemap","metatile","runtime-layout"],"agendas":[{"id":"AGD-0004","file":"AGD-0004-tilemap-and-metatile-runtime-binary-layout.md","status":"open","created_at":"2026-03-26","updated_at":"2026-03-26"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0005","status":"open","ticket":"variable-tile-bank-palette-serialization","title":"Variable Tile Bank Palette Serialization","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["packer","legacy-import","tile-bank","palette-serialization","versioning"],"agendas":[{"id":"AGD-0005","file":"AGD-0005-variable-tile-bank-palette-serialization.md","status":"open","created_at":"2026-03-26","updated_at":"2026-03-26"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0006","status":"done","ticket":"pbs-game-facing-asset-refs-and-call-result-discard","title":"PBS Game-Facing Asset References and Ignored Call Result Lowering","created_at":"2026-03-27","updated_at":"2026-03-30","tags":["compiler","pbs","ergonomics","lowering","runtime","asset-identity","expression-statements"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0024","file":"discussion/lessons/DSC-0006-pbs-game-facing-asset-refs-and-call-result-discard/LSN-0024-addressable-surface-host-metadata-and-ignored-value-discipline.md","status":"done","created_at":"2026-03-30","updated_at":"2026-03-30"}]}
|
||||
{"type":"discussion","id":"DSC-0007","status":"done","ticket":"pbs-learn-to-discussion-lessons-migration","title":"Migrate PBS Learn Documents into Discussion Lessons","created_at":"2026-03-27","updated_at":"2026-03-27","tags":["compiler","pbs","migration","discussion-framework","lessons","learn-prune"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0018","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0018-pbs-ast-and-parser-contract-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0019","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0019-pbs-name-resolution-and-linking-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0020","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0020-pbs-runtime-values-identity-memory-boundaries-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0021","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0021-pbs-diagnostics-and-conformance-governance-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0022","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0022-pbs-globals-lifecycle-and-published-entrypoint-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"}]}
|
||||
{"type":"discussion","id":"DSC-0008","status":"done","ticket":"pbs-low-level-asset-manager-surface","title":"PBS Low-Level Asset Manager Surface for Runtime AssetManager","created_at":"2026-03-27","updated_at":"2026-03-27","tags":["compiler","pbs","runtime","asset-manager","host-abi","stdlib","asset"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0023","file":"discussion/lessons/DSC-0008-pbs-low-level-asset-manager-surface/LSN-0023-lowassets-runtime-aligned-sdk-surface.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"}]}
|
||||
{"type":"discussion","id":"DSC-0009","status":"open","ticket":"studio-debugger-workspace-integration","title":"Integrate ../debugger into Studio as a dedicated workspace","created_at":"2026-03-30","updated_at":"2026-03-30","tags":["studio","debugger","workspace","integration","shell"],"agendas":[{"id":"AGD-0009","file":"AGD-0009-studio-debugger-workspace-integration.md","status":"open","created_at":"2026-03-30","updated_at":"2026-03-30"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0010","status":"done","ticket":"studio-code-editor-workspace-foundations","title":"Establish Code Editor workspace foundations in Studio without LSP","created_at":"2026-03-30","updated_at":"2026-03-31","tags":["studio","editor","workspace","multi-frontend","lsp-deferred"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0026","file":"discussion/lessons/DSC-0010-studio-code-editor-workspace-foundations/LSN-0026-read-only-editor-foundations-and-semantic-deferral.md","status":"done","created_at":"2026-03-31","updated_at":"2026-03-31"}]}
|
||||
{"type":"discussion","id":"DSC-0011","status":"done","ticket":"compiler-analyze-compile-build-pipeline-split","title":"Split compiler pipeline into analyze, compile, and build entrypoints","created_at":"2026-03-30","updated_at":"2026-03-30","tags":["compiler","pipeline","artifacts","build","analysis"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0025","file":"discussion/lessons/DSC-0011-compiler-analyze-compile-build-pipeline-split/LSN-0025-compiler-pipeline-entrypoints-and-result-boundaries.md","status":"done","created_at":"2026-03-30","updated_at":"2026-03-30"}]}
|
||||
{"type":"discussion","id":"DSC-0012","status":"done","ticket":"studio-editor-document-vfs-boundary","title":"Definir um boundary de VFS documental para tree/view/open files no Code Editor do Studio","created_at":"2026-03-31","updated_at":"2026-03-31","tags":["studio","editor","workspace","vfs","filesystem","boundary"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0027","file":"discussion/lessons/DSC-0012-studio-editor-document-vfs-boundary/LSN-0027-project-document-vfs-and-session-owned-editor-boundary.md","status":"done","created_at":"2026-03-31","updated_at":"2026-03-31"}]}
|
||||
{"type":"discussion","id":"DSC-0013","status":"open","ticket":"studio-editor-write-wave-supported-non-frontend-files","title":"Definir a wave inicial de edicao no Code Editor apenas para arquivos aceitos e nao relacionados ao FE","created_at":"2026-03-31","updated_at":"2026-03-31","tags":["studio","editor","workspace","write","read-only","vfs","frontend-boundary"],"agendas":[{"id":"AGD-0013","file":"AGD-0013-studio-editor-write-wave-supported-non-frontend-files.md","status":"accepted","created_at":"2026-03-31","updated_at":"2026-03-31"},{"id":"AGD-0014","file":"AGD-0014-studio-editor-frontend-edit-rights.md","status":"open","created_at":"2026-03-31","updated_at":"2026-03-31"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
@@ -1,14 +0,0 @@
|
||||
{"type":"meta","next_id":{"DSC":14,"AGD":15,"DEC":12,"PLN":19,"LSN":28,"CLSN":1}}
|
||||
{"type":"discussion","id":"DSC-0001","status":"done","ticket":"studio-docs-import","title":"Import docs/studio into discussion-framework artifacts","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["studio","migration","discussion-framework","docs-import"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0001","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0001-assets-workspace-execution-wave-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0002","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0002-bank-composition-editor-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0003","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0003-mental-model-asset-mutations-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0004","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0004-mental-model-assets-workspace-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0005","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0005-mental-model-studio-events-and-components-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0006","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0006-mental-model-studio-shell-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0007","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0007-pack-wizard-shell-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0008","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0008-project-scoped-state-and-activity-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0016","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0016-studio-docs-import-pattern.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"}]}
|
||||
{"type":"discussion","id":"DSC-0002","status":"open","ticket":"palette-management-in-studio","title":"Palette Management in Studio","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["studio","legacy-import","palette-management","tile-bank","packer-boundary"],"agendas":[{"id":"AGD-0002","file":"AGD-0002-palette-management-in-studio.md","status":"open","created_at":"2026-03-26","updated_at":"2026-03-26"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0003","status":"done","ticket":"packer-docs-import","title":"Import docs/packer into discussion-framework artifacts","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["packer","migration","discussion-framework","docs-import"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0009","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0009-mental-model-packer-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0010","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0010-asset-identity-and-runtime-contract-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0011","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0011-foundations-workspace-runtime-and-build-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0012","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0012-runtime-ownership-and-studio-boundary-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0013","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0013-metadata-convergence-and-runtime-sink-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0014","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0014-pack-wizard-summary-validation-and-pack-execution-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0015","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0015-tile-bank-packing-contract-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0017","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0017-packer-docs-import-pattern.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"}]}
|
||||
{"type":"discussion","id":"DSC-0004","status":"open","ticket":"tilemap-and-metatile-runtime-binary-layout","title":"Tilemap and Metatile Runtime Binary Layout","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["packer","legacy-import","tilemap","metatile","runtime-layout"],"agendas":[{"id":"AGD-0004","file":"AGD-0004-tilemap-and-metatile-runtime-binary-layout.md","status":"open","created_at":"2026-03-26","updated_at":"2026-03-26"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0005","status":"open","ticket":"variable-tile-bank-palette-serialization","title":"Variable Tile Bank Palette Serialization","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["packer","legacy-import","tile-bank","palette-serialization","versioning"],"agendas":[{"id":"AGD-0005","file":"AGD-0005-variable-tile-bank-palette-serialization.md","status":"open","created_at":"2026-03-26","updated_at":"2026-03-26"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0006","status":"done","ticket":"pbs-game-facing-asset-refs-and-call-result-discard","title":"PBS Game-Facing Asset References and Ignored Call Result Lowering","created_at":"2026-03-27","updated_at":"2026-03-30","tags":["compiler","pbs","ergonomics","lowering","runtime","asset-identity","expression-statements"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0024","file":"discussion/lessons/DSC-0006-pbs-game-facing-asset-refs-and-call-result-discard/LSN-0024-addressable-surface-host-metadata-and-ignored-value-discipline.md","status":"done","created_at":"2026-03-30","updated_at":"2026-03-30"}]}
|
||||
{"type":"discussion","id":"DSC-0007","status":"done","ticket":"pbs-learn-to-discussion-lessons-migration","title":"Migrate PBS Learn Documents into Discussion Lessons","created_at":"2026-03-27","updated_at":"2026-03-27","tags":["compiler","pbs","migration","discussion-framework","lessons","learn-prune"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0018","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0018-pbs-ast-and-parser-contract-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0019","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0019-pbs-name-resolution-and-linking-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0020","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0020-pbs-runtime-values-identity-memory-boundaries-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0021","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0021-pbs-diagnostics-and-conformance-governance-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0022","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0022-pbs-globals-lifecycle-and-published-entrypoint-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"}]}
|
||||
{"type":"discussion","id":"DSC-0008","status":"done","ticket":"pbs-low-level-asset-manager-surface","title":"PBS Low-Level Asset Manager Surface for Runtime AssetManager","created_at":"2026-03-27","updated_at":"2026-03-27","tags":["compiler","pbs","runtime","asset-manager","host-abi","stdlib","asset"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0023","file":"discussion/lessons/DSC-0008-pbs-low-level-asset-manager-surface/LSN-0023-lowassets-runtime-aligned-sdk-surface.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"}]}
|
||||
{"type":"discussion","id":"DSC-0009","status":"open","ticket":"studio-debugger-workspace-integration","title":"Integrate ../debugger into Studio as a dedicated workspace","created_at":"2026-03-30","updated_at":"2026-03-30","tags":["studio","debugger","workspace","integration","shell"],"agendas":[{"id":"AGD-0009","file":"AGD-0009-studio-debugger-workspace-integration.md","status":"open","created_at":"2026-03-30","updated_at":"2026-03-30"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0010","status":"done","ticket":"studio-code-editor-workspace-foundations","title":"Establish Code Editor workspace foundations in Studio without LSP","created_at":"2026-03-30","updated_at":"2026-03-31","tags":["studio","editor","workspace","multi-frontend","lsp-deferred"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0026","file":"discussion/lessons/DSC-0010-studio-code-editor-workspace-foundations/LSN-0026-read-only-editor-foundations-and-semantic-deferral.md","status":"done","created_at":"2026-03-31","updated_at":"2026-03-31"}]}
|
||||
{"type":"discussion","id":"DSC-0011","status":"done","ticket":"compiler-analyze-compile-build-pipeline-split","title":"Split compiler pipeline into analyze, compile, and build entrypoints","created_at":"2026-03-30","updated_at":"2026-03-30","tags":["compiler","pipeline","artifacts","build","analysis"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0025","file":"discussion/lessons/DSC-0011-compiler-analyze-compile-build-pipeline-split/LSN-0025-compiler-pipeline-entrypoints-and-result-boundaries.md","status":"done","created_at":"2026-03-30","updated_at":"2026-03-30"}]}
|
||||
{"type":"discussion","id":"DSC-0012","status":"done","ticket":"studio-editor-document-vfs-boundary","title":"Definir um boundary de VFS documental para tree/view/open files no Code Editor do Studio","created_at":"2026-03-31","updated_at":"2026-03-31","tags":["studio","editor","workspace","vfs","filesystem","boundary"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0027","file":"discussion/lessons/DSC-0012-studio-editor-document-vfs-boundary/LSN-0027-project-document-vfs-and-session-owned-editor-boundary.md","status":"done","created_at":"2026-03-31","updated_at":"2026-03-31"}]}
|
||||
{"type":"discussion","id":"DSC-0013","status":"open","ticket":"studio-editor-write-wave-supported-non-frontend-files","title":"Definir a wave inicial de edicao no Code Editor apenas para arquivos aceitos e nao relacionados ao FE","created_at":"2026-03-31","updated_at":"2026-03-31","tags":["studio","editor","workspace","write","read-only","vfs","frontend-boundary"],"agendas":[{"id":"AGD-0013","file":"AGD-0013-studio-editor-write-wave-supported-non-frontend-files.md","status":"accepted","created_at":"2026-03-31","updated_at":"2026-03-31"},{"id":"AGD-0014","file":"AGD-0014-studio-editor-frontend-edit-rights.md","status":"accepted","created_at":"2026-03-31","updated_at":"2026-03-31"}],"decisions":[{"id":"DEC-0010","file":"DEC-0010-studio-controlled-non-frontend-editor-write-wave.md","status":"accepted","created_at":"2026-03-31","updated_at":"2026-03-31","ref_agenda":"AGD-0013"},{"id":"DEC-0011","file":"DEC-0011-studio-frontend-read-only-minimum-lsp-phase.md","status":"accepted","created_at":"2026-03-31","updated_at":"2026-03-31","ref_agenda":"AGD-0014"}],"plans":[],"lessons":[]}
|
||||
@@ -1,15 +0,0 @@
|
||||
{"type":"meta","next_id":{"DSC":14,"AGD":15,"DEC":13,"PLN":29,"LSN":28,"CLSN":1}}
|
||||
{"type":"discussion","id":"DSC-0001","status":"done","ticket":"studio-docs-import","title":"Import docs/studio into discussion-framework artifacts","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["studio","migration","discussion-framework","docs-import"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0001","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0001-assets-workspace-execution-wave-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0002","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0002-bank-composition-editor-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0003","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0003-mental-model-asset-mutations-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0004","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0004-mental-model-assets-workspace-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0005","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0005-mental-model-studio-events-and-components-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0006","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0006-mental-model-studio-shell-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0007","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0007-pack-wizard-shell-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0008","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0008-project-scoped-state-and-activity-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0016","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0016-studio-docs-import-pattern.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"}]}
|
||||
{"type":"discussion","id":"DSC-0002","status":"open","ticket":"palette-management-in-studio","title":"Palette Management in Studio","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["studio","legacy-import","palette-management","tile-bank","packer-boundary"],"agendas":[{"id":"AGD-0002","file":"AGD-0002-palette-management-in-studio.md","status":"open","created_at":"2026-03-26","updated_at":"2026-03-26"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0003","status":"done","ticket":"packer-docs-import","title":"Import docs/packer into discussion-framework artifacts","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["packer","migration","discussion-framework","docs-import"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0009","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0009-mental-model-packer-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0010","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0010-asset-identity-and-runtime-contract-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0011","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0011-foundations-workspace-runtime-and-build-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0012","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0012-runtime-ownership-and-studio-boundary-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0013","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0013-metadata-convergence-and-runtime-sink-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0014","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0014-pack-wizard-summary-validation-and-pack-execution-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0015","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0015-tile-bank-packing-contract-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0017","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0017-packer-docs-import-pattern.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"}]}
|
||||
{"type":"discussion","id":"DSC-0004","status":"open","ticket":"tilemap-and-metatile-runtime-binary-layout","title":"Tilemap and Metatile Runtime Binary Layout","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["packer","legacy-import","tilemap","metatile","runtime-layout"],"agendas":[{"id":"AGD-0004","file":"AGD-0004-tilemap-and-metatile-runtime-binary-layout.md","status":"open","created_at":"2026-03-26","updated_at":"2026-03-26"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0005","status":"open","ticket":"variable-tile-bank-palette-serialization","title":"Variable Tile Bank Palette Serialization","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["packer","legacy-import","tile-bank","palette-serialization","versioning"],"agendas":[{"id":"AGD-0005","file":"AGD-0005-variable-tile-bank-palette-serialization.md","status":"open","created_at":"2026-03-26","updated_at":"2026-03-26"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0006","status":"done","ticket":"pbs-game-facing-asset-refs-and-call-result-discard","title":"PBS Game-Facing Asset References and Ignored Call Result Lowering","created_at":"2026-03-27","updated_at":"2026-03-30","tags":["compiler","pbs","ergonomics","lowering","runtime","asset-identity","expression-statements"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0024","file":"discussion/lessons/DSC-0006-pbs-game-facing-asset-refs-and-call-result-discard/LSN-0024-addressable-surface-host-metadata-and-ignored-value-discipline.md","status":"done","created_at":"2026-03-30","updated_at":"2026-03-30"}]}
|
||||
{"type":"discussion","id":"DSC-0007","status":"done","ticket":"pbs-learn-to-discussion-lessons-migration","title":"Migrate PBS Learn Documents into Discussion Lessons","created_at":"2026-03-27","updated_at":"2026-03-27","tags":["compiler","pbs","migration","discussion-framework","lessons","learn-prune"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0018","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0018-pbs-ast-and-parser-contract-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0019","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0019-pbs-name-resolution-and-linking-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0020","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0020-pbs-runtime-values-identity-memory-boundaries-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0021","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0021-pbs-diagnostics-and-conformance-governance-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0022","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0022-pbs-globals-lifecycle-and-published-entrypoint-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"}]}
|
||||
{"type":"discussion","id":"DSC-0008","status":"done","ticket":"pbs-low-level-asset-manager-surface","title":"PBS Low-Level Asset Manager Surface for Runtime AssetManager","created_at":"2026-03-27","updated_at":"2026-03-27","tags":["compiler","pbs","runtime","asset-manager","host-abi","stdlib","asset"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0023","file":"discussion/lessons/DSC-0008-pbs-low-level-asset-manager-surface/LSN-0023-lowassets-runtime-aligned-sdk-surface.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"}]}
|
||||
{"type":"discussion","id":"DSC-0009","status":"open","ticket":"studio-debugger-workspace-integration","title":"Integrate ../debugger into Studio as a dedicated workspace","created_at":"2026-03-30","updated_at":"2026-03-30","tags":["studio","debugger","workspace","integration","shell"],"agendas":[{"id":"AGD-0009","file":"AGD-0009-studio-debugger-workspace-integration.md","status":"open","created_at":"2026-03-30","updated_at":"2026-03-30"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0010","status":"done","ticket":"studio-code-editor-workspace-foundations","title":"Establish Code Editor workspace foundations in Studio without LSP","created_at":"2026-03-30","updated_at":"2026-03-31","tags":["studio","editor","workspace","multi-frontend","lsp-deferred"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0026","file":"discussion/lessons/DSC-0010-studio-code-editor-workspace-foundations/LSN-0026-read-only-editor-foundations-and-semantic-deferral.md","status":"done","created_at":"2026-03-31","updated_at":"2026-03-31"}]}
|
||||
{"type":"discussion","id":"DSC-0011","status":"done","ticket":"compiler-analyze-compile-build-pipeline-split","title":"Split compiler pipeline into analyze, compile, and build entrypoints","created_at":"2026-03-30","updated_at":"2026-03-30","tags":["compiler","pipeline","artifacts","build","analysis"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0025","file":"discussion/lessons/DSC-0011-compiler-analyze-compile-build-pipeline-split/LSN-0025-compiler-pipeline-entrypoints-and-result-boundaries.md","status":"done","created_at":"2026-03-30","updated_at":"2026-03-30"}]}
|
||||
{"type":"discussion","id":"DSC-0012","status":"done","ticket":"studio-editor-document-vfs-boundary","title":"Definir um boundary de VFS documental para tree/view/open files no Code Editor do Studio","created_at":"2026-03-31","updated_at":"2026-03-31","tags":["studio","editor","workspace","vfs","filesystem","boundary"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0027","file":"discussion/lessons/DSC-0012-studio-editor-document-vfs-boundary/LSN-0027-project-document-vfs-and-session-owned-editor-boundary.md","status":"done","created_at":"2026-03-31","updated_at":"2026-03-31"}]}
|
||||
{"type":"discussion","id":"DSC-0013","status":"open","ticket":"studio-editor-write-wave-supported-non-frontend-files","title":"Definir a wave inicial de edicao no Code Editor apenas para arquivos aceitos e nao relacionados ao FE","created_at":"2026-03-31","updated_at":"2026-03-31","tags":["studio","editor","workspace","write","read-only","vfs","frontend-boundary"],"agendas":[{"id":"AGD-0013","file":"AGD-0013-studio-editor-write-wave-supported-non-frontend-files.md","status":"accepted","created_at":"2026-03-31","updated_at":"2026-03-31"},{"id":"AGD-0014","file":"AGD-0014-studio-editor-frontend-edit-rights.md","status":"accepted","created_at":"2026-03-31","updated_at":"2026-03-31"}],"decisions":[{"id":"DEC-0010","file":"DEC-0010-studio-controlled-non-frontend-editor-write-wave.md","status":"accepted","created_at":"2026-03-31","updated_at":"2026-03-31","ref_agenda":"AGD-0013"},{"id":"DEC-0011","file":"DEC-0011-studio-frontend-read-only-minimum-lsp-phase.md","status":"accepted","created_at":"2026-03-31","updated_at":"2026-03-31","ref_agenda":"AGD-0014"}],"plans":[{"id":"PLN-0019","file":"PLN-0019-propagate-dec-0010-into-studio-and-vfs-specs.md","status":"done","created_at":"2026-03-31","updated_at":"2026-03-31","ref_decisions":["DEC-0010"]},{"id":"PLN-0020","file":"PLN-0020-build-dec-0010-vfs-access-policy-and-save-core.md","status":"done","created_at":"2026-03-31","updated_at":"2026-03-31","ref_decisions":["DEC-0010"]},{"id":"PLN-0021","file":"PLN-0021-integrate-dec-0010-editor-write-ui-and-workflow.md","status":"done","created_at":"2026-03-31","updated_at":"2026-03-31","ref_decisions":["DEC-0010"]},{"id":"PLN-0022","file":"PLN-0022-propagate-dec-0011-into-studio-vfs-and-lsp-specs.md","status":"done","created_at":"2026-03-31","updated_at":"2026-03-31","ref_decisions":["DEC-0011"]},{"id":"PLN-0023","file":"PLN-0023-scaffold-flat-packed-prometeu-lsp-api-and-session-seams.md","status":"done","created_at":"2026-03-31","updated_at":"2026-03-31","ref_decisions":["DEC-0011"]},{"id":"PLN-0024","file":"PLN-0024-implement-read-only-fe-diagnostics-symbols-and-definition.md","status":"done","created_at":"2026-03-31","updated_at":"2026-03-31","ref_decisions":["DEC-0011"]},{"id":"PLN-0025","file":"PLN-0025-implement-fe-semantic-highlight-consumption.md","status":"done","created_at":"2026-03-31","updated_at":"2026-03-31","ref_decisions":["DEC-0011"]}],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0014","status":"open","ticket":"studio-frontend-owned-semantic-editor-presentation","title":"Definir ownership do schema visual semantico do editor por frontend","created_at":"2026-04-02","updated_at":"2026-04-02","tags":["studio","editor","frontend","presentation","semantic-highlighting","compiler","pbs"],"agendas":[{"id":"AGD-0015","file":"AGD-0015-studio-frontend-owned-semantic-editor-presentation.md","status":"accepted","created_at":"2026-04-02","updated_at":"2026-04-02"}],"decisions":[{"id":"DEC-0012","file":"DEC-0012-frontend-owned-semantic-editor-presentation.md","status":"accepted","created_at":"2026-04-02","updated_at":"2026-04-02","ref_agenda":"AGD-0015"}],"plans":[{"id":"PLN-0026","file":"PLN-0026-propagate-dec-0012-into-studio-and-frontend-specs.md","status":"review","created_at":"2026-04-02","updated_at":"2026-04-02","ref_decisions":["DEC-0012"]},{"id":"PLN-0027","file":"PLN-0027-add-frontend-semantic-presentation-contract-and-lsp-descriptor.md","status":"review","created_at":"2026-04-02","updated_at":"2026-04-02","ref_decisions":["DEC-0012"]},{"id":"PLN-0028","file":"PLN-0028-consume-frontend-owned-semantic-presentation-in-studio.md","status":"review","created_at":"2026-04-02","updated_at":"2026-04-02","ref_decisions":["DEC-0012"]}],"lessons":[]}
|
||||
@@ -1,15 +0,0 @@
|
||||
{"type":"meta","next_id":{"DSC":15,"AGD":16,"DEC":13,"PLN":29,"LSN":29,"CLSN":1}}
|
||||
{"type":"discussion","id":"DSC-0001","status":"done","ticket":"studio-docs-import","title":"Import docs/studio into discussion-framework artifacts","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["studio","migration","discussion-framework","docs-import"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0001","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0001-assets-workspace-execution-wave-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0002","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0002-bank-composition-editor-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0003","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0003-mental-model-asset-mutations-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0004","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0004-mental-model-assets-workspace-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0005","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0005-mental-model-studio-events-and-components-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0006","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0006-mental-model-studio-shell-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0007","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0007-pack-wizard-shell-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0008","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0008-project-scoped-state-and-activity-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0016","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0016-studio-docs-import-pattern.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"}]}
|
||||
{"type":"discussion","id":"DSC-0002","status":"open","ticket":"palette-management-in-studio","title":"Palette Management in Studio","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["studio","legacy-import","palette-management","tile-bank","packer-boundary"],"agendas":[{"id":"AGD-0002","file":"AGD-0002-palette-management-in-studio.md","status":"open","created_at":"2026-03-26","updated_at":"2026-03-26"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0003","status":"done","ticket":"packer-docs-import","title":"Import docs/packer into discussion-framework artifacts","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["packer","migration","discussion-framework","docs-import"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0009","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0009-mental-model-packer-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0010","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0010-asset-identity-and-runtime-contract-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0011","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0011-foundations-workspace-runtime-and-build-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0012","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0012-runtime-ownership-and-studio-boundary-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0013","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0013-metadata-convergence-and-runtime-sink-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0014","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0014-pack-wizard-summary-validation-and-pack-execution-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0015","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0015-tile-bank-packing-contract-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0017","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0017-packer-docs-import-pattern.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"}]}
|
||||
{"type":"discussion","id":"DSC-0004","status":"open","ticket":"tilemap-and-metatile-runtime-binary-layout","title":"Tilemap and Metatile Runtime Binary Layout","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["packer","legacy-import","tilemap","metatile","runtime-layout"],"agendas":[{"id":"AGD-0004","file":"AGD-0004-tilemap-and-metatile-runtime-binary-layout.md","status":"open","created_at":"2026-03-26","updated_at":"2026-03-26"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0005","status":"open","ticket":"variable-tile-bank-palette-serialization","title":"Variable Tile Bank Palette Serialization","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["packer","legacy-import","tile-bank","palette-serialization","versioning"],"agendas":[{"id":"AGD-0005","file":"AGD-0005-variable-tile-bank-palette-serialization.md","status":"open","created_at":"2026-03-26","updated_at":"2026-03-26"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0006","status":"done","ticket":"pbs-game-facing-asset-refs-and-call-result-discard","title":"PBS Game-Facing Asset References and Ignored Call Result Lowering","created_at":"2026-03-27","updated_at":"2026-03-30","tags":["compiler","pbs","ergonomics","lowering","runtime","asset-identity","expression-statements"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0024","file":"discussion/lessons/DSC-0006-pbs-game-facing-asset-refs-and-call-result-discard/LSN-0024-addressable-surface-host-metadata-and-ignored-value-discipline.md","status":"done","created_at":"2026-03-30","updated_at":"2026-03-30"}]}
|
||||
{"type":"discussion","id":"DSC-0007","status":"done","ticket":"pbs-learn-to-discussion-lessons-migration","title":"Migrate PBS Learn Documents into Discussion Lessons","created_at":"2026-03-27","updated_at":"2026-03-27","tags":["compiler","pbs","migration","discussion-framework","lessons","learn-prune"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0018","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0018-pbs-ast-and-parser-contract-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0019","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0019-pbs-name-resolution-and-linking-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0020","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0020-pbs-runtime-values-identity-memory-boundaries-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0021","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0021-pbs-diagnostics-and-conformance-governance-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0022","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0022-pbs-globals-lifecycle-and-published-entrypoint-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"}]}
|
||||
{"type":"discussion","id":"DSC-0008","status":"done","ticket":"pbs-low-level-asset-manager-surface","title":"PBS Low-Level Asset Manager Surface for Runtime AssetManager","created_at":"2026-03-27","updated_at":"2026-03-27","tags":["compiler","pbs","runtime","asset-manager","host-abi","stdlib","asset"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0023","file":"discussion/lessons/DSC-0008-pbs-low-level-asset-manager-surface/LSN-0023-lowassets-runtime-aligned-sdk-surface.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"}]}
|
||||
{"type":"discussion","id":"DSC-0009","status":"open","ticket":"studio-debugger-workspace-integration","title":"Integrate ../debugger into Studio as a dedicated workspace","created_at":"2026-03-30","updated_at":"2026-03-30","tags":["studio","debugger","workspace","integration","shell"],"agendas":[{"id":"AGD-0009","file":"AGD-0009-studio-debugger-workspace-integration.md","status":"open","created_at":"2026-03-30","updated_at":"2026-03-30"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0010","status":"done","ticket":"studio-code-editor-workspace-foundations","title":"Establish Code Editor workspace foundations in Studio without LSP","created_at":"2026-03-30","updated_at":"2026-03-31","tags":["studio","editor","workspace","multi-frontend","lsp-deferred"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0026","file":"discussion/lessons/DSC-0010-studio-code-editor-workspace-foundations/LSN-0026-read-only-editor-foundations-and-semantic-deferral.md","status":"done","created_at":"2026-03-31","updated_at":"2026-03-31"}]}
|
||||
{"type":"discussion","id":"DSC-0011","status":"done","ticket":"compiler-analyze-compile-build-pipeline-split","title":"Split compiler pipeline into analyze, compile, and build entrypoints","created_at":"2026-03-30","updated_at":"2026-03-30","tags":["compiler","pipeline","artifacts","build","analysis"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0025","file":"discussion/lessons/DSC-0011-compiler-analyze-compile-build-pipeline-split/LSN-0025-compiler-pipeline-entrypoints-and-result-boundaries.md","status":"done","created_at":"2026-03-30","updated_at":"2026-03-30"}]}
|
||||
{"type":"discussion","id":"DSC-0012","status":"done","ticket":"studio-editor-document-vfs-boundary","title":"Definir um boundary de VFS documental para tree/view/open files no Code Editor do Studio","created_at":"2026-03-31","updated_at":"2026-03-31","tags":["studio","editor","workspace","vfs","filesystem","boundary"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0027","file":"discussion/lessons/DSC-0012-studio-editor-document-vfs-boundary/LSN-0027-project-document-vfs-and-session-owned-editor-boundary.md","status":"done","created_at":"2026-03-31","updated_at":"2026-03-31"}]}
|
||||
{"type":"discussion","id":"DSC-0013","status":"done","ticket":"studio-editor-write-wave-supported-non-frontend-files","title":"Definir a wave inicial de edicao no Code Editor apenas para arquivos aceitos e nao relacionados ao FE","created_at":"2026-03-31","updated_at":"2026-04-02","tags":["studio","editor","workspace","write","read-only","vfs","frontend-boundary"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0028","file":"discussion/lessons/DSC-0013-studio-editor-write-wave-supported-non-frontend-files/LSN-0028-controlled-editor-write-wave-and-read-only-frontend-semantic-phase.md","status":"done","created_at":"2026-04-02","updated_at":"2026-04-02"}]}
|
||||
{"type":"discussion","id":"DSC-0014","status":"open","ticket":"studio-frontend-owned-semantic-editor-presentation","title":"Definir ownership do schema visual semantico do editor por frontend","created_at":"2026-04-02","updated_at":"2026-04-02","tags":["studio","editor","frontend","presentation","semantic-highlighting","compiler","pbs"],"agendas":[{"id":"AGD-0015","file":"AGD-0015-studio-frontend-owned-semantic-editor-presentation.md","status":"accepted","created_at":"2026-04-02","updated_at":"2026-04-02"}],"decisions":[{"id":"DEC-0012","file":"DEC-0012-frontend-owned-semantic-editor-presentation.md","status":"accepted","created_at":"2026-04-02","updated_at":"2026-04-02","ref_agenda":"AGD-0015"}],"plans":[{"id":"PLN-0026","file":"PLN-0026-propagate-dec-0012-into-studio-and-frontend-specs.md","status":"review","created_at":"2026-04-02","updated_at":"2026-04-02","ref_decisions":["DEC-0012"]},{"id":"PLN-0027","file":"PLN-0027-add-frontend-semantic-presentation-contract-and-lsp-descriptor.md","status":"review","created_at":"2026-04-02","updated_at":"2026-04-02","ref_decisions":["DEC-0012"]},{"id":"PLN-0028","file":"PLN-0028-consume-frontend-owned-semantic-presentation-in-studio.md","status":"review","created_at":"2026-04-02","updated_at":"2026-04-02","ref_decisions":["DEC-0012"]}],"lessons":[]}
|
||||
@@ -1,19 +0,0 @@
|
||||
{"type":"meta","next_id":{"DSC":19,"AGD":20,"DEC":17,"PLN":38,"LSN":31,"CLSN":1}}
|
||||
{"type":"discussion","id":"DSC-0001","status":"done","ticket":"studio-docs-import","title":"Import docs/studio into discussion-framework artifacts","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["studio","migration","discussion-framework","docs-import"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0001","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0001-assets-workspace-execution-wave-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0002","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0002-bank-composition-editor-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0003","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0003-mental-model-asset-mutations-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0004","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0004-mental-model-assets-workspace-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0005","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0005-mental-model-studio-events-and-components-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0006","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0006-mental-model-studio-shell-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0007","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0007-pack-wizard-shell-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0008","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0008-project-scoped-state-and-activity-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0016","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0016-studio-docs-import-pattern.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"}]}
|
||||
{"type":"discussion","id":"DSC-0002","status":"open","ticket":"palette-management-in-studio","title":"Palette Management in Studio","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["studio","legacy-import","palette-management","tile-bank","packer-boundary"],"agendas":[{"id":"AGD-0002","file":"AGD-0002-palette-management-in-studio.md","status":"open","created_at":"2026-03-26","updated_at":"2026-03-26"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0003","status":"done","ticket":"packer-docs-import","title":"Import docs/packer into discussion-framework artifacts","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["packer","migration","discussion-framework","docs-import"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0009","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0009-mental-model-packer-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0010","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0010-asset-identity-and-runtime-contract-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0011","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0011-foundations-workspace-runtime-and-build-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0012","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0012-runtime-ownership-and-studio-boundary-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0013","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0013-metadata-convergence-and-runtime-sink-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0014","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0014-pack-wizard-summary-validation-and-pack-execution-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0015","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0015-tile-bank-packing-contract-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0017","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0017-packer-docs-import-pattern.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"}]}
|
||||
{"type":"discussion","id":"DSC-0004","status":"open","ticket":"tilemap-and-metatile-runtime-binary-layout","title":"Tilemap and Metatile Runtime Binary Layout","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["packer","legacy-import","tilemap","metatile","runtime-layout"],"agendas":[{"id":"AGD-0004","file":"AGD-0004-tilemap-and-metatile-runtime-binary-layout.md","status":"open","created_at":"2026-03-26","updated_at":"2026-03-26"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0005","status":"open","ticket":"variable-tile-bank-palette-serialization","title":"Variable Tile Bank Palette Serialization","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["packer","legacy-import","tile-bank","palette-serialization","versioning"],"agendas":[{"id":"AGD-0005","file":"AGD-0005-variable-tile-bank-palette-serialization.md","status":"open","created_at":"2026-03-26","updated_at":"2026-03-26"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0006","status":"done","ticket":"pbs-game-facing-asset-refs-and-call-result-discard","title":"PBS Game-Facing Asset References and Ignored Call Result Lowering","created_at":"2026-03-27","updated_at":"2026-03-30","tags":["compiler","pbs","ergonomics","lowering","runtime","asset-identity","expression-statements"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0024","file":"discussion/lessons/DSC-0006-pbs-game-facing-asset-refs-and-call-result-discard/LSN-0024-addressable-surface-host-metadata-and-ignored-value-discipline.md","status":"done","created_at":"2026-03-30","updated_at":"2026-03-30"}]}
|
||||
{"type":"discussion","id":"DSC-0007","status":"done","ticket":"pbs-learn-to-discussion-lessons-migration","title":"Migrate PBS Learn Documents into Discussion Lessons","created_at":"2026-03-27","updated_at":"2026-03-27","tags":["compiler","pbs","migration","discussion-framework","lessons","learn-prune"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0018","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0018-pbs-ast-and-parser-contract-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0019","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0019-pbs-name-resolution-and-linking-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0020","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0020-pbs-runtime-values-identity-memory-boundaries-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0021","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0021-pbs-diagnostics-and-conformance-governance-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0022","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0022-pbs-globals-lifecycle-and-published-entrypoint-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"}]}
|
||||
{"type":"discussion","id":"DSC-0008","status":"done","ticket":"pbs-low-level-asset-manager-surface","title":"PBS Low-Level Asset Manager Surface for Runtime AssetManager","created_at":"2026-03-27","updated_at":"2026-03-27","tags":["compiler","pbs","runtime","asset-manager","host-abi","stdlib","asset"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0023","file":"discussion/lessons/DSC-0008-pbs-low-level-asset-manager-surface/LSN-0023-lowassets-runtime-aligned-sdk-surface.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"}]}
|
||||
{"type":"discussion","id":"DSC-0009","status":"open","ticket":"studio-debugger-workspace-integration","title":"Integrate ../debugger into Studio as a dedicated workspace","created_at":"2026-03-30","updated_at":"2026-03-30","tags":["studio","debugger","workspace","integration","shell"],"agendas":[{"id":"AGD-0009","file":"AGD-0009-studio-debugger-workspace-integration.md","status":"open","created_at":"2026-03-30","updated_at":"2026-03-30"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0010","status":"done","ticket":"studio-code-editor-workspace-foundations","title":"Establish Code Editor workspace foundations in Studio without LSP","created_at":"2026-03-30","updated_at":"2026-03-31","tags":["studio","editor","workspace","multi-frontend","lsp-deferred"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0026","file":"discussion/lessons/DSC-0010-studio-code-editor-workspace-foundations/LSN-0026-read-only-editor-foundations-and-semantic-deferral.md","status":"done","created_at":"2026-03-31","updated_at":"2026-03-31"}]}
|
||||
{"type":"discussion","id":"DSC-0011","status":"done","ticket":"compiler-analyze-compile-build-pipeline-split","title":"Split compiler pipeline into analyze, compile, and build entrypoints","created_at":"2026-03-30","updated_at":"2026-03-30","tags":["compiler","pipeline","artifacts","build","analysis"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0025","file":"discussion/lessons/DSC-0011-compiler-analyze-compile-build-pipeline-split/LSN-0025-compiler-pipeline-entrypoints-and-result-boundaries.md","status":"done","created_at":"2026-03-30","updated_at":"2026-03-30"}]}
|
||||
{"type":"discussion","id":"DSC-0012","status":"done","ticket":"studio-editor-document-vfs-boundary","title":"Definir um boundary de VFS documental para tree/view/open files no Code Editor do Studio","created_at":"2026-03-31","updated_at":"2026-03-31","tags":["studio","editor","workspace","vfs","filesystem","boundary"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0027","file":"discussion/lessons/DSC-0012-studio-editor-document-vfs-boundary/LSN-0027-project-document-vfs-and-session-owned-editor-boundary.md","status":"done","created_at":"2026-03-31","updated_at":"2026-03-31"}]}
|
||||
{"type":"discussion","id":"DSC-0013","status":"done","ticket":"studio-editor-write-wave-supported-non-frontend-files","title":"Definir a wave inicial de edicao no Code Editor apenas para arquivos aceitos e nao relacionados ao FE","created_at":"2026-03-31","updated_at":"2026-04-02","tags":["studio","editor","workspace","write","read-only","vfs","frontend-boundary"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0028","file":"discussion/lessons/DSC-0013-studio-editor-write-wave-supported-non-frontend-files/LSN-0028-controlled-editor-write-wave-and-read-only-frontend-semantic-phase.md","status":"done","created_at":"2026-04-02","updated_at":"2026-04-02"}]}
|
||||
{"type":"discussion","id":"DSC-0014","status":"done","ticket":"studio-frontend-owned-semantic-editor-presentation","title":"Definir ownership do schema visual semantico do editor por frontend","created_at":"2026-04-02","updated_at":"2026-04-02","tags":["studio","editor","frontend","presentation","semantic-highlighting","compiler","pbs"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0029","file":"discussion/lessons/DSC-0014-studio-frontend-owned-semantic-editor-presentation/LSN-0029-frontend-owned-semantic-presentation-descriptor-and-host-consumption.md","status":"done","created_at":"2026-04-02","updated_at":"2026-04-02"}]}
|
||||
{"type":"discussion","id":"DSC-0015","status":"done","ticket":"pbs-service-facade-reserved-metadata","title":"SDK Service Bodies Calling Builtin/Intrinsic Proxies as Ordinary PBS Code","created_at":"2026-04-03","updated_at":"2026-04-03","tags":["compiler","pbs","sdk","stdlib","lowering","service","intrinsic","sdk-interface"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0030","file":"discussion/lessons/DSC-0015-pbs-service-facade-reserved-metadata/LSN-0030-sdk-service-bodies-over-private-reserved-proxies.md","status":"done","created_at":"2026-04-03","updated_at":"2026-04-03"}]}
|
||||
{"type":"discussion","id":"DSC-0016","status":"open","ticket":"studio-editor-scope-guides-and-brace-anchoring","title":"Scope Guides do Code Editor com ancoragem exata em braces e destaque do escopo ativo","created_at":"2026-04-03","updated_at":"2026-04-03","tags":["studio","editor","scope-guides","braces","semantic-read","frontend-contract"],"agendas":[{"id":"AGD-0017","file":"AGD-0017-studio-editor-scope-guides-and-brace-anchoring.md","status":"accepted","created_at":"2026-04-03","updated_at":"2026-04-03"}],"decisions":[{"id":"DEC-0014","file":"DEC-0014-studio-editor-active-scope-and-structural-anchors.md","status":"accepted","created_at":"2026-04-03","updated_at":"2026-04-03"}],"plans":[{"id":"PLN-0030","file":"PLN-0030-studio-active-container-and-active-scope-gutter-wave-1.md","status":"done","created_at":"2026-04-03","updated_at":"2026-04-03"},{"id":"PLN-0031","file":"PLN-0031-studio-structural-anchor-semantic-surface-specification.md","status":"done","created_at":"2026-04-03","updated_at":"2026-04-03"},{"id":"PLN-0032","file":"PLN-0032-frontend-structural-anchor-payloads-and-anchor-aware-tests.md","status":"done","created_at":"2026-04-03","updated_at":"2026-04-03"}],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0017","status":"open","ticket":"studio-editor-inline-type-hints-for-let-bindings","title":"Inline Type Hints for Let Bindings in the Studio Editor","created_at":"2026-04-03","updated_at":"2026-04-03","tags":["studio","editor","inline-hints","inlay-hints","lsp","pbs","type-inference"],"agendas":[{"id":"AGD-0018","file":"AGD-0018-studio-editor-inline-type-hints-for-let-bindings.md","status":"accepted","created_at":"2026-04-03","updated_at":"2026-04-03"}],"decisions":[{"id":"DEC-0015","file":"DEC-0015-studio-editor-inline-type-hints-contract-and-rendering-model.md","status":"accepted","created_at":"2026-04-03","updated_at":"2026-04-03","ref_agenda":"AGD-0018"}],"plans":[{"id":"PLN-0033","file":"PLN-0033-inline-hint-spec-and-contract-propagation.md","status":"done","created_at":"2026-04-03","updated_at":"2026-04-03","ref_decisions":["DEC-0015"]},{"id":"PLN-0034","file":"PLN-0034-lsp-inline-hint-transport-contract.md","status":"done","created_at":"2026-04-03","updated_at":"2026-04-03","ref_decisions":["DEC-0015"]},{"id":"PLN-0035","file":"PLN-0035-pbs-inline-type-hint-payload-production.md","status":"done","created_at":"2026-04-03","updated_at":"2026-04-03","ref_decisions":["DEC-0015"]},{"id":"PLN-0036","file":"PLN-0036-studio-inline-hint-rendering-and-rollout.md","status":"done","created_at":"2026-04-03","updated_at":"2026-04-03","ref_decisions":["DEC-0015"]}],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0018","status":"open","ticket":"studio-project-local-studio-state-under-dot-studio","title":"Persist project-local Studio state under .studio","created_at":"2026-04-04","updated_at":"2026-04-04","tags":["studio","project-session","project-state","persistence","dot-studio","shell","layout","setup"],"agendas":[{"id":"AGD-0019","file":"AGD-0019-studio-project-open-state-under-dot-studio.md","status":"accepted","created_at":"2026-04-04","updated_at":"2026-04-04"}],"decisions":[{"id":"DEC-0016","file":"DEC-0016-project-local-studio-state-under-dot-studio.md","status":"accepted","created_at":"2026-04-04","updated_at":"2026-04-04","ref_agenda":"AGD-0019"}],"plans":[{"id":"PLN-0037","file":"PLN-0037-project-local-studio-state-store-and-restoration.md","status":"done","created_at":"2026-04-04","updated_at":"2026-04-04","ref_decisions":["DEC-0016"]}],"lessons":[]}
|
||||
@@ -1,20 +0,0 @@
|
||||
{"type":"meta","next_id":{"DSC":20,"AGD":21,"DEC":18,"PLN":39,"LSN":32,"CLSN":1}}
|
||||
{"type":"discussion","id":"DSC-0001","status":"done","ticket":"studio-docs-import","title":"Import docs/studio into discussion-framework artifacts","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["studio","migration","discussion-framework","docs-import"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0001","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0001-assets-workspace-execution-wave-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0002","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0002-bank-composition-editor-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0003","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0003-mental-model-asset-mutations-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0004","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0004-mental-model-assets-workspace-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0005","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0005-mental-model-studio-events-and-components-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0006","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0006-mental-model-studio-shell-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0007","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0007-pack-wizard-shell-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0008","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0008-project-scoped-state-and-activity-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0016","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0016-studio-docs-import-pattern.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"}]}
|
||||
{"type":"discussion","id":"DSC-0002","status":"open","ticket":"palette-management-in-studio","title":"Palette Management in Studio","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["studio","legacy-import","palette-management","tile-bank","packer-boundary"],"agendas":[{"id":"AGD-0002","file":"AGD-0002-palette-management-in-studio.md","status":"open","created_at":"2026-03-26","updated_at":"2026-03-26"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0003","status":"done","ticket":"packer-docs-import","title":"Import docs/packer into discussion-framework artifacts","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["packer","migration","discussion-framework","docs-import"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0009","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0009-mental-model-packer-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0010","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0010-asset-identity-and-runtime-contract-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0011","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0011-foundations-workspace-runtime-and-build-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0012","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0012-runtime-ownership-and-studio-boundary-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0013","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0013-metadata-convergence-and-runtime-sink-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0014","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0014-pack-wizard-summary-validation-and-pack-execution-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0015","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0015-tile-bank-packing-contract-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0017","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0017-packer-docs-import-pattern.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"}]}
|
||||
{"type":"discussion","id":"DSC-0004","status":"open","ticket":"tilemap-and-metatile-runtime-binary-layout","title":"Tilemap and Metatile Runtime Binary Layout","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["packer","legacy-import","tilemap","metatile","runtime-layout"],"agendas":[{"id":"AGD-0004","file":"AGD-0004-tilemap-and-metatile-runtime-binary-layout.md","status":"open","created_at":"2026-03-26","updated_at":"2026-03-26"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0005","status":"open","ticket":"variable-tile-bank-palette-serialization","title":"Variable Tile Bank Palette Serialization","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["packer","legacy-import","tile-bank","palette-serialization","versioning"],"agendas":[{"id":"AGD-0005","file":"AGD-0005-variable-tile-bank-palette-serialization.md","status":"open","created_at":"2026-03-26","updated_at":"2026-03-26"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0006","status":"done","ticket":"pbs-game-facing-asset-refs-and-call-result-discard","title":"PBS Game-Facing Asset References and Ignored Call Result Lowering","created_at":"2026-03-27","updated_at":"2026-03-30","tags":["compiler","pbs","ergonomics","lowering","runtime","asset-identity","expression-statements"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0024","file":"discussion/lessons/DSC-0006-pbs-game-facing-asset-refs-and-call-result-discard/LSN-0024-addressable-surface-host-metadata-and-ignored-value-discipline.md","status":"done","created_at":"2026-03-30","updated_at":"2026-03-30"}]}
|
||||
{"type":"discussion","id":"DSC-0007","status":"done","ticket":"pbs-learn-to-discussion-lessons-migration","title":"Migrate PBS Learn Documents into Discussion Lessons","created_at":"2026-03-27","updated_at":"2026-03-27","tags":["compiler","pbs","migration","discussion-framework","lessons","learn-prune"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0018","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0018-pbs-ast-and-parser-contract-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0019","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0019-pbs-name-resolution-and-linking-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0020","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0020-pbs-runtime-values-identity-memory-boundaries-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0021","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0021-pbs-diagnostics-and-conformance-governance-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0022","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0022-pbs-globals-lifecycle-and-published-entrypoint-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"}]}
|
||||
{"type":"discussion","id":"DSC-0008","status":"done","ticket":"pbs-low-level-asset-manager-surface","title":"PBS Low-Level Asset Manager Surface for Runtime AssetManager","created_at":"2026-03-27","updated_at":"2026-03-27","tags":["compiler","pbs","runtime","asset-manager","host-abi","stdlib","asset"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0023","file":"discussion/lessons/DSC-0008-pbs-low-level-asset-manager-surface/LSN-0023-lowassets-runtime-aligned-sdk-surface.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"}]}
|
||||
{"type":"discussion","id":"DSC-0009","status":"open","ticket":"studio-debugger-workspace-integration","title":"Integrate ../debugger into Studio as a dedicated workspace","created_at":"2026-03-30","updated_at":"2026-03-30","tags":["studio","debugger","workspace","integration","shell"],"agendas":[{"id":"AGD-0009","file":"AGD-0009-studio-debugger-workspace-integration.md","status":"open","created_at":"2026-03-30","updated_at":"2026-03-30"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0010","status":"done","ticket":"studio-code-editor-workspace-foundations","title":"Establish Code Editor workspace foundations in Studio without LSP","created_at":"2026-03-30","updated_at":"2026-03-31","tags":["studio","editor","workspace","multi-frontend","lsp-deferred"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0026","file":"discussion/lessons/DSC-0010-studio-code-editor-workspace-foundations/LSN-0026-read-only-editor-foundations-and-semantic-deferral.md","status":"done","created_at":"2026-03-31","updated_at":"2026-03-31"}]}
|
||||
{"type":"discussion","id":"DSC-0011","status":"done","ticket":"compiler-analyze-compile-build-pipeline-split","title":"Split compiler pipeline into analyze, compile, and build entrypoints","created_at":"2026-03-30","updated_at":"2026-03-30","tags":["compiler","pipeline","artifacts","build","analysis"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0025","file":"discussion/lessons/DSC-0011-compiler-analyze-compile-build-pipeline-split/LSN-0025-compiler-pipeline-entrypoints-and-result-boundaries.md","status":"done","created_at":"2026-03-30","updated_at":"2026-03-30"}]}
|
||||
{"type":"discussion","id":"DSC-0012","status":"done","ticket":"studio-editor-document-vfs-boundary","title":"Definir um boundary de VFS documental para tree/view/open files no Code Editor do Studio","created_at":"2026-03-31","updated_at":"2026-03-31","tags":["studio","editor","workspace","vfs","filesystem","boundary"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0027","file":"discussion/lessons/DSC-0012-studio-editor-document-vfs-boundary/LSN-0027-project-document-vfs-and-session-owned-editor-boundary.md","status":"done","created_at":"2026-03-31","updated_at":"2026-03-31"}]}
|
||||
{"type":"discussion","id":"DSC-0013","status":"done","ticket":"studio-editor-write-wave-supported-non-frontend-files","title":"Definir a wave inicial de edicao no Code Editor apenas para arquivos aceitos e nao relacionados ao FE","created_at":"2026-03-31","updated_at":"2026-04-02","tags":["studio","editor","workspace","write","read-only","vfs","frontend-boundary"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0028","file":"discussion/lessons/DSC-0013-studio-editor-write-wave-supported-non-frontend-files/LSN-0028-controlled-editor-write-wave-and-read-only-frontend-semantic-phase.md","status":"done","created_at":"2026-04-02","updated_at":"2026-04-02"}]}
|
||||
{"type":"discussion","id":"DSC-0014","status":"done","ticket":"studio-frontend-owned-semantic-editor-presentation","title":"Definir ownership do schema visual semantico do editor por frontend","created_at":"2026-04-02","updated_at":"2026-04-02","tags":["studio","editor","frontend","presentation","semantic-highlighting","compiler","pbs"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0029","file":"discussion/lessons/DSC-0014-studio-frontend-owned-semantic-editor-presentation/LSN-0029-frontend-owned-semantic-presentation-descriptor-and-host-consumption.md","status":"done","created_at":"2026-04-02","updated_at":"2026-04-02"}]}
|
||||
{"type":"discussion","id":"DSC-0015","status":"done","ticket":"pbs-service-facade-reserved-metadata","title":"SDK Service Bodies Calling Builtin/Intrinsic Proxies as Ordinary PBS Code","created_at":"2026-04-03","updated_at":"2026-04-03","tags":["compiler","pbs","sdk","stdlib","lowering","service","intrinsic","sdk-interface"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0030","file":"discussion/lessons/DSC-0015-pbs-service-facade-reserved-metadata/LSN-0030-sdk-service-bodies-over-private-reserved-proxies.md","status":"done","created_at":"2026-04-03","updated_at":"2026-04-03"}]}
|
||||
{"type":"discussion","id":"DSC-0016","status":"open","ticket":"studio-editor-scope-guides-and-brace-anchoring","title":"Scope Guides do Code Editor com ancoragem exata em braces e destaque do escopo ativo","created_at":"2026-04-03","updated_at":"2026-04-03","tags":["studio","editor","scope-guides","braces","semantic-read","frontend-contract"],"agendas":[{"id":"AGD-0017","file":"AGD-0017-studio-editor-scope-guides-and-brace-anchoring.md","status":"accepted","created_at":"2026-04-03","updated_at":"2026-04-03"}],"decisions":[{"id":"DEC-0014","file":"DEC-0014-studio-editor-active-scope-and-structural-anchors.md","status":"accepted","created_at":"2026-04-03","updated_at":"2026-04-03"}],"plans":[{"id":"PLN-0030","file":"PLN-0030-studio-active-container-and-active-scope-gutter-wave-1.md","status":"done","created_at":"2026-04-03","updated_at":"2026-04-03"},{"id":"PLN-0031","file":"PLN-0031-studio-structural-anchor-semantic-surface-specification.md","status":"done","created_at":"2026-04-03","updated_at":"2026-04-03"},{"id":"PLN-0032","file":"PLN-0032-frontend-structural-anchor-payloads-and-anchor-aware-tests.md","status":"done","created_at":"2026-04-03","updated_at":"2026-04-03"}],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0017","status":"open","ticket":"studio-editor-inline-type-hints-for-let-bindings","title":"Inline Type Hints for Let Bindings in the Studio Editor","created_at":"2026-04-03","updated_at":"2026-04-03","tags":["studio","editor","inline-hints","inlay-hints","lsp","pbs","type-inference"],"agendas":[{"id":"AGD-0018","file":"AGD-0018-studio-editor-inline-type-hints-for-let-bindings.md","status":"accepted","created_at":"2026-04-03","updated_at":"2026-04-03"}],"decisions":[{"id":"DEC-0015","file":"DEC-0015-studio-editor-inline-type-hints-contract-and-rendering-model.md","status":"accepted","created_at":"2026-04-03","updated_at":"2026-04-03","ref_agenda":"AGD-0018"}],"plans":[{"id":"PLN-0033","file":"PLN-0033-inline-hint-spec-and-contract-propagation.md","status":"done","created_at":"2026-04-03","updated_at":"2026-04-03","ref_decisions":["DEC-0015"]},{"id":"PLN-0034","file":"PLN-0034-lsp-inline-hint-transport-contract.md","status":"done","created_at":"2026-04-03","updated_at":"2026-04-03","ref_decisions":["DEC-0015"]},{"id":"PLN-0035","file":"PLN-0035-pbs-inline-type-hint-payload-production.md","status":"done","created_at":"2026-04-03","updated_at":"2026-04-03","ref_decisions":["DEC-0015"]},{"id":"PLN-0036","file":"PLN-0036-studio-inline-hint-rendering-and-rollout.md","status":"done","created_at":"2026-04-03","updated_at":"2026-04-03","ref_decisions":["DEC-0015"]}],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0018","status":"done","ticket":"studio-project-local-studio-state-under-dot-studio","title":"Persist project-local Studio state under .studio","created_at":"2026-04-04","updated_at":"2026-04-04","tags":["studio","project-session","project-state","persistence","dot-studio","shell","layout","setup"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0031","file":"discussion/lessons/DSC-0018-studio-project-local-studio-state-under-dot-studio/LSN-0031-project-local-studio-state-and-lifecycle-safe-layout-restoration.md","status":"done","created_at":"2026-04-04","updated_at":"2026-04-04"}]}
|
||||
{"type":"discussion","id":"DSC-0019","status":"open","ticket":"studio-project-local-setup-separate-from-main-studio-state","title":"Separate project-local setup from the main Studio state under .studio","created_at":"2026-04-04","updated_at":"2026-04-04","tags":["studio","project-session","project-state","persistence","dot-studio","setup","boundary"],"agendas":[{"id":"AGD-0020","file":"AGD-0020-project-local-setup-separate-from-main-studio-state.md","status":"accepted","created_at":"2026-04-04","updated_at":"2026-04-04"}],"decisions":[{"id":"DEC-0017","file":"DEC-0017-project-local-setup-separate-from-session-state.md","status":"accepted","created_at":"2026-04-04","updated_at":"2026-04-04","ref_agenda":"AGD-0020"}],"plans":[{"id":"PLN-0038","file":"PLN-0038-separate-project-local-setup-from-session-state.md","status":"done","created_at":"2026-04-04","updated_at":"2026-04-04","ref_decisions":["DEC-0017"]}],"lessons":[]}
|
||||
@@ -1,22 +0,0 @@
|
||||
{"type":"meta","next_id":{"DSC":22,"AGD":23,"DEC":20,"PLN":41,"LSN":34,"CLSN":1}}
|
||||
{"type":"discussion","id":"DSC-0001","status":"done","ticket":"studio-docs-import","title":"Import docs/studio into discussion-framework artifacts","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["studio","migration","discussion-framework","docs-import"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0001","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0001-assets-workspace-execution-wave-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0002","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0002-bank-composition-editor-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0003","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0003-mental-model-asset-mutations-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0004","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0004-mental-model-assets-workspace-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0005","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0005-mental-model-studio-events-and-components-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0006","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0006-mental-model-studio-shell-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0007","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0007-pack-wizard-shell-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0008","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0008-project-scoped-state-and-activity-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0016","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0016-studio-docs-import-pattern.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"}]}
|
||||
{"type":"discussion","id":"DSC-0002","status":"open","ticket":"palette-management-in-studio","title":"Palette Management in Studio","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["studio","legacy-import","palette-management","tile-bank","packer-boundary"],"agendas":[{"id":"AGD-0002","file":"AGD-0002-palette-management-in-studio.md","status":"open","created_at":"2026-03-26","updated_at":"2026-03-26"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0003","status":"done","ticket":"packer-docs-import","title":"Import docs/packer into discussion-framework artifacts","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["packer","migration","discussion-framework","docs-import"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0009","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0009-mental-model-packer-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0010","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0010-asset-identity-and-runtime-contract-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0011","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0011-foundations-workspace-runtime-and-build-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0012","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0012-runtime-ownership-and-studio-boundary-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0013","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0013-metadata-convergence-and-runtime-sink-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0014","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0014-pack-wizard-summary-validation-and-pack-execution-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0015","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0015-tile-bank-packing-contract-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0017","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0017-packer-docs-import-pattern.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"}]}
|
||||
{"type":"discussion","id":"DSC-0004","status":"open","ticket":"tilemap-and-metatile-runtime-binary-layout","title":"Tilemap and Metatile Runtime Binary Layout","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["packer","legacy-import","tilemap","metatile","runtime-layout"],"agendas":[{"id":"AGD-0004","file":"AGD-0004-tilemap-and-metatile-runtime-binary-layout.md","status":"open","created_at":"2026-03-26","updated_at":"2026-03-26"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0005","status":"open","ticket":"variable-tile-bank-palette-serialization","title":"Variable Tile Bank Palette Serialization","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["packer","legacy-import","tile-bank","palette-serialization","versioning"],"agendas":[{"id":"AGD-0005","file":"AGD-0005-variable-tile-bank-palette-serialization.md","status":"open","created_at":"2026-03-26","updated_at":"2026-03-26"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0006","status":"done","ticket":"pbs-game-facing-asset-refs-and-call-result-discard","title":"PBS Game-Facing Asset References and Ignored Call Result Lowering","created_at":"2026-03-27","updated_at":"2026-03-30","tags":["compiler","pbs","ergonomics","lowering","runtime","asset-identity","expression-statements"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0024","file":"discussion/lessons/DSC-0006-pbs-game-facing-asset-refs-and-call-result-discard/LSN-0024-addressable-surface-host-metadata-and-ignored-value-discipline.md","status":"done","created_at":"2026-03-30","updated_at":"2026-03-30"}]}
|
||||
{"type":"discussion","id":"DSC-0007","status":"done","ticket":"pbs-learn-to-discussion-lessons-migration","title":"Migrate PBS Learn Documents into Discussion Lessons","created_at":"2026-03-27","updated_at":"2026-03-27","tags":["compiler","pbs","migration","discussion-framework","lessons","learn-prune"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0018","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0018-pbs-ast-and-parser-contract-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0019","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0019-pbs-name-resolution-and-linking-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0020","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0020-pbs-runtime-values-identity-memory-boundaries-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0021","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0021-pbs-diagnostics-and-conformance-governance-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0022","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0022-pbs-globals-lifecycle-and-published-entrypoint-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"}]}
|
||||
{"type":"discussion","id":"DSC-0008","status":"done","ticket":"pbs-low-level-asset-manager-surface","title":"PBS Low-Level Asset Manager Surface for Runtime AssetManager","created_at":"2026-03-27","updated_at":"2026-03-27","tags":["compiler","pbs","runtime","asset-manager","host-abi","stdlib","asset"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0023","file":"discussion/lessons/DSC-0008-pbs-low-level-asset-manager-surface/LSN-0023-lowassets-runtime-aligned-sdk-surface.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"}]}
|
||||
{"type":"discussion","id":"DSC-0009","status":"open","ticket":"studio-debugger-workspace-integration","title":"Integrate ../debugger into Studio as a dedicated workspace","created_at":"2026-03-30","updated_at":"2026-03-30","tags":["studio","debugger","workspace","integration","shell"],"agendas":[{"id":"AGD-0009","file":"AGD-0009-studio-debugger-workspace-integration.md","status":"open","created_at":"2026-03-30","updated_at":"2026-03-30"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0010","status":"done","ticket":"studio-code-editor-workspace-foundations","title":"Establish Code Editor workspace foundations in Studio without LSP","created_at":"2026-03-30","updated_at":"2026-03-31","tags":["studio","editor","workspace","multi-frontend","lsp-deferred"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0026","file":"discussion/lessons/DSC-0010-studio-code-editor-workspace-foundations/LSN-0026-read-only-editor-foundations-and-semantic-deferral.md","status":"done","created_at":"2026-03-31","updated_at":"2026-03-31"}]}
|
||||
{"type":"discussion","id":"DSC-0011","status":"done","ticket":"compiler-analyze-compile-build-pipeline-split","title":"Split compiler pipeline into analyze, compile, and build entrypoints","created_at":"2026-03-30","updated_at":"2026-03-30","tags":["compiler","pipeline","artifacts","build","analysis"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0025","file":"discussion/lessons/DSC-0011-compiler-analyze-compile-build-pipeline-split/LSN-0025-compiler-pipeline-entrypoints-and-result-boundaries.md","status":"done","created_at":"2026-03-30","updated_at":"2026-03-30"}]}
|
||||
{"type":"discussion","id":"DSC-0012","status":"done","ticket":"studio-editor-document-vfs-boundary","title":"Definir um boundary de VFS documental para tree/view/open files no Code Editor do Studio","created_at":"2026-03-31","updated_at":"2026-03-31","tags":["studio","editor","workspace","vfs","filesystem","boundary"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0027","file":"discussion/lessons/DSC-0012-studio-editor-document-vfs-boundary/LSN-0027-project-document-vfs-and-session-owned-editor-boundary.md","status":"done","created_at":"2026-03-31","updated_at":"2026-03-31"}]}
|
||||
{"type":"discussion","id":"DSC-0013","status":"done","ticket":"studio-editor-write-wave-supported-non-frontend-files","title":"Definir a wave inicial de edicao no Code Editor apenas para arquivos aceitos e nao relacionados ao FE","created_at":"2026-03-31","updated_at":"2026-04-02","tags":["studio","editor","workspace","write","read-only","vfs","frontend-boundary"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0028","file":"discussion/lessons/DSC-0013-studio-editor-write-wave-supported-non-frontend-files/LSN-0028-controlled-editor-write-wave-and-read-only-frontend-semantic-phase.md","status":"done","created_at":"2026-04-02","updated_at":"2026-04-02"}]}
|
||||
{"type":"discussion","id":"DSC-0014","status":"done","ticket":"studio-frontend-owned-semantic-editor-presentation","title":"Definir ownership do schema visual semantico do editor por frontend","created_at":"2026-04-02","updated_at":"2026-04-02","tags":["studio","editor","frontend","presentation","semantic-highlighting","compiler","pbs"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0029","file":"discussion/lessons/DSC-0014-studio-frontend-owned-semantic-editor-presentation/LSN-0029-frontend-owned-semantic-presentation-descriptor-and-host-consumption.md","status":"done","created_at":"2026-04-02","updated_at":"2026-04-02"}]}
|
||||
{"type":"discussion","id":"DSC-0015","status":"done","ticket":"pbs-service-facade-reserved-metadata","title":"SDK Service Bodies Calling Builtin/Intrinsic Proxies as Ordinary PBS Code","created_at":"2026-04-03","updated_at":"2026-04-03","tags":["compiler","pbs","sdk","stdlib","lowering","service","intrinsic","sdk-interface"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0030","file":"discussion/lessons/DSC-0015-pbs-service-facade-reserved-metadata/LSN-0030-sdk-service-bodies-over-private-reserved-proxies.md","status":"done","created_at":"2026-04-03","updated_at":"2026-04-03"}]}
|
||||
{"type":"discussion","id":"DSC-0016","status":"open","ticket":"studio-editor-scope-guides-and-brace-anchoring","title":"Scope Guides do Code Editor com ancoragem exata em braces e destaque do escopo ativo","created_at":"2026-04-03","updated_at":"2026-04-03","tags":["studio","editor","scope-guides","braces","semantic-read","frontend-contract"],"agendas":[{"id":"AGD-0017","file":"AGD-0017-studio-editor-scope-guides-and-brace-anchoring.md","status":"accepted","created_at":"2026-04-03","updated_at":"2026-04-03"}],"decisions":[{"id":"DEC-0014","file":"DEC-0014-studio-editor-active-scope-and-structural-anchors.md","status":"accepted","created_at":"2026-04-03","updated_at":"2026-04-03"}],"plans":[{"id":"PLN-0030","file":"PLN-0030-studio-active-container-and-active-scope-gutter-wave-1.md","status":"done","created_at":"2026-04-03","updated_at":"2026-04-03"},{"id":"PLN-0031","file":"PLN-0031-studio-structural-anchor-semantic-surface-specification.md","status":"done","created_at":"2026-04-03","updated_at":"2026-04-03"},{"id":"PLN-0032","file":"PLN-0032-frontend-structural-anchor-payloads-and-anchor-aware-tests.md","status":"done","created_at":"2026-04-03","updated_at":"2026-04-03"}],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0017","status":"open","ticket":"studio-editor-inline-type-hints-for-let-bindings","title":"Inline Type Hints for Let Bindings in the Studio Editor","created_at":"2026-04-03","updated_at":"2026-04-03","tags":["studio","editor","inline-hints","inlay-hints","lsp","pbs","type-inference"],"agendas":[{"id":"AGD-0018","file":"AGD-0018-studio-editor-inline-type-hints-for-let-bindings.md","status":"accepted","created_at":"2026-04-03","updated_at":"2026-04-03"}],"decisions":[{"id":"DEC-0015","file":"DEC-0015-studio-editor-inline-type-hints-contract-and-rendering-model.md","status":"accepted","created_at":"2026-04-03","updated_at":"2026-04-03","ref_agenda":"AGD-0018"}],"plans":[{"id":"PLN-0033","file":"PLN-0033-inline-hint-spec-and-contract-propagation.md","status":"done","created_at":"2026-04-03","updated_at":"2026-04-03","ref_decisions":["DEC-0015"]},{"id":"PLN-0034","file":"PLN-0034-lsp-inline-hint-transport-contract.md","status":"done","created_at":"2026-04-03","updated_at":"2026-04-03","ref_decisions":["DEC-0015"]},{"id":"PLN-0035","file":"PLN-0035-pbs-inline-type-hint-payload-production.md","status":"done","created_at":"2026-04-03","updated_at":"2026-04-03","ref_decisions":["DEC-0015"]},{"id":"PLN-0036","file":"PLN-0036-studio-inline-hint-rendering-and-rollout.md","status":"done","created_at":"2026-04-03","updated_at":"2026-04-03","ref_decisions":["DEC-0015"]}],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0018","status":"done","ticket":"studio-project-local-studio-state-under-dot-studio","title":"Persist project-local Studio state under .studio","created_at":"2026-04-04","updated_at":"2026-04-04","tags":["studio","project-session","project-state","persistence","dot-studio","shell","layout","setup"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0031","file":"discussion/lessons/DSC-0018-studio-project-local-studio-state-under-dot-studio/LSN-0031-project-local-studio-state-and-lifecycle-safe-layout-restoration.md","status":"done","created_at":"2026-04-04","updated_at":"2026-04-04"}]}
|
||||
{"type":"discussion","id":"DSC-0019","status":"done","ticket":"studio-project-local-setup-separate-from-main-studio-state","title":"Separate project-local setup from the main Studio state under .studio","created_at":"2026-04-04","updated_at":"2026-04-04","tags":["studio","project-session","project-state","persistence","dot-studio","setup","boundary"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0032","file":"discussion/lessons/DSC-0019-studio-project-local-setup-separate-from-main-studio-state/LSN-0032-separate-project-config-from-session-restoration-state.md","status":"done","created_at":"2026-04-04","updated_at":"2026-04-04"}]}
|
||||
{"type":"discussion","id":"DSC-0020","status":"done","ticket":"studio-editor-indentation-policy-and-project-setup","title":"Indentation Policy, Status-Bar Semantics, and Project-Local Editor Setup","created_at":"2026-04-04","updated_at":"2026-04-04","tags":["studio","editor","indentation","tabs","setup","dot-studio","configuration","ux"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0033","file":"discussion/lessons/DSC-0020-studio-editor-indentation-policy-and-project-setup/LSN-0033-setup-owned-indentation-policy-and-project-bootstrap-defaults.md","status":"done","created_at":"2026-04-04","updated_at":"2026-04-04"}]}
|
||||
{"type":"discussion","id":"DSC-0021","status":"open","ticket":"studio-frontend-editor-write-and-save-wave","title":"Enable Frontend Editing and Save in the Studio Code Editor","created_at":"2026-04-04","updated_at":"2026-04-04","tags":["studio","editor","frontend","write","save","vfs","lsp","pbs","access-policy"],"agendas":[{"id":"AGD-0022","file":"AGD-0022-studio-frontend-editor-write-and-save-wave.md","status":"accepted","created_at":"2026-04-04","updated_at":"2026-04-04"}],"decisions":[{"id":"DEC-0019","file":"DEC-0019-studio-frontend-editor-write-and-save-wave.md","status":"accepted","created_at":"2026-04-04","updated_at":"2026-04-04","ref_agenda":"AGD-0022"}],"plans":[{"id":"PLN-0040","file":"PLN-0040-studio-frontend-editor-write-and-save-wave.md","status":"done","created_at":"2026-04-04","updated_at":"2026-04-04","ref_decisions":["DEC-0019"]}],"lessons":[]}
|
||||
@@ -1,31 +0,0 @@
|
||||
{"type":"meta","next_id":{"DSC":31,"AGD":34,"DEC":31,"PLN":62,"LSN":47,"CLSN":1}}
|
||||
{"type":"discussion","id":"DSC-0030","status":"done","ticket":"studio-scene-pack-runtime-binary-contract","title":"Studio scene pack contract for runtime SCENE binary payload","created_at":"2026-04-24","updated_at":"2026-05-01","tags":["studio","packer","runtime","scene","asset-pack","binary-format","tiled"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0046","file":"discussion/lessons/DSC-0030-studio-scene-pack-runtime-binary-contract/LSN-0046-canonical-scene-owns-editorial-truth-while-pack-stays-request-driven.md","status":"done","created_at":"2026-05-01","updated_at":"2026-05-01"}]}
|
||||
{"type":"discussion","id":"DSC-0029","status":"done","ticket":"studio-frame-composer-syscall-and-sprite-alignment","title":"Studio Alignment with Runtime FrameComposer Syscalls and Sprite Composition","created_at":"2026-04-18","updated_at":"2026-04-18","tags":["studio","compiler","pbs","stdlib","runtime-alignment","abi","syscall","frame-composer","sprites"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0041","file":"discussion/lessons/DSC-0029-studio-frame-composer-syscall-and-sprite-alignment/LSN-0041-composer-must-own-public-sprite-composition.md","status":"done","created_at":"2026-04-18","updated_at":"2026-04-18"}]}
|
||||
{"type":"discussion","id":"DSC-0028","status":"done","ticket":"studio-tiled-parser-assets-scene-asset-type","title":"Tiled Parser and Scene Asset-Type Ownership in Assets Workspace","created_at":"2026-04-15","updated_at":"2026-04-23","tags":["studio","assets","scene","tiled","parser","asset-type"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0045","file":"discussion/lessons/DSC-0028-studio-tiled-parser-assets-scene-asset-type/LSN-0045-asset-owned-scene-bank-and-tiled-xml-workflow.md","status":"done","created_at":"2026-04-23","updated_at":"2026-04-23"}]}
|
||||
{"type":"discussion","id":"DSC-0027","status":"abandoned","ticket":"studio-scene-workspace","title":"Scene Workspace for SCENE Authoring","created_at":"2026-04-14","updated_at":"2026-04-15","tags":["studio","workspace","scene","tilemap","asset","runtime-alignment"],"agendas":[{"id":"AGD-0029","file":"AGD-0029-studio-scene-workspace.md","status":"abandoned","created_at":"2026-04-14","updated_at":"2026-04-15","_override_reason":"Explicit user request on 2026-04-15 to abandon the accepted agenda and its downstream work."}],"decisions":[{"id":"DEC-0026","file":"DEC-0026-studio-scene-workspace.md","status":"abandoned","created_at":"2026-04-14","updated_at":"2026-04-15","ref_agenda":"AGD-0029","_override_reason":"Explicit user request on 2026-04-15 to abandon the accepted decision and stop using it as normative guidance."}],"plans":[{"id":"PLN-0049","file":"PLN-0049-scene-workspace-spec-and-boundary-propagation.md","status":"abandoned","created_at":"2026-04-14","updated_at":"2026-04-15","ref_decisions":["DEC-0026"],"_override_reason":"Explicit user request on 2026-04-15 to abandon all plans derived from DEC-0026."},{"id":"PLN-0050","file":"PLN-0050-scene-workspace-shell-and-project-state-foundations.md","status":"abandoned","created_at":"2026-04-14","updated_at":"2026-04-15","ref_decisions":["DEC-0026"],"_override_reason":"Explicit user request on 2026-04-15 to abandon all plans derived from DEC-0026."},{"id":"PLN-0051","file":"PLN-0051-scene-artifact-and-assets-handoff-contract.md","status":"abandoned","created_at":"2026-04-14","updated_at":"2026-04-15","ref_decisions":["DEC-0026"],"_override_reason":"Explicit user request on 2026-04-15 to abandon all plans derived from DEC-0026."},{"id":"PLN-0052","file":"PLN-0052-scene-workspace-wave-1-tilemap-editor.md","status":"abandoned","created_at":"2026-04-14","updated_at":"2026-04-15","ref_decisions":["DEC-0026"],"_override_reason":"Explicit user request on 2026-04-15 to abandon all plans derived from DEC-0026."}],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0026","status":"done","ticket":"glyph-bank-naming-alignment-with-runtime","title":"Glyph Bank Naming Alignment with Runtime DEC-0006","created_at":"2026-04-10","updated_at":"2026-04-10","tags":["packer","studio","naming","asset-contract","runtime-alignment","glyph-bank"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0040","file":"discussion/lessons/DSC-0026-glyph-bank-naming-alignment-with-runtime/LSN-0040-glyph-bank-artifact-naming-alignment.md","status":"done","created_at":"2026-04-10","updated_at":"2026-04-10"}]}
|
||||
{"type":"discussion","id":"DSC-0025","status":"done","ticket":"packer-pipeline-metadata-ownership","title":"Pipeline Metadata Ownership and Runtime Contract","created_at":"2026-04-09","updated_at":"2026-04-10","tags":["packer","metadata","runtime-contract","tooling","studio"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0039","file":"discussion/lessons/DSC-0025-packer-pipeline-metadata-ownership/LSN-0039-runtime-header-boundary-and-tooling-owned-pipeline-metadata.md","status":"done","created_at":"2026-04-10","updated_at":"2026-04-10"}]}
|
||||
{"type":"discussion","id":"DSC-0024","status":"done","ticket":"jacoco-reports-consolidation","title":"JaCoCo Reports Consolidation in Gradle","created_at":"2026-04-07","updated_at":"2026-04-07","tags":["infra","gradle","jacoco","coverage","jenkins"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0038","file":"discussion/lessons/DSC-0024-jacoco-reports-consolidation/LSN-0038-jacoco-reports-consolidation.md","status":"done","created_at":"2026-04-07","updated_at":"2026-04-07"},{"id":"LSN-0044","file":"discussion/lessons/DSC-0024-jacoco-reports-consolidation/LSN-0044-jenkins-jacoco-alignment.md","status":"done","created_at":"2026-04-07","updated_at":"2026-04-07"}]}
|
||||
{"type":"discussion","id":"DSC-0001","status":"done","ticket":"studio-docs-import","title":"Import docs/studio into discussion-framework artifacts","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["studio","migration","discussion-framework","docs-import"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0001","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0001-assets-workspace-execution-wave-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0002","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0002-bank-composition-editor-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0003","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0003-mental-model-asset-mutations-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0004","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0004-mental-model-assets-workspace-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0005","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0005-mental-model-studio-events-and-components-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0006","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0006-mental-model-studio-shell-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0007","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0007-pack-wizard-shell-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0008","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0008-project-scoped-state-and-activity-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0016","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0016-studio-docs-import-pattern.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"}]}
|
||||
{"type":"discussion","id":"DSC-0002","status":"done","ticket":"palette-management-in-studio","title":"Palette Management in Studio","created_at":"2026-03-26","updated_at":"2026-04-23","tags":["studio","legacy-import","palette-management","tile-bank","packer-boundary"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0042","file":"discussion/lessons/DSC-0002-palette-management-in-studio/LSN-0042-schema-driven-palette-authoring-and-local-metadata-events.md","status":"done","created_at":"2026-04-23","updated_at":"2026-04-23"}]}
|
||||
{"type":"discussion","id":"DSC-0003","status":"done","ticket":"packer-docs-import","title":"Import docs/packer into discussion-framework artifacts","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["packer","migration","discussion-framework","docs-import"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0009","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0009-mental-model-packer-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0010","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0010-asset-identity-and-runtime-contract-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0011","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0011-foundations-workspace-runtime-and-build-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0012","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0012-runtime-ownership-and-studio-boundary-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0013","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0013-metadata-convergence-and-runtime-sink-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0014","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0014-pack-wizard-summary-validation-and-pack-execution-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0015","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0015-tile-bank-packing-contract-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0017","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0017-packer-docs-import-pattern.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"}]}
|
||||
{"type":"discussion","id":"DSC-0004","status":"abandoned","ticket":"tilemap-and-metatile-runtime-binary-layout","title":"Tilemap and Metatile Runtime Binary Layout","created_at":"2026-03-26","updated_at":"2026-04-24","tags":["packer","legacy-import","tilemap","metatile","runtime-layout"],"agendas":[{"id":"AGD-0004","file":"AGD-0004-tilemap-and-metatile-runtime-binary-layout.md","status":"abandoned","created_at":"2026-03-26","updated_at":"2026-04-24","_override_reason":"Explicit user request on 2026-04-24 to abandon AGD-0004 because the agenda is no longer valid."}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0005","status":"open","ticket":"variable-tile-bank-palette-serialization","title":"Variable Tile Bank Palette Serialization","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["packer","legacy-import","tile-bank","palette-serialization","versioning"],"agendas":[{"id":"AGD-0005","file":"AGD-0005-variable-tile-bank-palette-serialization.md","status":"open","created_at":"2026-03-26","updated_at":"2026-03-26"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0006","status":"done","ticket":"pbs-game-facing-asset-refs-and-call-result-discard","title":"PBS Game-Facing Asset References and Ignored Call Result Lowering","created_at":"2026-03-27","updated_at":"2026-03-30","tags":["compiler","pbs","ergonomics","lowering","runtime","asset-identity","expression-statements"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0024","file":"discussion/lessons/DSC-0006-pbs-game-facing-asset-refs-and-call-result-discard/LSN-0024-addressable-surface-host-metadata-and-ignored-value-discipline.md","status":"done","created_at":"2026-03-30","updated_at":"2026-03-30"}]}
|
||||
{"type":"discussion","id":"DSC-0007","status":"done","ticket":"pbs-learn-to-discussion-lessons-migration","title":"Migrate PBS Learn Documents into Discussion Lessons","created_at":"2026-03-27","updated_at":"2026-03-27","tags":["compiler","pbs","migration","discussion-framework","lessons","learn-prune"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0018","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0018-pbs-ast-and-parser-contract-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0019","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0019-pbs-name-resolution-and-linking-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0020","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0020-pbs-runtime-values-identity-memory-boundaries-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0021","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0021-pbs-diagnostics-and-conformance-governance-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0022","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0022-pbs-globals-lifecycle-and-published-entrypoint-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"}]}
|
||||
{"type":"discussion","id":"DSC-0008","status":"done","ticket":"pbs-low-level-asset-manager-surface","title":"PBS Low-Level Asset Manager Surface for Runtime AssetManager","created_at":"2026-03-27","updated_at":"2026-03-27","tags":["compiler","pbs","runtime","asset-manager","host-abi","stdlib","asset"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0023","file":"discussion/lessons/DSC-0008-pbs-low-level-asset-manager-surface/LSN-0023-lowassets-runtime-aligned-sdk-surface.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"}]}
|
||||
{"type":"discussion","id":"DSC-0009","status":"done","ticket":"studio-debugger-workspace-integration","title":"Integrate ../debugger into Studio as a dedicated workspace","created_at":"2026-03-30","updated_at":"2026-04-07","tags":["studio","debugger","workspace","integration","shell"],"agendas":[],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0010","status":"done","ticket":"studio-code-editor-workspace-foundations","title":"Establish Code Editor workspace foundations in Studio without LSP","created_at":"2026-03-30","updated_at":"2026-03-31","tags":["studio","editor","workspace","multi-frontend","lsp-deferred"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0026","file":"discussion/lessons/DSC-0010-studio-code-editor-workspace-foundations/LSN-0026-read-only-editor-foundations-and-semantic-deferral.md","status":"done","created_at":"2026-03-31","updated_at":"2026-03-31"}]}
|
||||
{"type":"discussion","id":"DSC-0011","status":"done","ticket":"compiler-analyze-compile-build-pipeline-split","title":"Split compiler pipeline into analyze, compile, and build entrypoints","created_at":"2026-03-30","updated_at":"2026-03-30","tags":["compiler","pipeline","artifacts","build","analysis"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0025","file":"discussion/lessons/DSC-0011-compiler-analyze-compile-build-pipeline-split/LSN-0025-compiler-pipeline-entrypoints-and-result-boundaries.md","status":"done","created_at":"2026-03-30","updated_at":"2026-03-30"}]}
|
||||
{"type":"discussion","id":"DSC-0012","status":"done","ticket":"studio-editor-document-vfs-boundary","title":"Definir um boundary de VFS documental para tree/view/open files no Code Editor do Studio","created_at":"2026-03-31","updated_at":"2026-03-31","tags":["studio","editor","workspace","vfs","filesystem","boundary"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0027","file":"discussion/lessons/DSC-0012-studio-editor-document-vfs-boundary/LSN-0027-project-document-vfs-and-session-owned-editor-boundary.md","status":"done","created_at":"2026-03-31","updated_at":"2026-03-31"}]}
|
||||
{"type":"discussion","id":"DSC-0013","status":"done","ticket":"studio-editor-write-wave-supported-non-frontend-files","title":"Definir a wave inicial de edicao no Code Editor apenas para arquivos aceitos e nao relacionados ao FE","created_at":"2026-03-31","updated_at":"2026-04-02","tags":["studio","editor","workspace","write","read-only","vfs","frontend-boundary"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0028","file":"discussion/lessons/DSC-0013-studio-editor-write-wave-supported-non-frontend-files/LSN-0028-controlled-editor-write-wave-and-read-only-frontend-semantic-phase.md","status":"done","created_at":"2026-04-02","updated_at":"2026-04-02"}]}
|
||||
{"type":"discussion","id":"DSC-0014","status":"done","ticket":"studio-frontend-owned-semantic-editor-presentation","title":"Definir ownership do schema visual semantico do editor por frontend","created_at":"2026-04-02","updated_at":"2026-04-02","tags":["studio","editor","frontend","presentation","semantic-highlighting","compiler","pbs"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0029","file":"discussion/lessons/DSC-0014-studio-frontend-owned-semantic-editor-presentation/LSN-0029-frontend-owned-semantic-presentation-descriptor-and-host-consumption.md","status":"done","created_at":"2026-04-02","updated_at":"2026-04-02"}]}
|
||||
{"type":"discussion","id":"DSC-0015","status":"done","ticket":"pbs-service-facade-reserved-metadata","title":"SDK Service Bodies Calling Builtin/Intrinsic Proxies as Ordinary PBS Code","created_at":"2026-04-03","updated_at":"2026-04-03","tags":["compiler","pbs","sdk","stdlib","lowering","service","intrinsic","sdk-interface"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0030","file":"discussion/lessons/DSC-0015-pbs-service-facade-reserved-metadata/LSN-0030-sdk-service-bodies-over-private-reserved-proxies.md","status":"done","created_at":"2026-04-03","updated_at":"2026-04-03"}]}
|
||||
{"type":"discussion","id":"DSC-0016","status":"done","ticket":"studio-editor-scope-guides-and-brace-anchoring","title":"Scope Guides do Code Editor com ancoragem exata em braces e destaque do escopo ativo","created_at":"2026-04-03","updated_at":"2026-04-06","tags":["studio","editor","scope-guides","braces","semantic-read","frontend-contract"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0034","file":"discussion/lessons/DSC-0016-studio-editor-scope-guides-and-brace-anchoring/LSN-0034-active-scope-gutter-and-frontend-owned-structural-anchors.md","status":"done","created_at":"2026-04-06","updated_at":"2026-04-06"}]}
|
||||
{"type":"discussion","id":"DSC-0017","status":"done","ticket":"studio-editor-inline-type-hints-for-let-bindings","title":"Inline Type Hints for Let Bindings in the Studio Editor","created_at":"2026-04-03","updated_at":"2026-04-06","tags":["studio","editor","inline-hints","inlay-hints","lsp","pbs","type-inference"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0035","file":"discussion/lessons/DSC-0017-studio-editor-inline-type-hints-for-let-bindings/LSN-0035-frontend-owned-inline-hints-with-decorative-inline-rendering.md","status":"done","created_at":"2026-04-06","updated_at":"2026-04-06"}]}
|
||||
{"type":"discussion","id":"DSC-0018","status":"done","ticket":"studio-project-local-studio-state-under-dot-studio","title":"Persist project-local Studio state under .studio","created_at":"2026-04-04","updated_at":"2026-04-04","tags":["studio","project-session","project-state","persistence","dot-studio","shell","layout","setup"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0031","file":"discussion/lessons/DSC-0018-studio-project-local-studio-state-under-dot-studio/LSN-0031-project-local-studio-state-and-lifecycle-safe-layout-restoration.md","status":"done","created_at":"2026-04-04","updated_at":"2026-04-04"}]}
|
||||
{"type":"discussion","id":"DSC-0019","status":"done","ticket":"studio-project-local-setup-separate-from-main-studio-state","title":"Separate project-local setup from the main Studio state under .studio","created_at":"2026-04-04","updated_at":"2026-04-04","tags":["studio","project-session","project-state","persistence","dot-studio","setup","boundary"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0032","file":"discussion/lessons/DSC-0019-studio-project-local-setup-separate-from-main-studio-state/LSN-0032-separate-project-config-from-session-restoration-state.md","status":"done","created_at":"2026-04-04","updated_at":"2026-04-04"}]}
|
||||
{"type":"discussion","id":"DSC-0020","status":"done","ticket":"studio-editor-indentation-policy-and-project-setup","title":"Indentation Policy, Status-Bar Semantics, and Project-Local Editor Setup","created_at":"2026-04-04","updated_at":"2026-04-04","tags":["studio","editor","indentation","tabs","setup","dot-studio","configuration","ux"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0033","file":"discussion/lessons/DSC-0020-studio-editor-indentation-policy-and-project-setup/LSN-0033-setup-owned-indentation-policy-and-project-bootstrap-defaults.md","status":"done","created_at":"2026-04-04","updated_at":"2026-04-04"}]}
|
||||
{"type":"discussion","id":"DSC-0021","status":"done","ticket":"studio-frontend-editor-write-and-save-wave","title":"Enable Frontend Editing and Save in the Studio Code Editor","created_at":"2026-04-04","updated_at":"2026-04-06","tags":["studio","editor","frontend","write","save","vfs","lsp","pbs","access-policy"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0036","file":"discussion/lessons/DSC-0021-studio-frontend-editor-write-and-save-wave/LSN-0036-vfs-owned-frontend-edit-and-save-wave.md","status":"done","created_at":"2026-04-06","updated_at":"2026-04-06"}]}
|
||||
{"type":"discussion","id":"DSC-0022","status":"done","ticket":"studio-play-stop-cartridge-flow","title":"Wire the Studio Play/Stop button to shipper phase 1 cartridge preparation and runtime execution","created_at":"2026-04-06","updated_at":"2026-04-07","tags":["studio","play-stop","shipper","runtime","cartridge","shell"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0043","file":"discussion/lessons/DSC-0022-studio-play-stop-and-debugger-integration/LSN-0043-studio-play-stop-and-debugger-integration.md","status":"done","created_at":"2026-04-07","updated_at":"2026-04-07"}]}
|
||||
{"type":"discussion","id":"DSC-0023","status":"done","ticket":"gradle-version-catalog-migration","title":"Move dependency version management to Version Catalog (TOML)","created_at":"2026-04-07","updated_at":"2026-04-07","tags":["gradle","buildSrc","dependency-management","version-catalog"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0037","file":"discussion/lessons/DSC-0023-gradle-version-catalog-migration/LSN-0037-gradle-version-catalog-adoption.md","status":"done","created_at":"2026-04-07","updated_at":"2026-04-07"}]}
|
||||
@@ -1,35 +0,0 @@
|
||||
{"type":"meta","next_id":{"DSC":35,"AGD":38,"DEC":35,"PLN":75,"LSN":47,"CLSN":1}}
|
||||
{"type":"discussion","id":"DSC-0034","status":"in_progress","ticket":"frontend-semantic-host-projection-flexibility","title":"Frontend semantic vocabulary flexibility and declarative host projection","created_at":"2026-05-06","updated_at":"2026-05-06","tags":["compiler","compiler-general","frontend","semantics","vscode","host-projection","lsp"],"agendas":[{"id":"AGD-0037","file":"AGD-0037-frontend-semantic-host-projection-flexibility.md","status":"accepted","created_at":"2026-05-06","updated_at":"2026-05-06"}],"decisions":[{"id":"DEC-0034","file":"DEC-0034-frontend-semantic-host-projection-flexibility.md","status":"accepted","created_at":"2026-05-06","updated_at":"2026-05-06","ref_agenda":"AGD-0037"}],"plans":[{"id":"PLN-0072","file":"PLN-0072-frontend-semantic-host-projection-contract.md","status":"done","created_at":"2026-05-06","updated_at":"2026-05-06","ref_decisions":["DEC-0034"]},{"id":"PLN-0073","file":"PLN-0073-lsp-semantic-host-projection-transport.md","status":"done","created_at":"2026-05-06","updated_at":"2026-05-06","ref_decisions":["DEC-0034"]},{"id":"PLN-0074","file":"PLN-0074-vscode-semantic-host-projection-adapter.md","status":"done","created_at":"2026-05-06","updated_at":"2026-05-06","ref_decisions":["DEC-0034"]}],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0033","status":"in_progress","ticket":"frontend-visual-theme-spec-and-css-retirement","title":"Frontend visual theme spec and retirement of host-consumed semantic CSS","created_at":"2026-05-06","updated_at":"2026-05-06","tags":["compiler","compiler-general","frontend","presentation","theming","studio","vscode","lsp","pbs"],"agendas":[{"id":"AGD-0036","file":"AGD-0036-frontend-visual-theme-spec-and-css-retirement.md","status":"accepted","created_at":"2026-05-06","updated_at":"2026-05-06"}],"decisions":[{"id":"DEC-0033","file":"DEC-0033-frontend-visual-theme-spec-and-css-retirement.md","status":"accepted","created_at":"2026-05-06","updated_at":"2026-05-06","ref_agenda":"AGD-0036"}],"plans":[{"id":"PLN-0068","file":"PLN-0068-frontend-visual-contract-and-pbs-migration.md","status":"open","created_at":"2026-05-06","updated_at":"2026-05-06","ref_decisions":["DEC-0033"]},{"id":"PLN-0069","file":"PLN-0069-lsp-visual-theme-transport-and-selection.md","status":"open","created_at":"2026-05-06","updated_at":"2026-05-06","ref_decisions":["DEC-0033"]},{"id":"PLN-0070","file":"PLN-0070-studio-visual-theme-adapter-and-css-retirement.md","status":"open","created_at":"2026-05-06","updated_at":"2026-05-06","ref_decisions":["DEC-0033"]},{"id":"PLN-0071","file":"PLN-0071-vscode-dynamic-theme-translation-adapter.md","status":"open","created_at":"2026-05-06","updated_at":"2026-05-06","ref_decisions":["DEC-0033"]}],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0032","status":"in_progress","ticket":"studio-new-lsp-api-and-v1-boundary","title":"Novo boundary entre lsp-api, lsp-v1 e a extensao VS Code","created_at":"2026-05-05","updated_at":"2026-05-05","tags":["studio","lsp","vscode","protocol","api","boundary"],"agendas":[{"id":"AGD-0035","file":"AGD-0035-studio-new-lsp-api-and-v1-boundary.md","status":"accepted","created_at":"2026-05-05","updated_at":"2026-05-05"}],"decisions":[{"id":"DEC-0032","file":"DEC-0032-studio-new-lsp-api-and-v1-boundary.md","status":"accepted","created_at":"2026-05-05","updated_at":"2026-05-05","ref_agenda":"AGD-0035"}],"plans":[{"id":"PLN-0065","file":"PLN-0065-lsp-boundary-and-module-scaffolding.md","status":"done","created_at":"2026-05-05","updated_at":"2026-05-05","ref_decisions":["DEC-0032"]},{"id":"PLN-0066","file":"PLN-0066-project-scoped-lsp-server-lifecycle-in-studio.md","status":"done","created_at":"2026-05-05","updated_at":"2026-05-05","ref_decisions":["DEC-0032"]},{"id":"PLN-0067","file":"PLN-0067-compiler-backed-dumb-lsp-server-baseline.md","status":"done","created_at":"2026-05-05","updated_at":"2026-05-05","ref_decisions":["DEC-0032"]}],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0031","status":"in_progress","ticket":"studio-editor-workspace-cleanup","title":"Limpeza completa do Workspace Editor do Studio e remoção dos acoplamentos legados","created_at":"2026-05-05","updated_at":"2026-05-05","tags":["studio","editor","cleanup","vfs","lsp","migration"],"agendas":[{"id":"AGD-0034","file":"AGD-0034-vscode-editor-migration-feasibility.md","status":"accepted","created_at":"2026-05-05","updated_at":"2026-05-05"}],"decisions":[{"id":"DEC-0031","file":"DEC-0031-studio-editor-workspace-cleanup.md","status":"in_progress","created_at":"2026-05-05","updated_at":"2026-05-05","ref_agenda":"AGD-0034"}],"plans":[{"id":"PLN-0062","file":"PLN-0062-shell-session-and-state-cleanup-after-editor-removal.md","status":"done","created_at":"2026-05-05","updated_at":"2026-05-05","ref_decisions":["DEC-0031"]},{"id":"PLN-0063","file":"PLN-0063-legacy-lsp-and-vfs-module-removal-with-runtime-preservation.md","status":"done","created_at":"2026-05-05","updated_at":"2026-05-05","ref_decisions":["DEC-0031"]},{"id":"PLN-0064","file":"PLN-0064-normative-test-and-lesson-cleanup-for-editor-stack-removal.md","status":"done","created_at":"2026-05-05","updated_at":"2026-05-05","ref_decisions":["DEC-0031"]}],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0030","status":"done","ticket":"studio-scene-pack-runtime-binary-contract","title":"Studio scene pack contract for runtime SCENE binary payload","created_at":"2026-04-24","updated_at":"2026-05-01","tags":["studio","packer","runtime","scene","asset-pack","binary-format","tiled"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0046","file":"discussion/lessons/DSC-0030-studio-scene-pack-runtime-binary-contract/LSN-0046-canonical-scene-owns-editorial-truth-while-pack-stays-request-driven.md","status":"done","created_at":"2026-05-01","updated_at":"2026-05-01"}]}
|
||||
{"type":"discussion","id":"DSC-0029","status":"done","ticket":"studio-frame-composer-syscall-and-sprite-alignment","title":"Studio Alignment with Runtime FrameComposer Syscalls and Sprite Composition","created_at":"2026-04-18","updated_at":"2026-04-18","tags":["studio","compiler","pbs","stdlib","runtime-alignment","abi","syscall","frame-composer","sprites"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0041","file":"discussion/lessons/DSC-0029-studio-frame-composer-syscall-and-sprite-alignment/LSN-0041-composer-must-own-public-sprite-composition.md","status":"done","created_at":"2026-04-18","updated_at":"2026-04-18"}]}
|
||||
{"type":"discussion","id":"DSC-0028","status":"done","ticket":"studio-tiled-parser-assets-scene-asset-type","title":"Tiled Parser and Scene Asset-Type Ownership in Assets Workspace","created_at":"2026-04-15","updated_at":"2026-04-23","tags":["studio","assets","scene","tiled","parser","asset-type"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0045","file":"discussion/lessons/DSC-0028-studio-tiled-parser-assets-scene-asset-type/LSN-0045-asset-owned-scene-bank-and-tiled-xml-workflow.md","status":"done","created_at":"2026-04-23","updated_at":"2026-04-23"}]}
|
||||
{"type":"discussion","id":"DSC-0027","status":"abandoned","ticket":"studio-scene-workspace","title":"Scene Workspace for SCENE Authoring","created_at":"2026-04-14","updated_at":"2026-04-15","tags":["studio","workspace","scene","tilemap","asset","runtime-alignment"],"agendas":[{"id":"AGD-0029","file":"AGD-0029-studio-scene-workspace.md","status":"abandoned","created_at":"2026-04-14","updated_at":"2026-04-15","_override_reason":"Explicit user request on 2026-04-15 to abandon the accepted agenda and its downstream work."}],"decisions":[{"id":"DEC-0026","file":"DEC-0026-studio-scene-workspace.md","status":"abandoned","created_at":"2026-04-14","updated_at":"2026-04-15","ref_agenda":"AGD-0029","_override_reason":"Explicit user request on 2026-04-15 to abandon the accepted decision and stop using it as normative guidance."}],"plans":[{"id":"PLN-0049","file":"PLN-0049-scene-workspace-spec-and-boundary-propagation.md","status":"abandoned","created_at":"2026-04-14","updated_at":"2026-04-15","ref_decisions":["DEC-0026"],"_override_reason":"Explicit user request on 2026-04-15 to abandon all plans derived from DEC-0026."},{"id":"PLN-0050","file":"PLN-0050-scene-workspace-shell-and-project-state-foundations.md","status":"abandoned","created_at":"2026-04-14","updated_at":"2026-04-15","ref_decisions":["DEC-0026"],"_override_reason":"Explicit user request on 2026-04-15 to abandon all plans derived from DEC-0026."},{"id":"PLN-0051","file":"PLN-0051-scene-artifact-and-assets-handoff-contract.md","status":"abandoned","created_at":"2026-04-14","updated_at":"2026-04-15","ref_decisions":["DEC-0026"],"_override_reason":"Explicit user request on 2026-04-15 to abandon all plans derived from DEC-0026."},{"id":"PLN-0052","file":"PLN-0052-scene-workspace-wave-1-tilemap-editor.md","status":"abandoned","created_at":"2026-04-14","updated_at":"2026-04-15","ref_decisions":["DEC-0026"],"_override_reason":"Explicit user request on 2026-04-15 to abandon all plans derived from DEC-0026."}],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0026","status":"done","ticket":"glyph-bank-naming-alignment-with-runtime","title":"Glyph Bank Naming Alignment with Runtime DEC-0006","created_at":"2026-04-10","updated_at":"2026-04-10","tags":["packer","studio","naming","asset-contract","runtime-alignment","glyph-bank"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0040","file":"discussion/lessons/DSC-0026-glyph-bank-naming-alignment-with-runtime/LSN-0040-glyph-bank-artifact-naming-alignment.md","status":"done","created_at":"2026-04-10","updated_at":"2026-04-10"}]}
|
||||
{"type":"discussion","id":"DSC-0025","status":"done","ticket":"packer-pipeline-metadata-ownership","title":"Pipeline Metadata Ownership and Runtime Contract","created_at":"2026-04-09","updated_at":"2026-04-10","tags":["packer","metadata","runtime-contract","tooling","studio"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0039","file":"discussion/lessons/DSC-0025-packer-pipeline-metadata-ownership/LSN-0039-runtime-header-boundary-and-tooling-owned-pipeline-metadata.md","status":"done","created_at":"2026-04-10","updated_at":"2026-04-10"}]}
|
||||
{"type":"discussion","id":"DSC-0024","status":"done","ticket":"jacoco-reports-consolidation","title":"JaCoCo Reports Consolidation in Gradle","created_at":"2026-04-07","updated_at":"2026-04-07","tags":["infra","gradle","jacoco","coverage","jenkins"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0038","file":"discussion/lessons/DSC-0024-jacoco-reports-consolidation/LSN-0038-jacoco-reports-consolidation.md","status":"done","created_at":"2026-04-07","updated_at":"2026-04-07"},{"id":"LSN-0044","file":"discussion/lessons/DSC-0024-jacoco-reports-consolidation/LSN-0044-jenkins-jacoco-alignment.md","status":"done","created_at":"2026-04-07","updated_at":"2026-04-07"}]}
|
||||
{"type":"discussion","id":"DSC-0001","status":"done","ticket":"studio-docs-import","title":"Import docs/studio into discussion-framework artifacts","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["studio","migration","discussion-framework","docs-import"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0001","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0001-assets-workspace-execution-wave-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0002","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0002-bank-composition-editor-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0003","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0003-mental-model-asset-mutations-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0004","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0004-mental-model-assets-workspace-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0005","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0005-mental-model-studio-events-and-components-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0006","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0006-mental-model-studio-shell-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0007","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0007-pack-wizard-shell-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0008","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0008-project-scoped-state-and-activity-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0016","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0016-studio-docs-import-pattern.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"}]}
|
||||
{"type":"discussion","id":"DSC-0002","status":"done","ticket":"palette-management-in-studio","title":"Palette Management in Studio","created_at":"2026-03-26","updated_at":"2026-04-23","tags":["studio","legacy-import","palette-management","tile-bank","packer-boundary"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0042","file":"discussion/lessons/DSC-0002-palette-management-in-studio/LSN-0042-schema-driven-palette-authoring-and-local-metadata-events.md","status":"done","created_at":"2026-04-23","updated_at":"2026-04-23"}]}
|
||||
{"type":"discussion","id":"DSC-0003","status":"done","ticket":"packer-docs-import","title":"Import docs/packer into discussion-framework artifacts","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["packer","migration","discussion-framework","docs-import"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0009","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0009-mental-model-packer-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0010","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0010-asset-identity-and-runtime-contract-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0011","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0011-foundations-workspace-runtime-and-build-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0012","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0012-runtime-ownership-and-studio-boundary-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0013","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0013-metadata-convergence-and-runtime-sink-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0014","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0014-pack-wizard-summary-validation-and-pack-execution-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0015","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0015-tile-bank-packing-contract-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0017","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0017-packer-docs-import-pattern.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"}]}
|
||||
{"type":"discussion","id":"DSC-0004","status":"abandoned","ticket":"tilemap-and-metatile-runtime-binary-layout","title":"Tilemap and Metatile Runtime Binary Layout","created_at":"2026-03-26","updated_at":"2026-04-24","tags":["packer","legacy-import","tilemap","metatile","runtime-layout"],"agendas":[{"id":"AGD-0004","file":"AGD-0004-tilemap-and-metatile-runtime-binary-layout.md","status":"abandoned","created_at":"2026-03-26","updated_at":"2026-04-24","_override_reason":"Explicit user request on 2026-04-24 to abandon AGD-0004 because the agenda is no longer valid."}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0005","status":"open","ticket":"variable-tile-bank-palette-serialization","title":"Variable Tile Bank Palette Serialization","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["packer","legacy-import","tile-bank","palette-serialization","versioning"],"agendas":[{"id":"AGD-0005","file":"AGD-0005-variable-tile-bank-palette-serialization.md","status":"open","created_at":"2026-03-26","updated_at":"2026-03-26"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0006","status":"done","ticket":"pbs-game-facing-asset-refs-and-call-result-discard","title":"PBS Game-Facing Asset References and Ignored Call Result Lowering","created_at":"2026-03-27","updated_at":"2026-03-30","tags":["compiler","pbs","ergonomics","lowering","runtime","asset-identity","expression-statements"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0024","file":"discussion/lessons/DSC-0006-pbs-game-facing-asset-refs-and-call-result-discard/LSN-0024-addressable-surface-host-metadata-and-ignored-value-discipline.md","status":"done","created_at":"2026-03-30","updated_at":"2026-03-30"}]}
|
||||
{"type":"discussion","id":"DSC-0007","status":"done","ticket":"pbs-learn-to-discussion-lessons-migration","title":"Migrate PBS Learn Documents into Discussion Lessons","created_at":"2026-03-27","updated_at":"2026-03-27","tags":["compiler","pbs","migration","discussion-framework","lessons","learn-prune"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0018","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0018-pbs-ast-and-parser-contract-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0019","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0019-pbs-name-resolution-and-linking-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0020","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0020-pbs-runtime-values-identity-memory-boundaries-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0021","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0021-pbs-diagnostics-and-conformance-governance-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0022","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0022-pbs-globals-lifecycle-and-published-entrypoint-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"}]}
|
||||
{"type":"discussion","id":"DSC-0008","status":"done","ticket":"pbs-low-level-asset-manager-surface","title":"PBS Low-Level Asset Manager Surface for Runtime AssetManager","created_at":"2026-03-27","updated_at":"2026-03-27","tags":["compiler","pbs","runtime","asset-manager","host-abi","stdlib","asset"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0023","file":"discussion/lessons/DSC-0008-pbs-low-level-asset-manager-surface/LSN-0023-lowassets-runtime-aligned-sdk-surface.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"}]}
|
||||
{"type":"discussion","id":"DSC-0009","status":"done","ticket":"studio-debugger-workspace-integration","title":"Integrate ../debugger into Studio as a dedicated workspace","created_at":"2026-03-30","updated_at":"2026-04-07","tags":["studio","debugger","workspace","integration","shell"],"agendas":[],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0010","status":"done","ticket":"studio-code-editor-workspace-foundations","title":"Establish Code Editor workspace foundations in Studio without LSP","created_at":"2026-03-30","updated_at":"2026-03-31","tags":["studio","editor","workspace","multi-frontend","lsp-deferred"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0026","file":"discussion/lessons/DSC-0010-studio-code-editor-workspace-foundations/LSN-0026-read-only-editor-foundations-and-semantic-deferral.md","status":"done","created_at":"2026-03-31","updated_at":"2026-03-31"}]}
|
||||
{"type":"discussion","id":"DSC-0011","status":"done","ticket":"compiler-analyze-compile-build-pipeline-split","title":"Split compiler pipeline into analyze, compile, and build entrypoints","created_at":"2026-03-30","updated_at":"2026-03-30","tags":["compiler","pipeline","artifacts","build","analysis"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0025","file":"discussion/lessons/DSC-0011-compiler-analyze-compile-build-pipeline-split/LSN-0025-compiler-pipeline-entrypoints-and-result-boundaries.md","status":"done","created_at":"2026-03-30","updated_at":"2026-03-30"}]}
|
||||
{"type":"discussion","id":"DSC-0012","status":"done","ticket":"studio-editor-document-vfs-boundary","title":"Definir um boundary de VFS documental para tree/view/open files no Code Editor do Studio","created_at":"2026-03-31","updated_at":"2026-03-31","tags":["studio","editor","workspace","vfs","filesystem","boundary"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0027","file":"discussion/lessons/DSC-0012-studio-editor-document-vfs-boundary/LSN-0027-project-document-vfs-and-session-owned-editor-boundary.md","status":"done","created_at":"2026-03-31","updated_at":"2026-03-31"}]}
|
||||
{"type":"discussion","id":"DSC-0013","status":"done","ticket":"studio-editor-write-wave-supported-non-frontend-files","title":"Definir a wave inicial de edicao no Code Editor apenas para arquivos aceitos e nao relacionados ao FE","created_at":"2026-03-31","updated_at":"2026-04-02","tags":["studio","editor","workspace","write","read-only","vfs","frontend-boundary"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0028","file":"discussion/lessons/DSC-0013-studio-editor-write-wave-supported-non-frontend-files/LSN-0028-controlled-editor-write-wave-and-read-only-frontend-semantic-phase.md","status":"done","created_at":"2026-04-02","updated_at":"2026-04-02"}]}
|
||||
{"type":"discussion","id":"DSC-0014","status":"done","ticket":"studio-frontend-owned-semantic-editor-presentation","title":"Definir ownership do schema visual semantico do editor por frontend","created_at":"2026-04-02","updated_at":"2026-04-02","tags":["studio","editor","frontend","presentation","semantic-highlighting","compiler","pbs"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0029","file":"discussion/lessons/DSC-0014-studio-frontend-owned-semantic-editor-presentation/LSN-0029-frontend-owned-semantic-presentation-descriptor-and-host-consumption.md","status":"done","created_at":"2026-04-02","updated_at":"2026-04-02"}]}
|
||||
{"type":"discussion","id":"DSC-0015","status":"done","ticket":"pbs-service-facade-reserved-metadata","title":"SDK Service Bodies Calling Builtin/Intrinsic Proxies as Ordinary PBS Code","created_at":"2026-04-03","updated_at":"2026-04-03","tags":["compiler","pbs","sdk","stdlib","lowering","service","intrinsic","sdk-interface"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0030","file":"discussion/lessons/DSC-0015-pbs-service-facade-reserved-metadata/LSN-0030-sdk-service-bodies-over-private-reserved-proxies.md","status":"done","created_at":"2026-04-03","updated_at":"2026-04-03"}]}
|
||||
{"type":"discussion","id":"DSC-0016","status":"done","ticket":"studio-editor-scope-guides-and-brace-anchoring","title":"Scope Guides do Code Editor com ancoragem exata em braces e destaque do escopo ativo","created_at":"2026-04-03","updated_at":"2026-04-06","tags":["studio","editor","scope-guides","braces","semantic-read","frontend-contract"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0034","file":"discussion/lessons/DSC-0016-studio-editor-scope-guides-and-brace-anchoring/LSN-0034-active-scope-gutter-and-frontend-owned-structural-anchors.md","status":"done","created_at":"2026-04-06","updated_at":"2026-04-06"}]}
|
||||
{"type":"discussion","id":"DSC-0017","status":"done","ticket":"studio-editor-inline-type-hints-for-let-bindings","title":"Inline Type Hints for Let Bindings in the Studio Editor","created_at":"2026-04-03","updated_at":"2026-04-06","tags":["studio","editor","inline-hints","inlay-hints","lsp","pbs","type-inference"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0035","file":"discussion/lessons/DSC-0017-studio-editor-inline-type-hints-for-let-bindings/LSN-0035-frontend-owned-inline-hints-with-decorative-inline-rendering.md","status":"done","created_at":"2026-04-06","updated_at":"2026-04-06"}]}
|
||||
{"type":"discussion","id":"DSC-0018","status":"done","ticket":"studio-project-local-studio-state-under-dot-studio","title":"Persist project-local Studio state under .studio","created_at":"2026-04-04","updated_at":"2026-04-04","tags":["studio","project-session","project-state","persistence","dot-studio","shell","layout","setup"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0031","file":"discussion/lessons/DSC-0018-studio-project-local-studio-state-under-dot-studio/LSN-0031-project-local-studio-state-and-lifecycle-safe-layout-restoration.md","status":"done","created_at":"2026-04-04","updated_at":"2026-04-04"}]}
|
||||
{"type":"discussion","id":"DSC-0019","status":"done","ticket":"studio-project-local-setup-separate-from-main-studio-state","title":"Separate project-local setup from the main Studio state under .studio","created_at":"2026-04-04","updated_at":"2026-04-04","tags":["studio","project-session","project-state","persistence","dot-studio","setup","boundary"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0032","file":"discussion/lessons/DSC-0019-studio-project-local-setup-separate-from-main-studio-state/LSN-0032-separate-project-config-from-session-restoration-state.md","status":"done","created_at":"2026-04-04","updated_at":"2026-04-04"}]}
|
||||
{"type":"discussion","id":"DSC-0020","status":"done","ticket":"studio-editor-indentation-policy-and-project-setup","title":"Indentation Policy, Status-Bar Semantics, and Project-Local Editor Setup","created_at":"2026-04-04","updated_at":"2026-04-04","tags":["studio","editor","indentation","tabs","setup","dot-studio","configuration","ux"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0033","file":"discussion/lessons/DSC-0020-studio-editor-indentation-policy-and-project-setup/LSN-0033-setup-owned-indentation-policy-and-project-bootstrap-defaults.md","status":"done","created_at":"2026-04-04","updated_at":"2026-04-04"}]}
|
||||
{"type":"discussion","id":"DSC-0021","status":"done","ticket":"studio-frontend-editor-write-and-save-wave","title":"Enable Frontend Editing and Save in the Studio Code Editor","created_at":"2026-04-04","updated_at":"2026-04-06","tags":["studio","editor","frontend","write","save","vfs","lsp","pbs","access-policy"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0036","file":"discussion/lessons/DSC-0021-studio-frontend-editor-write-and-save-wave/LSN-0036-vfs-owned-frontend-edit-and-save-wave.md","status":"done","created_at":"2026-04-06","updated_at":"2026-04-06"}]}
|
||||
{"type":"discussion","id":"DSC-0022","status":"done","ticket":"studio-play-stop-cartridge-flow","title":"Wire the Studio Play/Stop button to shipper phase 1 cartridge preparation and runtime execution","created_at":"2026-04-06","updated_at":"2026-04-07","tags":["studio","play-stop","shipper","runtime","cartridge","shell"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0043","file":"discussion/lessons/DSC-0022-studio-play-stop-and-debugger-integration/LSN-0043-studio-play-stop-and-debugger-integration.md","status":"done","created_at":"2026-04-07","updated_at":"2026-04-07"}]}
|
||||
{"type":"discussion","id":"DSC-0023","status":"done","ticket":"gradle-version-catalog-migration","title":"Move dependency version management to Version Catalog (TOML)","created_at":"2026-04-07","updated_at":"2026-04-07","tags":["gradle","buildSrc","dependency-management","version-catalog"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0037","file":"discussion/lessons/DSC-0023-gradle-version-catalog-migration/LSN-0037-gradle-version-catalog-adoption.md","status":"done","created_at":"2026-04-07","updated_at":"2026-04-07"}]}
|
||||
@@ -1,35 +0,0 @@
|
||||
{"type":"meta","next_id":{"DSC":35,"AGD":38,"DEC":35,"PLN":75,"LSN":49,"CLSN":1}}
|
||||
{"type":"discussion","id":"DSC-0034","status":"done","ticket":"frontend-semantic-host-projection-flexibility","title":"Frontend semantic vocabulary flexibility and declarative host projection","created_at":"2026-05-06","updated_at":"2026-05-07","tags":["compiler","compiler-general","frontend","semantics","vscode","host-projection","lsp"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0048","file":"discussion/lessons/DSC-0034-frontend-semantic-host-projection-flexibility/LSN-0048-frontend-owned-semantic-vocabularies-with-declarative-host-projection.md","status":"done","created_at":"2026-05-07","updated_at":"2026-05-07"}]}
|
||||
{"type":"discussion","id":"DSC-0033","status":"in_progress","ticket":"frontend-visual-theme-spec-and-css-retirement","title":"Frontend visual theme spec and retirement of host-consumed semantic CSS","created_at":"2026-05-06","updated_at":"2026-05-06","tags":["compiler","compiler-general","frontend","presentation","theming","studio","vscode","lsp","pbs"],"agendas":[{"id":"AGD-0036","file":"AGD-0036-frontend-visual-theme-spec-and-css-retirement.md","status":"accepted","created_at":"2026-05-06","updated_at":"2026-05-06"}],"decisions":[{"id":"DEC-0033","file":"DEC-0033-frontend-visual-theme-spec-and-css-retirement.md","status":"accepted","created_at":"2026-05-06","updated_at":"2026-05-06","ref_agenda":"AGD-0036"}],"plans":[{"id":"PLN-0068","file":"PLN-0068-frontend-visual-contract-and-pbs-migration.md","status":"open","created_at":"2026-05-06","updated_at":"2026-05-06","ref_decisions":["DEC-0033"]},{"id":"PLN-0069","file":"PLN-0069-lsp-visual-theme-transport-and-selection.md","status":"open","created_at":"2026-05-06","updated_at":"2026-05-06","ref_decisions":["DEC-0033"]},{"id":"PLN-0070","file":"PLN-0070-studio-visual-theme-adapter-and-css-retirement.md","status":"open","created_at":"2026-05-06","updated_at":"2026-05-06","ref_decisions":["DEC-0033"]},{"id":"PLN-0071","file":"PLN-0071-vscode-dynamic-theme-translation-adapter.md","status":"open","created_at":"2026-05-06","updated_at":"2026-05-06","ref_decisions":["DEC-0033"]}],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0032","status":"done","ticket":"studio-new-lsp-api-and-v1-boundary","title":"Novo boundary entre lsp-api, lsp-v1 e a extensao VS Code","created_at":"2026-05-05","updated_at":"2026-05-07","tags":["studio","lsp","vscode","protocol","api","boundary"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0047","file":"discussion/lessons/DSC-0032-studio-new-lsp-api-and-v1-boundary/LSN-0047-project-scoped-lsp-boundary-and-protocol-containment.md","status":"done","created_at":"2026-05-07","updated_at":"2026-05-07"}]}
|
||||
{"type":"discussion","id":"DSC-0031","status":"in_progress","ticket":"studio-editor-workspace-cleanup","title":"Limpeza completa do Workspace Editor do Studio e remoção dos acoplamentos legados","created_at":"2026-05-05","updated_at":"2026-05-05","tags":["studio","editor","cleanup","vfs","lsp","migration"],"agendas":[{"id":"AGD-0034","file":"AGD-0034-vscode-editor-migration-feasibility.md","status":"accepted","created_at":"2026-05-05","updated_at":"2026-05-05"}],"decisions":[{"id":"DEC-0031","file":"DEC-0031-studio-editor-workspace-cleanup.md","status":"in_progress","created_at":"2026-05-05","updated_at":"2026-05-05","ref_agenda":"AGD-0034"}],"plans":[{"id":"PLN-0062","file":"PLN-0062-shell-session-and-state-cleanup-after-editor-removal.md","status":"done","created_at":"2026-05-05","updated_at":"2026-05-05","ref_decisions":["DEC-0031"]},{"id":"PLN-0063","file":"PLN-0063-legacy-lsp-and-vfs-module-removal-with-runtime-preservation.md","status":"done","created_at":"2026-05-05","updated_at":"2026-05-05","ref_decisions":["DEC-0031"]},{"id":"PLN-0064","file":"PLN-0064-normative-test-and-lesson-cleanup-for-editor-stack-removal.md","status":"done","created_at":"2026-05-05","updated_at":"2026-05-05","ref_decisions":["DEC-0031"]}],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0030","status":"done","ticket":"studio-scene-pack-runtime-binary-contract","title":"Studio scene pack contract for runtime SCENE binary payload","created_at":"2026-04-24","updated_at":"2026-05-01","tags":["studio","packer","runtime","scene","asset-pack","binary-format","tiled"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0046","file":"discussion/lessons/DSC-0030-studio-scene-pack-runtime-binary-contract/LSN-0046-canonical-scene-owns-editorial-truth-while-pack-stays-request-driven.md","status":"done","created_at":"2026-05-01","updated_at":"2026-05-01"}]}
|
||||
{"type":"discussion","id":"DSC-0029","status":"done","ticket":"studio-frame-composer-syscall-and-sprite-alignment","title":"Studio Alignment with Runtime FrameComposer Syscalls and Sprite Composition","created_at":"2026-04-18","updated_at":"2026-04-18","tags":["studio","compiler","pbs","stdlib","runtime-alignment","abi","syscall","frame-composer","sprites"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0041","file":"discussion/lessons/DSC-0029-studio-frame-composer-syscall-and-sprite-alignment/LSN-0041-composer-must-own-public-sprite-composition.md","status":"done","created_at":"2026-04-18","updated_at":"2026-04-18"}]}
|
||||
{"type":"discussion","id":"DSC-0028","status":"done","ticket":"studio-tiled-parser-assets-scene-asset-type","title":"Tiled Parser and Scene Asset-Type Ownership in Assets Workspace","created_at":"2026-04-15","updated_at":"2026-04-23","tags":["studio","assets","scene","tiled","parser","asset-type"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0045","file":"discussion/lessons/DSC-0028-studio-tiled-parser-assets-scene-asset-type/LSN-0045-asset-owned-scene-bank-and-tiled-xml-workflow.md","status":"done","created_at":"2026-04-23","updated_at":"2026-04-23"}]}
|
||||
{"type":"discussion","id":"DSC-0027","status":"abandoned","ticket":"studio-scene-workspace","title":"Scene Workspace for SCENE Authoring","created_at":"2026-04-14","updated_at":"2026-04-15","tags":["studio","workspace","scene","tilemap","asset","runtime-alignment"],"agendas":[{"id":"AGD-0029","file":"AGD-0029-studio-scene-workspace.md","status":"abandoned","created_at":"2026-04-14","updated_at":"2026-04-15","_override_reason":"Explicit user request on 2026-04-15 to abandon the accepted agenda and its downstream work."}],"decisions":[{"id":"DEC-0026","file":"DEC-0026-studio-scene-workspace.md","status":"abandoned","created_at":"2026-04-14","updated_at":"2026-04-15","ref_agenda":"AGD-0029","_override_reason":"Explicit user request on 2026-04-15 to abandon the accepted decision and stop using it as normative guidance."}],"plans":[{"id":"PLN-0049","file":"PLN-0049-scene-workspace-spec-and-boundary-propagation.md","status":"abandoned","created_at":"2026-04-14","updated_at":"2026-04-15","ref_decisions":["DEC-0026"],"_override_reason":"Explicit user request on 2026-04-15 to abandon all plans derived from DEC-0026."},{"id":"PLN-0050","file":"PLN-0050-scene-workspace-shell-and-project-state-foundations.md","status":"abandoned","created_at":"2026-04-14","updated_at":"2026-04-15","ref_decisions":["DEC-0026"],"_override_reason":"Explicit user request on 2026-04-15 to abandon all plans derived from DEC-0026."},{"id":"PLN-0051","file":"PLN-0051-scene-artifact-and-assets-handoff-contract.md","status":"abandoned","created_at":"2026-04-14","updated_at":"2026-04-15","ref_decisions":["DEC-0026"],"_override_reason":"Explicit user request on 2026-04-15 to abandon all plans derived from DEC-0026."},{"id":"PLN-0052","file":"PLN-0052-scene-workspace-wave-1-tilemap-editor.md","status":"abandoned","created_at":"2026-04-14","updated_at":"2026-04-15","ref_decisions":["DEC-0026"],"_override_reason":"Explicit user request on 2026-04-15 to abandon all plans derived from DEC-0026."}],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0026","status":"done","ticket":"glyph-bank-naming-alignment-with-runtime","title":"Glyph Bank Naming Alignment with Runtime DEC-0006","created_at":"2026-04-10","updated_at":"2026-04-10","tags":["packer","studio","naming","asset-contract","runtime-alignment","glyph-bank"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0040","file":"discussion/lessons/DSC-0026-glyph-bank-naming-alignment-with-runtime/LSN-0040-glyph-bank-artifact-naming-alignment.md","status":"done","created_at":"2026-04-10","updated_at":"2026-04-10"}]}
|
||||
{"type":"discussion","id":"DSC-0025","status":"done","ticket":"packer-pipeline-metadata-ownership","title":"Pipeline Metadata Ownership and Runtime Contract","created_at":"2026-04-09","updated_at":"2026-04-10","tags":["packer","metadata","runtime-contract","tooling","studio"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0039","file":"discussion/lessons/DSC-0025-packer-pipeline-metadata-ownership/LSN-0039-runtime-header-boundary-and-tooling-owned-pipeline-metadata.md","status":"done","created_at":"2026-04-10","updated_at":"2026-04-10"}]}
|
||||
{"type":"discussion","id":"DSC-0024","status":"done","ticket":"jacoco-reports-consolidation","title":"JaCoCo Reports Consolidation in Gradle","created_at":"2026-04-07","updated_at":"2026-04-07","tags":["infra","gradle","jacoco","coverage","jenkins"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0038","file":"discussion/lessons/DSC-0024-jacoco-reports-consolidation/LSN-0038-jacoco-reports-consolidation.md","status":"done","created_at":"2026-04-07","updated_at":"2026-04-07"},{"id":"LSN-0044","file":"discussion/lessons/DSC-0024-jacoco-reports-consolidation/LSN-0044-jenkins-jacoco-alignment.md","status":"done","created_at":"2026-04-07","updated_at":"2026-04-07"}]}
|
||||
{"type":"discussion","id":"DSC-0001","status":"done","ticket":"studio-docs-import","title":"Import docs/studio into discussion-framework artifacts","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["studio","migration","discussion-framework","docs-import"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0001","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0001-assets-workspace-execution-wave-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0002","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0002-bank-composition-editor-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0003","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0003-mental-model-asset-mutations-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0004","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0004-mental-model-assets-workspace-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0005","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0005-mental-model-studio-events-and-components-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0006","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0006-mental-model-studio-shell-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0007","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0007-pack-wizard-shell-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0008","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0008-project-scoped-state-and-activity-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0016","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0016-studio-docs-import-pattern.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"}]}
|
||||
{"type":"discussion","id":"DSC-0002","status":"done","ticket":"palette-management-in-studio","title":"Palette Management in Studio","created_at":"2026-03-26","updated_at":"2026-04-23","tags":["studio","legacy-import","palette-management","tile-bank","packer-boundary"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0042","file":"discussion/lessons/DSC-0002-palette-management-in-studio/LSN-0042-schema-driven-palette-authoring-and-local-metadata-events.md","status":"done","created_at":"2026-04-23","updated_at":"2026-04-23"}]}
|
||||
{"type":"discussion","id":"DSC-0003","status":"done","ticket":"packer-docs-import","title":"Import docs/packer into discussion-framework artifacts","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["packer","migration","discussion-framework","docs-import"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0009","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0009-mental-model-packer-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0010","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0010-asset-identity-and-runtime-contract-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0011","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0011-foundations-workspace-runtime-and-build-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0012","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0012-runtime-ownership-and-studio-boundary-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0013","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0013-metadata-convergence-and-runtime-sink-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0014","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0014-pack-wizard-summary-validation-and-pack-execution-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0015","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0015-tile-bank-packing-contract-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0017","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0017-packer-docs-import-pattern.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"}]}
|
||||
{"type":"discussion","id":"DSC-0004","status":"abandoned","ticket":"tilemap-and-metatile-runtime-binary-layout","title":"Tilemap and Metatile Runtime Binary Layout","created_at":"2026-03-26","updated_at":"2026-04-24","tags":["packer","legacy-import","tilemap","metatile","runtime-layout"],"agendas":[{"id":"AGD-0004","file":"AGD-0004-tilemap-and-metatile-runtime-binary-layout.md","status":"abandoned","created_at":"2026-03-26","updated_at":"2026-04-24","_override_reason":"Explicit user request on 2026-04-24 to abandon AGD-0004 because the agenda is no longer valid."}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0005","status":"open","ticket":"variable-tile-bank-palette-serialization","title":"Variable Tile Bank Palette Serialization","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["packer","legacy-import","tile-bank","palette-serialization","versioning"],"agendas":[{"id":"AGD-0005","file":"AGD-0005-variable-tile-bank-palette-serialization.md","status":"open","created_at":"2026-03-26","updated_at":"2026-03-26"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0006","status":"done","ticket":"pbs-game-facing-asset-refs-and-call-result-discard","title":"PBS Game-Facing Asset References and Ignored Call Result Lowering","created_at":"2026-03-27","updated_at":"2026-03-30","tags":["compiler","pbs","ergonomics","lowering","runtime","asset-identity","expression-statements"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0024","file":"discussion/lessons/DSC-0006-pbs-game-facing-asset-refs-and-call-result-discard/LSN-0024-addressable-surface-host-metadata-and-ignored-value-discipline.md","status":"done","created_at":"2026-03-30","updated_at":"2026-03-30"}]}
|
||||
{"type":"discussion","id":"DSC-0007","status":"done","ticket":"pbs-learn-to-discussion-lessons-migration","title":"Migrate PBS Learn Documents into Discussion Lessons","created_at":"2026-03-27","updated_at":"2026-03-27","tags":["compiler","pbs","migration","discussion-framework","lessons","learn-prune"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0018","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0018-pbs-ast-and-parser-contract-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0019","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0019-pbs-name-resolution-and-linking-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0020","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0020-pbs-runtime-values-identity-memory-boundaries-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0021","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0021-pbs-diagnostics-and-conformance-governance-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0022","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0022-pbs-globals-lifecycle-and-published-entrypoint-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"}]}
|
||||
{"type":"discussion","id":"DSC-0008","status":"done","ticket":"pbs-low-level-asset-manager-surface","title":"PBS Low-Level Asset Manager Surface for Runtime AssetManager","created_at":"2026-03-27","updated_at":"2026-03-27","tags":["compiler","pbs","runtime","asset-manager","host-abi","stdlib","asset"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0023","file":"discussion/lessons/DSC-0008-pbs-low-level-asset-manager-surface/LSN-0023-lowassets-runtime-aligned-sdk-surface.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"}]}
|
||||
{"type":"discussion","id":"DSC-0009","status":"done","ticket":"studio-debugger-workspace-integration","title":"Integrate ../debugger into Studio as a dedicated workspace","created_at":"2026-03-30","updated_at":"2026-04-07","tags":["studio","debugger","workspace","integration","shell"],"agendas":[],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0010","status":"done","ticket":"studio-code-editor-workspace-foundations","title":"Establish Code Editor workspace foundations in Studio without LSP","created_at":"2026-03-30","updated_at":"2026-03-31","tags":["studio","editor","workspace","multi-frontend","lsp-deferred"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0026","file":"discussion/lessons/DSC-0010-studio-code-editor-workspace-foundations/LSN-0026-read-only-editor-foundations-and-semantic-deferral.md","status":"done","created_at":"2026-03-31","updated_at":"2026-03-31"}]}
|
||||
{"type":"discussion","id":"DSC-0011","status":"done","ticket":"compiler-analyze-compile-build-pipeline-split","title":"Split compiler pipeline into analyze, compile, and build entrypoints","created_at":"2026-03-30","updated_at":"2026-03-30","tags":["compiler","pipeline","artifacts","build","analysis"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0025","file":"discussion/lessons/DSC-0011-compiler-analyze-compile-build-pipeline-split/LSN-0025-compiler-pipeline-entrypoints-and-result-boundaries.md","status":"done","created_at":"2026-03-30","updated_at":"2026-03-30"}]}
|
||||
{"type":"discussion","id":"DSC-0012","status":"done","ticket":"studio-editor-document-vfs-boundary","title":"Definir um boundary de VFS documental para tree/view/open files no Code Editor do Studio","created_at":"2026-03-31","updated_at":"2026-03-31","tags":["studio","editor","workspace","vfs","filesystem","boundary"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0027","file":"discussion/lessons/DSC-0012-studio-editor-document-vfs-boundary/LSN-0027-project-document-vfs-and-session-owned-editor-boundary.md","status":"done","created_at":"2026-03-31","updated_at":"2026-03-31"}]}
|
||||
{"type":"discussion","id":"DSC-0013","status":"done","ticket":"studio-editor-write-wave-supported-non-frontend-files","title":"Definir a wave inicial de edicao no Code Editor apenas para arquivos aceitos e nao relacionados ao FE","created_at":"2026-03-31","updated_at":"2026-04-02","tags":["studio","editor","workspace","write","read-only","vfs","frontend-boundary"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0028","file":"discussion/lessons/DSC-0013-studio-editor-write-wave-supported-non-frontend-files/LSN-0028-controlled-editor-write-wave-and-read-only-frontend-semantic-phase.md","status":"done","created_at":"2026-04-02","updated_at":"2026-04-02"}]}
|
||||
{"type":"discussion","id":"DSC-0014","status":"done","ticket":"studio-frontend-owned-semantic-editor-presentation","title":"Definir ownership do schema visual semantico do editor por frontend","created_at":"2026-04-02","updated_at":"2026-04-02","tags":["studio","editor","frontend","presentation","semantic-highlighting","compiler","pbs"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0029","file":"discussion/lessons/DSC-0014-studio-frontend-owned-semantic-editor-presentation/LSN-0029-frontend-owned-semantic-presentation-descriptor-and-host-consumption.md","status":"done","created_at":"2026-04-02","updated_at":"2026-04-02"}]}
|
||||
{"type":"discussion","id":"DSC-0015","status":"done","ticket":"pbs-service-facade-reserved-metadata","title":"SDK Service Bodies Calling Builtin/Intrinsic Proxies as Ordinary PBS Code","created_at":"2026-04-03","updated_at":"2026-04-03","tags":["compiler","pbs","sdk","stdlib","lowering","service","intrinsic","sdk-interface"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0030","file":"discussion/lessons/DSC-0015-pbs-service-facade-reserved-metadata/LSN-0030-sdk-service-bodies-over-private-reserved-proxies.md","status":"done","created_at":"2026-04-03","updated_at":"2026-04-03"}]}
|
||||
{"type":"discussion","id":"DSC-0016","status":"done","ticket":"studio-editor-scope-guides-and-brace-anchoring","title":"Scope Guides do Code Editor com ancoragem exata em braces e destaque do escopo ativo","created_at":"2026-04-03","updated_at":"2026-04-06","tags":["studio","editor","scope-guides","braces","semantic-read","frontend-contract"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0034","file":"discussion/lessons/DSC-0016-studio-editor-scope-guides-and-brace-anchoring/LSN-0034-active-scope-gutter-and-frontend-owned-structural-anchors.md","status":"done","created_at":"2026-04-06","updated_at":"2026-04-06"}]}
|
||||
{"type":"discussion","id":"DSC-0017","status":"done","ticket":"studio-editor-inline-type-hints-for-let-bindings","title":"Inline Type Hints for Let Bindings in the Studio Editor","created_at":"2026-04-03","updated_at":"2026-04-06","tags":["studio","editor","inline-hints","inlay-hints","lsp","pbs","type-inference"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0035","file":"discussion/lessons/DSC-0017-studio-editor-inline-type-hints-for-let-bindings/LSN-0035-frontend-owned-inline-hints-with-decorative-inline-rendering.md","status":"done","created_at":"2026-04-06","updated_at":"2026-04-06"}]}
|
||||
{"type":"discussion","id":"DSC-0018","status":"done","ticket":"studio-project-local-studio-state-under-dot-studio","title":"Persist project-local Studio state under .studio","created_at":"2026-04-04","updated_at":"2026-04-04","tags":["studio","project-session","project-state","persistence","dot-studio","shell","layout","setup"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0031","file":"discussion/lessons/DSC-0018-studio-project-local-studio-state-under-dot-studio/LSN-0031-project-local-studio-state-and-lifecycle-safe-layout-restoration.md","status":"done","created_at":"2026-04-04","updated_at":"2026-04-04"}]}
|
||||
{"type":"discussion","id":"DSC-0019","status":"done","ticket":"studio-project-local-setup-separate-from-main-studio-state","title":"Separate project-local setup from the main Studio state under .studio","created_at":"2026-04-04","updated_at":"2026-04-04","tags":["studio","project-session","project-state","persistence","dot-studio","setup","boundary"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0032","file":"discussion/lessons/DSC-0019-studio-project-local-setup-separate-from-main-studio-state/LSN-0032-separate-project-config-from-session-restoration-state.md","status":"done","created_at":"2026-04-04","updated_at":"2026-04-04"}]}
|
||||
{"type":"discussion","id":"DSC-0020","status":"done","ticket":"studio-editor-indentation-policy-and-project-setup","title":"Indentation Policy, Status-Bar Semantics, and Project-Local Editor Setup","created_at":"2026-04-04","updated_at":"2026-04-04","tags":["studio","editor","indentation","tabs","setup","dot-studio","configuration","ux"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0033","file":"discussion/lessons/DSC-0020-studio-editor-indentation-policy-and-project-setup/LSN-0033-setup-owned-indentation-policy-and-project-bootstrap-defaults.md","status":"done","created_at":"2026-04-04","updated_at":"2026-04-04"}]}
|
||||
{"type":"discussion","id":"DSC-0021","status":"done","ticket":"studio-frontend-editor-write-and-save-wave","title":"Enable Frontend Editing and Save in the Studio Code Editor","created_at":"2026-04-04","updated_at":"2026-04-06","tags":["studio","editor","frontend","write","save","vfs","lsp","pbs","access-policy"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0036","file":"discussion/lessons/DSC-0021-studio-frontend-editor-write-and-save-wave/LSN-0036-vfs-owned-frontend-edit-and-save-wave.md","status":"done","created_at":"2026-04-06","updated_at":"2026-04-06"}]}
|
||||
{"type":"discussion","id":"DSC-0022","status":"done","ticket":"studio-play-stop-cartridge-flow","title":"Wire the Studio Play/Stop button to shipper phase 1 cartridge preparation and runtime execution","created_at":"2026-04-06","updated_at":"2026-04-07","tags":["studio","play-stop","shipper","runtime","cartridge","shell"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0043","file":"discussion/lessons/DSC-0022-studio-play-stop-and-debugger-integration/LSN-0043-studio-play-stop-and-debugger-integration.md","status":"done","created_at":"2026-04-07","updated_at":"2026-04-07"}]}
|
||||
{"type":"discussion","id":"DSC-0023","status":"done","ticket":"gradle-version-catalog-migration","title":"Move dependency version management to Version Catalog (TOML)","created_at":"2026-04-07","updated_at":"2026-04-07","tags":["gradle","buildSrc","dependency-management","version-catalog"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0037","file":"discussion/lessons/DSC-0023-gradle-version-catalog-migration/LSN-0037-gradle-version-catalog-adoption.md","status":"done","created_at":"2026-04-07","updated_at":"2026-04-07"}]}
|
||||
@@ -1,66 +0,0 @@
|
||||
{"type":"meta","next_id":{"DSC":66,"AGD":69,"DEC":57,"PLN":136,"LSN":73,"CLSN":1}}
|
||||
{"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"}]}
|
||||
{"type":"discussion","id":"DSC-0062","status":"done","ticket":"multi-frontend-pvm-neutrality","title":"Neutralidade da PVM e identificacao PBX independente de PBS","created_at":"2026-07-15","updated_at":"2026-09-18","tags":["vm-arch","runtime","pvm","pbx","compiler","multi-frontend"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0061","file":"discussion/lessons/DSC-0062-multi-frontend-pvm-neutrality/LSN-0061-pbx-runtime-boundary.md","status":"done","created_at":"2026-09-18","updated_at":"2026-09-18"}]}
|
||||
{"type":"discussion","id":"DSC-0061","status":"done","ticket":"multi-frontend-sdk-canonical-definition","title":"Auditoria e centralizacao gradual da definicao canonica do SDK","created_at":"2026-07-15","updated_at":"2026-09-19","tags":["compiler","compiler-general","sdk","stdlib","hostcalls","intrinsics","multi-frontend"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0064","file":"discussion/lessons/DSC-0061-multi-frontend-sdk-canonical-definition/LSN-0064-runtime-owns-console-abi-pbs-is-delivery.md","status":"done","created_at":"2026-09-19","updated_at":"2026-09-19"}]}
|
||||
{"type":"discussion","id":"DSC-0060","status":"done","ticket":"multi-frontend-validation-boundaries","title":"Separar validacoes de linguagem e validacoes de plataforma","created_at":"2026-07-15","updated_at":"2026-09-19","tags":["compiler","compiler-general","compiler-pbs","backend","validation","multi-frontend"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0063","file":"discussion/lessons/DSC-0060-multi-frontend-validation-boundaries/LSN-0063-language-vs-platform-validation-ownership.md","status":"done","created_at":"2026-09-19","updated_at":"2026-09-19"}]}
|
||||
{"type":"discussion","id":"DSC-0059","status":"done","ticket":"multi-frontend-common-lifecycle","title":"Extrair lifecycle comum das responsabilidades do frontend PBS","created_at":"2026-07-15","updated_at":"2026-09-19","tags":["compiler","compiler-general","compiler-pbs","lifecycle","backend","multi-frontend"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0062","file":"discussion/lessons/DSC-0059-multi-frontend-common-lifecycle/LSN-0062-common-lifecycle-assembly-stage.md","status":"done","created_at":"2026-09-19","updated_at":"2026-09-19"}]}
|
||||
{"type":"discussion","id":"DSC-0058","status":"done","ticket":"multi-frontend-serializable-ir","title":"Manter a IR comum serializavel por design","created_at":"2026-07-15","updated_at":"2026-07-15","tags":["compiler","compiler-general","ir","backend","serialization","multi-frontend"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0060","file":"discussion/lessons/DSC-0058-multi-frontend-serializable-ir/LSN-0060-data-contract-first-for-serializable-irbackend.md","status":"done","created_at":"2026-07-15","updated_at":"2026-07-15"}]}
|
||||
{"type":"discussion","id":"DSC-0057","status":"done","ticket":"multi-frontend-frontend-backend-contract","title":"Estabilizar contrato entre frontend e backend comum","created_at":"2026-07-15","updated_at":"2026-07-15","tags":["compiler","compiler-general","compiler-pbs","ir","backend","multi-frontend"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0059","file":"discussion/lessons/DSC-0057-multi-frontend-frontend-backend-contract/LSN-0059-common-irbackend-handoff-and-backend-guardrails.md","status":"done","created_at":"2026-07-15","updated_at":"2026-07-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-0044","status":"open","ticket":"pbs-lsp-code-actions","title":"PBS LSP Code Actions and Quick Fixes","created_at":"2026-07-15","updated_at":"2026-07-15","tags":["studio","lsp","vscode","compiler-pbs","editor","code-actions","quick-fix"],"agendas":[{"id":"AGD-0047","file":"AGD-0047-pbs-lsp-code-actions-and-quick-fixes.md","status":"open","created_at":"2026-07-15","updated_at":"2026-07-15"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"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"}]}
|
||||
{"type":"discussion","id":"DSC-0041","status":"done","ticket":"pbs-lsp-document-symbols-outline","title":"PBS LSP Document Symbols and Outline","created_at":"2026-07-15","updated_at":"2026-09-21","tags":["studio","lsp","vscode","compiler-pbs","editor","outline","document-symbols"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0070","file":"discussion/lessons/DSC-0041-pbs-lsp-document-symbols-outline/LSN-0070-pbs-outline-is-an-ast-backed-document-symbol-tree.md","status":"done","created_at":"2026-09-21","updated_at":"2026-09-21"}]}
|
||||
{"type":"discussion","id":"DSC-0040","status":"done","ticket":"pbs-lsp-find-references","title":"PBS LSP Find References","created_at":"2026-07-15","updated_at":"2026-09-21","tags":["studio","lsp","vscode","compiler-pbs","editor","references"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0069","file":"discussion/lessons/DSC-0040-pbs-lsp-find-references/LSN-0069-pbs-find-references-is-the-physical-inverse-of-definition.md","status":"done","created_at":"2026-09-21","updated_at":"2026-09-21"}]}
|
||||
{"type":"discussion","id":"DSC-0039","status":"done","ticket":"pbs-lsp-go-to-definition","title":"PBS LSP Go to Definition","created_at":"2026-07-15","updated_at":"2026-09-21","tags":["studio","lsp","vscode","compiler-pbs","editor","definition"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0068","file":"discussion/lessons/DSC-0039-pbs-lsp-go-to-definition/LSN-0068-pbs-go-to-definition-uses-editorial-lookup-and-physical-files.md","status":"done","created_at":"2026-09-21","updated_at":"2026-09-21"}]}
|
||||
{"type":"discussion","id":"DSC-0038","status":"done","ticket":"studio-packer-rgba8888-asset-pipeline","title":"Studio and Packer RGBA8888 Asset Pipeline Alignment","created_at":"2026-05-23","updated_at":"2026-07-14","tags":["studio","packer","assets","glyph-bank","palette","rgba8888","runtime-alignment"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0053","file":"discussion/lessons/DSC-0038-studio-packer-rgba8888-asset-pipeline/LSN-0053-rgba8888-is-the-canonical-studio-packer-palette-contract.md","status":"done","created_at":"2026-07-14","updated_at":"2026-07-14"}]}
|
||||
{"type":"discussion","id":"DSC-0037","status":"done","ticket":"pbs-autocomplete-parameter-names","title":"PBS autocomplete parameter names for stdlib and method calls","created_at":"2026-05-08","updated_at":"2026-05-14","tags":["compiler-pbs","studio","lsp","autocomplete","signature-help","stdlib"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0052","file":"discussion/lessons/DSC-0037-pbs-autocomplete-parameter-names/LSN-0052-canonical-callable-parameter-names-through-pbs-editor-assistance.md","status":"done","created_at":"2026-05-14","updated_at":"2026-05-14"}]}
|
||||
{"type":"discussion","id":"DSC-0036","status":"done","ticket":"pbs-symbol-documentation-and-hover-markdown","title":"Modelo de documentacao de simbolos em PBS e consumo markdown no hover","created_at":"2026-05-08","updated_at":"2026-07-15","tags":["compiler","compiler-pbs","studio","lsp","vscode","editor","hover","documentation","markdown"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0057","file":"discussion/lessons/DSC-0036-pbs-symbol-documentation-and-hover-markdown/LSN-0057-compiler-owned-pbs-doc-markdown-for-editor-assistance.md","status":"done","created_at":"2026-07-15","updated_at":"2026-07-15"}]}
|
||||
{"type":"discussion","id":"DSC-0035","status":"done","ticket":"pbs-lsp-editor-assistance-wave-1","title":"Wave 1 de assistencia editorial via LSP para PBS no VS Code","created_at":"2026-05-08","updated_at":"2026-05-08","tags":["studio","lsp","vscode","compiler","compiler-pbs","editor","completion","hover","signature-help"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0051","file":"discussion/lessons/DSC-0035-pbs-lsp-editor-assistance-wave-1/LSN-0051-compiler-backed-editor-assistance-for-pbs.md","status":"done","created_at":"2026-05-08","updated_at":"2026-05-08"}]}
|
||||
{"type":"discussion","id":"DSC-0034","status":"done","ticket":"frontend-semantic-host-projection-flexibility","title":"Frontend semantic vocabulary flexibility and declarative host projection","created_at":"2026-05-06","updated_at":"2026-05-07","tags":["compiler","compiler-general","frontend","semantics","vscode","host-projection","lsp"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0048","file":"discussion/lessons/DSC-0034-frontend-semantic-host-projection-flexibility/LSN-0048-frontend-owned-semantic-vocabularies-with-declarative-host-projection.md","status":"done","created_at":"2026-05-07","updated_at":"2026-05-07"}]}
|
||||
{"type":"discussion","id":"DSC-0033","status":"done","ticket":"frontend-visual-theme-spec-and-css-retirement","title":"Frontend visual theme spec and retirement of host-consumed semantic CSS","created_at":"2026-05-06","updated_at":"2026-05-08","tags":["compiler","compiler-general","frontend","presentation","theming","studio","vscode","lsp","pbs"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0050","file":"discussion/lessons/DSC-0033-frontend-visual-theme-spec-and-css-retirement/LSN-0050-frontend-owned-visual-themes-with-structured-contract-and-host-adapters.md","status":"done","created_at":"2026-05-08","updated_at":"2026-05-08"}]}
|
||||
{"type":"discussion","id":"DSC-0032","status":"done","ticket":"studio-new-lsp-api-and-v1-boundary","title":"Novo boundary entre lsp-api, lsp-v1 e a extensao VS Code","created_at":"2026-05-05","updated_at":"2026-05-07","tags":["studio","lsp","vscode","protocol","api","boundary"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0047","file":"discussion/lessons/DSC-0032-studio-new-lsp-api-and-v1-boundary/LSN-0047-project-scoped-lsp-boundary-and-protocol-containment.md","status":"done","created_at":"2026-05-07","updated_at":"2026-05-07"}]}
|
||||
{"type":"discussion","id":"DSC-0031","status":"done","ticket":"studio-editor-workspace-cleanup","title":"Limpeza completa do Workspace Editor do Studio e remoção dos acoplamentos legados","created_at":"2026-05-05","updated_at":"2026-05-08","tags":["studio","editor","cleanup","vfs","lsp","migration"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0049","file":"discussion/lessons/DSC-0031-studio-editor-workspace-cleanup/LSN-0049-remove-the-embedded-editor-stack-before-rebuilding-code-workflows.md","status":"done","created_at":"2026-05-08","updated_at":"2026-05-08"}]}
|
||||
{"type":"discussion","id":"DSC-0030","status":"done","ticket":"studio-scene-pack-runtime-binary-contract","title":"Studio scene pack contract for runtime SCENE binary payload","created_at":"2026-04-24","updated_at":"2026-05-01","tags":["studio","packer","runtime","scene","asset-pack","binary-format","tiled"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0046","file":"discussion/lessons/DSC-0030-studio-scene-pack-runtime-binary-contract/LSN-0046-canonical-scene-owns-editorial-truth-while-pack-stays-request-driven.md","status":"done","created_at":"2026-05-01","updated_at":"2026-05-01"}]}
|
||||
{"type":"discussion","id":"DSC-0029","status":"done","ticket":"studio-frame-composer-syscall-and-sprite-alignment","title":"Studio Alignment with Runtime FrameComposer Syscalls and Sprite Composition","created_at":"2026-04-18","updated_at":"2026-04-18","tags":["studio","compiler","pbs","stdlib","runtime-alignment","abi","syscall","frame-composer","sprites"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0041","file":"discussion/lessons/DSC-0029-studio-frame-composer-syscall-and-sprite-alignment/LSN-0041-composer-must-own-public-sprite-composition.md","status":"done","created_at":"2026-04-18","updated_at":"2026-04-18"}]}
|
||||
{"type":"discussion","id":"DSC-0028","status":"done","ticket":"studio-tiled-parser-assets-scene-asset-type","title":"Tiled Parser and Scene Asset-Type Ownership in Assets Workspace","created_at":"2026-04-15","updated_at":"2026-04-23","tags":["studio","assets","scene","tiled","parser","asset-type"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0045","file":"discussion/lessons/DSC-0028-studio-tiled-parser-assets-scene-asset-type/LSN-0045-asset-owned-scene-bank-and-tiled-xml-workflow.md","status":"done","created_at":"2026-04-23","updated_at":"2026-04-23"}]}
|
||||
{"type":"discussion","id":"DSC-0027","status":"abandoned","ticket":"studio-scene-workspace","title":"Scene Workspace for SCENE Authoring","created_at":"2026-04-14","updated_at":"2026-04-15","tags":["studio","workspace","scene","tilemap","asset","runtime-alignment"],"agendas":[{"id":"AGD-0029","file":"AGD-0029-studio-scene-workspace.md","status":"abandoned","created_at":"2026-04-14","updated_at":"2026-04-15","_override_reason":"Explicit user request on 2026-04-15 to abandon the accepted agenda and its downstream work."}],"decisions":[{"id":"DEC-0026","file":"DEC-0026-studio-scene-workspace.md","status":"abandoned","created_at":"2026-04-14","updated_at":"2026-04-15","ref_agenda":"AGD-0029","_override_reason":"Explicit user request on 2026-04-15 to abandon the accepted decision and stop using it as normative guidance."}],"plans":[{"id":"PLN-0049","file":"PLN-0049-scene-workspace-spec-and-boundary-propagation.md","status":"abandoned","created_at":"2026-04-14","updated_at":"2026-04-15","ref_decisions":["DEC-0026"],"_override_reason":"Explicit user request on 2026-04-15 to abandon all plans derived from DEC-0026."},{"id":"PLN-0050","file":"PLN-0050-scene-workspace-shell-and-project-state-foundations.md","status":"abandoned","created_at":"2026-04-14","updated_at":"2026-04-15","ref_decisions":["DEC-0026"],"_override_reason":"Explicit user request on 2026-04-15 to abandon all plans derived from DEC-0026."},{"id":"PLN-0051","file":"PLN-0051-scene-artifact-and-assets-handoff-contract.md","status":"abandoned","created_at":"2026-04-14","updated_at":"2026-04-15","ref_decisions":["DEC-0026"],"_override_reason":"Explicit user request on 2026-04-15 to abandon all plans derived from DEC-0026."},{"id":"PLN-0052","file":"PLN-0052-scene-workspace-wave-1-tilemap-editor.md","status":"abandoned","created_at":"2026-04-14","updated_at":"2026-04-15","ref_decisions":["DEC-0026"],"_override_reason":"Explicit user request on 2026-04-15 to abandon all plans derived from DEC-0026."}],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0026","status":"done","ticket":"glyph-bank-naming-alignment-with-runtime","title":"Glyph Bank Naming Alignment with Runtime DEC-0006","created_at":"2026-04-10","updated_at":"2026-04-10","tags":["packer","studio","naming","asset-contract","runtime-alignment","glyph-bank"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0040","file":"discussion/lessons/DSC-0026-glyph-bank-naming-alignment-with-runtime/LSN-0040-glyph-bank-artifact-naming-alignment.md","status":"done","created_at":"2026-04-10","updated_at":"2026-04-10"}]}
|
||||
{"type":"discussion","id":"DSC-0025","status":"done","ticket":"packer-pipeline-metadata-ownership","title":"Pipeline Metadata Ownership and Runtime Contract","created_at":"2026-04-09","updated_at":"2026-04-10","tags":["packer","metadata","runtime-contract","tooling","studio"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0039","file":"discussion/lessons/DSC-0025-packer-pipeline-metadata-ownership/LSN-0039-runtime-header-boundary-and-tooling-owned-pipeline-metadata.md","status":"done","created_at":"2026-04-10","updated_at":"2026-04-10"}]}
|
||||
{"type":"discussion","id":"DSC-0024","status":"done","ticket":"jacoco-reports-consolidation","title":"JaCoCo Reports Consolidation in Gradle","created_at":"2026-04-07","updated_at":"2026-04-07","tags":["infra","gradle","jacoco","coverage","jenkins"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0038","file":"discussion/lessons/DSC-0024-jacoco-reports-consolidation/LSN-0038-jacoco-reports-consolidation.md","status":"done","created_at":"2026-04-07","updated_at":"2026-04-07"},{"id":"LSN-0044","file":"discussion/lessons/DSC-0024-jacoco-reports-consolidation/LSN-0044-jenkins-jacoco-alignment.md","status":"done","created_at":"2026-04-07","updated_at":"2026-04-07"}]}
|
||||
{"type":"discussion","id":"DSC-0001","status":"done","ticket":"studio-docs-import","title":"Import docs/studio into discussion-framework artifacts","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["studio","migration","discussion-framework","docs-import"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0001","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0001-assets-workspace-execution-wave-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0002","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0002-bank-composition-editor-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0003","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0003-mental-model-asset-mutations-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0004","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0004-mental-model-assets-workspace-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0005","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0005-mental-model-studio-events-and-components-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0006","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0006-mental-model-studio-shell-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0007","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0007-pack-wizard-shell-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0008","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0008-project-scoped-state-and-activity-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0016","file":"discussion/lessons/DSC-0001-studio-docs-import/LSN-0016-studio-docs-import-pattern.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"}]}
|
||||
{"type":"discussion","id":"DSC-0002","status":"done","ticket":"palette-management-in-studio","title":"Palette Management in Studio","created_at":"2026-03-26","updated_at":"2026-04-23","tags":["studio","legacy-import","palette-management","tile-bank","packer-boundary"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0042","file":"discussion/lessons/DSC-0002-palette-management-in-studio/LSN-0042-schema-driven-palette-authoring-and-local-metadata-events.md","status":"done","created_at":"2026-04-23","updated_at":"2026-04-23"}]}
|
||||
{"type":"discussion","id":"DSC-0003","status":"done","ticket":"packer-docs-import","title":"Import docs/packer into discussion-framework artifacts","created_at":"2026-03-26","updated_at":"2026-03-26","tags":["packer","migration","discussion-framework","docs-import"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0009","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0009-mental-model-packer-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0010","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0010-asset-identity-and-runtime-contract-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0011","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0011-foundations-workspace-runtime-and-build-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0012","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0012-runtime-ownership-and-studio-boundary-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0013","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0013-metadata-convergence-and-runtime-sink-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0014","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0014-pack-wizard-summary-validation-and-pack-execution-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0015","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0015-tile-bank-packing-contract-legacy.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"},{"id":"LSN-0017","file":"discussion/lessons/DSC-0003-packer-docs-import/LSN-0017-packer-docs-import-pattern.md","status":"done","created_at":"2026-03-26","updated_at":"2026-03-26"}]}
|
||||
{"type":"discussion","id":"DSC-0004","status":"abandoned","ticket":"tilemap-and-metatile-runtime-binary-layout","title":"Tilemap and Metatile Runtime Binary Layout","created_at":"2026-03-26","updated_at":"2026-04-24","tags":["packer","legacy-import","tilemap","metatile","runtime-layout"],"agendas":[{"id":"AGD-0004","file":"AGD-0004-tilemap-and-metatile-runtime-binary-layout.md","status":"abandoned","created_at":"2026-03-26","updated_at":"2026-04-24","_override_reason":"Explicit user request on 2026-04-24 to abandon AGD-0004 because the agenda is no longer valid."}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0005","status":"done","ticket":"variable-tile-bank-palette-serialization","title":"Variable Glyph Bank Palette Serialization","created_at":"2026-03-26","updated_at":"2026-07-14","tags":["packer","legacy-import","glyph-bank","palette-serialization","rgba8888","runtime-alignment"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0054","file":"discussion/lessons/DSC-0005-variable-glyph-bank-palette-serialization/LSN-0054-runtime-owned-variable-glyph-palette-counts.md","status":"done","created_at":"2026-07-14","updated_at":"2026-07-14"}]}
|
||||
{"type":"discussion","id":"DSC-0006","status":"done","ticket":"pbs-game-facing-asset-refs-and-call-result-discard","title":"PBS Game-Facing Asset References and Ignored Call Result Lowering","created_at":"2026-03-27","updated_at":"2026-03-30","tags":["compiler","pbs","ergonomics","lowering","runtime","asset-identity","expression-statements"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0024","file":"discussion/lessons/DSC-0006-pbs-game-facing-asset-refs-and-call-result-discard/LSN-0024-addressable-surface-host-metadata-and-ignored-value-discipline.md","status":"done","created_at":"2026-03-30","updated_at":"2026-03-30"}]}
|
||||
{"type":"discussion","id":"DSC-0007","status":"done","ticket":"pbs-learn-to-discussion-lessons-migration","title":"Migrate PBS Learn Documents into Discussion Lessons","created_at":"2026-03-27","updated_at":"2026-03-27","tags":["compiler","pbs","migration","discussion-framework","lessons","learn-prune"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0018","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0018-pbs-ast-and-parser-contract-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0019","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0019-pbs-name-resolution-and-linking-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0020","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0020-pbs-runtime-values-identity-memory-boundaries-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0021","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0021-pbs-diagnostics-and-conformance-governance-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0022","file":"discussion/lessons/DSC-0007-pbs-learn-to-discussion-lessons-migration/LSN-0022-pbs-globals-lifecycle-and-published-entrypoint-legacy.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"}]}
|
||||
{"type":"discussion","id":"DSC-0008","status":"done","ticket":"pbs-low-level-asset-manager-surface","title":"PBS Low-Level Asset Manager Surface for Runtime AssetManager","created_at":"2026-03-27","updated_at":"2026-03-27","tags":["compiler","pbs","runtime","asset-manager","host-abi","stdlib","asset"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0023","file":"discussion/lessons/DSC-0008-pbs-low-level-asset-manager-surface/LSN-0023-lowassets-runtime-aligned-sdk-surface.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"}]}
|
||||
{"type":"discussion","id":"DSC-0009","status":"done","ticket":"studio-debugger-workspace-integration","title":"Integrate ../debugger into Studio as a dedicated workspace","created_at":"2026-03-30","updated_at":"2026-04-07","tags":["studio","debugger","workspace","integration","shell"],"agendas":[],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0010","status":"done","ticket":"studio-code-editor-workspace-foundations","title":"Establish Code Editor workspace foundations in Studio without LSP","created_at":"2026-03-30","updated_at":"2026-03-31","tags":["studio","editor","workspace","multi-frontend","lsp-deferred"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0026","file":"discussion/lessons/DSC-0010-studio-code-editor-workspace-foundations/LSN-0026-read-only-editor-foundations-and-semantic-deferral.md","status":"done","created_at":"2026-03-31","updated_at":"2026-03-31"}]}
|
||||
{"type":"discussion","id":"DSC-0011","status":"done","ticket":"compiler-analyze-compile-build-pipeline-split","title":"Split compiler pipeline into analyze, compile, and build entrypoints","created_at":"2026-03-30","updated_at":"2026-03-30","tags":["compiler","pipeline","artifacts","build","analysis"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0025","file":"discussion/lessons/DSC-0011-compiler-analyze-compile-build-pipeline-split/LSN-0025-compiler-pipeline-entrypoints-and-result-boundaries.md","status":"done","created_at":"2026-03-30","updated_at":"2026-03-30"}]}
|
||||
{"type":"discussion","id":"DSC-0012","status":"done","ticket":"studio-editor-document-vfs-boundary","title":"Definir um boundary de VFS documental para tree/view/open files no Code Editor do Studio","created_at":"2026-03-31","updated_at":"2026-03-31","tags":["studio","editor","workspace","vfs","filesystem","boundary"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0027","file":"discussion/lessons/DSC-0012-studio-editor-document-vfs-boundary/LSN-0027-project-document-vfs-and-session-owned-editor-boundary.md","status":"done","created_at":"2026-03-31","updated_at":"2026-03-31"}]}
|
||||
{"type":"discussion","id":"DSC-0013","status":"done","ticket":"studio-editor-write-wave-supported-non-frontend-files","title":"Definir a wave inicial de edicao no Code Editor apenas para arquivos aceitos e nao relacionados ao FE","created_at":"2026-03-31","updated_at":"2026-04-02","tags":["studio","editor","workspace","write","read-only","vfs","frontend-boundary"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0028","file":"discussion/lessons/DSC-0013-studio-editor-write-wave-supported-non-frontend-files/LSN-0028-controlled-editor-write-wave-and-read-only-frontend-semantic-phase.md","status":"done","created_at":"2026-04-02","updated_at":"2026-04-02"}]}
|
||||
{"type":"discussion","id":"DSC-0014","status":"done","ticket":"studio-frontend-owned-semantic-editor-presentation","title":"Definir ownership do schema visual semantico do editor por frontend","created_at":"2026-04-02","updated_at":"2026-04-02","tags":["studio","editor","frontend","presentation","semantic-highlighting","compiler","pbs"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0029","file":"discussion/lessons/DSC-0014-studio-frontend-owned-semantic-editor-presentation/LSN-0029-frontend-owned-semantic-presentation-descriptor-and-host-consumption.md","status":"done","created_at":"2026-04-02","updated_at":"2026-04-02"}]}
|
||||
{"type":"discussion","id":"DSC-0015","status":"done","ticket":"pbs-service-facade-reserved-metadata","title":"SDK Service Bodies Calling Builtin/Intrinsic Proxies as Ordinary PBS Code","created_at":"2026-04-03","updated_at":"2026-04-03","tags":["compiler","pbs","sdk","stdlib","lowering","service","intrinsic","sdk-interface"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0030","file":"discussion/lessons/DSC-0015-pbs-service-facade-reserved-metadata/LSN-0030-sdk-service-bodies-over-private-reserved-proxies.md","status":"done","created_at":"2026-04-03","updated_at":"2026-04-03"}]}
|
||||
{"type":"discussion","id":"DSC-0016","status":"done","ticket":"studio-editor-scope-guides-and-brace-anchoring","title":"Scope Guides do Code Editor com ancoragem exata em braces e destaque do escopo ativo","created_at":"2026-04-03","updated_at":"2026-04-06","tags":["studio","editor","scope-guides","braces","semantic-read","frontend-contract"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0034","file":"discussion/lessons/DSC-0016-studio-editor-scope-guides-and-brace-anchoring/LSN-0034-active-scope-gutter-and-frontend-owned-structural-anchors.md","status":"done","created_at":"2026-04-06","updated_at":"2026-04-06"}]}
|
||||
{"type":"discussion","id":"DSC-0017","status":"done","ticket":"studio-editor-inline-type-hints-for-let-bindings","title":"Inline Type Hints for Let Bindings in the Studio Editor","created_at":"2026-04-03","updated_at":"2026-04-06","tags":["studio","editor","inline-hints","inlay-hints","lsp","pbs","type-inference"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0035","file":"discussion/lessons/DSC-0017-studio-editor-inline-type-hints-for-let-bindings/LSN-0035-frontend-owned-inline-hints-with-decorative-inline-rendering.md","status":"done","created_at":"2026-04-06","updated_at":"2026-04-06"}]}
|
||||
{"type":"discussion","id":"DSC-0018","status":"done","ticket":"studio-project-local-studio-state-under-dot-studio","title":"Persist project-local Studio state under .studio","created_at":"2026-04-04","updated_at":"2026-04-04","tags":["studio","project-session","project-state","persistence","dot-studio","shell","layout","setup"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0031","file":"discussion/lessons/DSC-0018-studio-project-local-studio-state-under-dot-studio/LSN-0031-project-local-studio-state-and-lifecycle-safe-layout-restoration.md","status":"done","created_at":"2026-04-04","updated_at":"2026-04-04"}]}
|
||||
{"type":"discussion","id":"DSC-0019","status":"done","ticket":"studio-project-local-setup-separate-from-main-studio-state","title":"Separate project-local setup from the main Studio state under .studio","created_at":"2026-04-04","updated_at":"2026-04-04","tags":["studio","project-session","project-state","persistence","dot-studio","setup","boundary"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0032","file":"discussion/lessons/DSC-0019-studio-project-local-setup-separate-from-main-studio-state/LSN-0032-separate-project-config-from-session-restoration-state.md","status":"done","created_at":"2026-04-04","updated_at":"2026-04-04"}]}
|
||||
{"type":"discussion","id":"DSC-0020","status":"done","ticket":"studio-editor-indentation-policy-and-project-setup","title":"Indentation Policy, Status-Bar Semantics, and Project-Local Editor Setup","created_at":"2026-04-04","updated_at":"2026-04-04","tags":["studio","editor","indentation","tabs","setup","dot-studio","configuration","ux"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0033","file":"discussion/lessons/DSC-0020-studio-editor-indentation-policy-and-project-setup/LSN-0033-setup-owned-indentation-policy-and-project-bootstrap-defaults.md","status":"done","created_at":"2026-04-04","updated_at":"2026-04-04"}]}
|
||||
{"type":"discussion","id":"DSC-0021","status":"done","ticket":"studio-frontend-editor-write-and-save-wave","title":"Enable Frontend Editing and Save in the Studio Code Editor","created_at":"2026-04-04","updated_at":"2026-04-06","tags":["studio","editor","frontend","write","save","vfs","lsp","pbs","access-policy"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0036","file":"discussion/lessons/DSC-0021-studio-frontend-editor-write-and-save-wave/LSN-0036-vfs-owned-frontend-edit-and-save-wave.md","status":"done","created_at":"2026-04-06","updated_at":"2026-04-06"}]}
|
||||
{"type":"discussion","id":"DSC-0022","status":"done","ticket":"studio-play-stop-cartridge-flow","title":"Wire the Studio Play/Stop button to shipper phase 1 cartridge preparation and runtime execution","created_at":"2026-04-06","updated_at":"2026-04-07","tags":["studio","play-stop","shipper","runtime","cartridge","shell"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0043","file":"discussion/lessons/DSC-0022-studio-play-stop-and-debugger-integration/LSN-0043-studio-play-stop-and-debugger-integration.md","status":"done","created_at":"2026-04-07","updated_at":"2026-04-07"}]}
|
||||
{"type":"discussion","id":"DSC-0023","status":"done","ticket":"gradle-version-catalog-migration","title":"Move dependency version management to Version Catalog (TOML)","created_at":"2026-04-07","updated_at":"2026-04-07","tags":["gradle","buildSrc","dependency-management","version-catalog"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0037","file":"discussion/lessons/DSC-0023-gradle-version-catalog-migration/LSN-0037-gradle-version-catalog-adoption.md","status":"done","created_at":"2026-04-07","updated_at":"2026-04-07"}]}
|
||||
+130
@@ -0,0 +1,130 @@
|
||||
---
|
||||
id: LSN-0073
|
||||
ticket: pbs-lsp-code-actions
|
||||
title: PBS quick fixes are frontend repairs transported by the LSP
|
||||
created: 2026-09-22
|
||||
tags: [studio, lsp, vscode, compiler-pbs, editor, code-actions, quick-fix]
|
||||
---
|
||||
|
||||
# PBS quick fixes are frontend repairs transported by the LSP
|
||||
|
||||
## Original Problem
|
||||
|
||||
PBS diagnostics already reach the editor, but the server did not advertise `codeActionProvider`. A user could see a duplicate attribute or a bad `InitAllowed` and still had to repair it by hand.
|
||||
|
||||
The tempting shortcut was a code-to-edit table in the LSP. That shortcut does not work. Compiler `Diagnostic` values carry a stable code, phase, template, placeholders, span, and related locations, but the reserved-attribute reports use the short constructor: empty placeholders, and the English sentence is the only fine discriminator. `E_SEM_MALFORMED_RESERVED_ATTRIBUTE` covers Doc without `markdown`, a wrong payload, empty markdown, an unknown argument, `InitAllowed` with arguments, an out-of-range `AssetLowering`, and a bad `Host` shape. A switch on the code cannot pick a safe edit without reading the message. Diagnostic wording is rendering, not identity. Code actions are an optional editorial capability: the frontend owns the meaning, and the LSP transports it.
|
||||
|
||||
## Consolidated Decision
|
||||
|
||||
PBS quick fix is one `WorkspaceEdit` tied to one diagnostic of the requested physical document. The frontend produces the repair from the syntax tree. The LSP does not invent it.
|
||||
|
||||
Durable locks from `DEC-0057` (AGD-0047: scope A, producer B, residence B, first wave C):
|
||||
|
||||
1. This wave is quick fix only. No organize-imports, source action, refactor, function or struct stub, code lens, or server command.
|
||||
2. The server does not write files. The client applies the edit.
|
||||
3. Each repair names the stable diagnostic code, the primary span of that diagnostic, and exactly one local text edit. The LSP must not keep a code-to-edit table and must not read the diagnostic message to build the edit.
|
||||
4. The repair is computed on `textDocument/codeAction` from the current document analysis. It is not a required field of compiler `Diagnostic`, and it is not published inside `publishDiagnostics`, including `data`.
|
||||
5. `publishDiagnostics` carries the stable compiler code on `Diagnostic.code` so the client can echo it. Source, severity, message, and related information stay as they were. Those presentation questions remain with `AGD-0054`.
|
||||
6. A repair is returned only when the request context contains a diagnostic with the same code and the same primary range. An empty diagnostic list returns an empty action list. An `only` filter that does not include quick fix returns an empty action list.
|
||||
7. Each item is a QuickFix `CodeAction`, not a `Command`. The edit touches one file, the requested physical document, and contains one `TextEdit`. There is no lazy resolve.
|
||||
8. A path that is not a compiler-known regular file, including `/virtual/stdlib`, gets no edit.
|
||||
9. If the frontend does not expose the capability, the server does not advertise `codeActionProvider`. A request that arrives anyway returns an empty list, not a protocol error. Absence of a fix is not a refused cursor.
|
||||
10. PBS exposes the capability. Another frontend does not gain it merely by having a language service.
|
||||
11. The first wave is two shapes, not three diagnostic codes.
|
||||
- For every extra reserved attribute the declaration validator already reports as `E_SEM_DUPLICATE_RESERVED_ATTRIBUTE`, delete exactly that occurrence's span. Do not delete the first occurrence, the declaration, or neighboring whitespace.
|
||||
- For an `InitAllowed` attribute with a non-empty argument list on a host signature, the shape the validator reports as `E_SEM_MALFORMED_RESERVED_ATTRIBUTE` when the file is an interface module, replace that attribute span with `[InitAllowed]`. Do not emit that repair for any other attribute that shares the code. `[InitAllowed()]` is not diagnosed today and gets no repair.
|
||||
12. Nothing else gets a quick fix in this wave. In particular: inserting `[Doc(markdown = """""")]` or any other Doc rewrite, inserting an empty or incomplete `[Host]` or `[BuiltinType]`, `W_SEM_IGNORED_VALUE`, unresolved imports, an invalid reserved-attribute target, parse errors, unresolved overloads, and method stubs.
|
||||
|
||||
`AGD-0048` still owns formatting. `AGD-0049` still owns import assistance and organize-imports. `AGD-0054` still owns range, related locations, and diagnostic presentation. The PBS diagnostics spec does not gain a mandatory remediation field.
|
||||
|
||||
Spec 23 §8.3 now states the shared contract: code actions are quick fixes only; the frontend produces each repair from the document syntax; tooling transports it and does not parse the message or switch on codes; the published diagnostic carries the stable code; a repair is returned only for a matching context diagnostic; the edit is one physical file; the server does not write files, return a command, or require resolve; a missing capability is an empty list, not an error; virtual documents get no edit.
|
||||
|
||||
## Final Implementation
|
||||
|
||||
| Layer | What landed |
|
||||
|---|---|
|
||||
| PBS repairs | `PbsQuickFixCollector` walks the same attribute surfaces as `PbsDeclarationSemanticsValidator`, including the interface-module gate. Duplicate reserved attributes become an empty replacement of the extra span. The first `InitAllowed` with arguments on an interface host signature becomes `[InitAllowed]`. |
|
||||
| Source kind | `PbsSemanticReadSurface.sourceKindByFile` records the kind used to parse each file. A missing kind means project rules, so a project `declare host` does not pretend the validator emitted the interface-only `InitAllowed` diagnostic. |
|
||||
| Generic contract | `FrontendLanguageService.codeActionsSupported` defaults false. `codeActions` defaults empty. `FrontendCodeAction` is title, diagnostic code, path, offsets, and `newText`. Empty `newText` is a deletion and is allowed. |
|
||||
| PBS mapping | `PBSFrontendLanguageService` exposes the capability and returns repairs only for the requested regular file. `/virtual/stdlib` fails `Files.isRegularFile` and produces nothing. |
|
||||
| LSP | `BaselineDocumentIssue.code` is copied onto `Diagnostic.code`. `data` stays unset. The bridge drops repairs whose code and range do not match a context diagnostic. `PrometeuTextDocumentService.codeAction` honors the quick-fix `only` filter and never fails the request for “no fix”. |
|
||||
| Protocol | `codeActionProvider` is `CodeActionOptions` with kind `quickfix` and `resolveProvider` false, and only when the frontend reports support. Mapped actions are `CodeAction` values with a `WorkspaceEdit`. They are not `Command`s. |
|
||||
|
||||
Titles are `Remove duplicate reserved attribute` and `Remove InitAllowed arguments`.
|
||||
|
||||
## Examples
|
||||
|
||||
Duplicate `Doc` on a project file. The first copy stays. Each later copy is deleted at its own span:
|
||||
|
||||
```pbs
|
||||
[Doc(markdown = """
|
||||
First.
|
||||
""")]
|
||||
[Doc(markdown = """
|
||||
Second.
|
||||
""")]
|
||||
fn duplicated() -> void { return; }
|
||||
```
|
||||
|
||||
The quick fix removes the second attribute and leaves `First.`. A context diagnostic with the same range but code `E_SEM_MALFORMED_RESERVED_ATTRIBUTE` produces no action. An empty diagnostic list produces no action.
|
||||
|
||||
Malformed or empty Doc is visible and not repairable here:
|
||||
|
||||
```pbs
|
||||
[Doc(text = """
|
||||
Wrong argument.
|
||||
""")]
|
||||
fn malformed() -> void { return; }
|
||||
```
|
||||
|
||||
`InitAllowed` with arguments is repaired only on an interface-module host signature:
|
||||
|
||||
```pbs
|
||||
declare host Gfx {
|
||||
[Host(module = "gfx2d", name = "clear", version = 1)]
|
||||
[InitAllowed(flag = 1)]
|
||||
fn clear() -> void;
|
||||
|
||||
[Host(module = "gfx2d", name = "fill", version = 1)]
|
||||
[InitAllowed()]
|
||||
fn fill() -> void;
|
||||
}
|
||||
```
|
||||
|
||||
`clear` becomes `[InitAllowed]`. `fill` is already valid to the validator, so `[InitAllowed()]` is left alone. The same `InitAllowed(flag = 1)` inside a project file does not get that repair, because the validator does not emit the malformed-attribute diagnostic there.
|
||||
|
||||
The same collector deletes the extra copy of `BuiltinType`, `IntrinsicCall`, `BuiltinConst`, `Host`, and `AssetLowering` when the validator reports `E_SEM_DUPLICATE_RESERVED_ATTRIBUTE` for that surface. A malformed `Host` that merely shares the malformed-attribute code gets no edit.
|
||||
|
||||
## Pitfalls
|
||||
|
||||
Do not choose the edit in `prometeu-lsp` by switching on `E_SEM_MALFORMED_RESERVED_ATTRIBUTE` or by parsing the English message. The code is too coarse, and the message is not the identity.
|
||||
|
||||
Do not store the repair on compiler `Diagnostic` or in `Diagnostic.data`. Compilation and quick fix stay different surfaces. The published code exists so the client can echo it back.
|
||||
|
||||
Do not match on `Diagnostic.source` as if it were the long-term identity field. Today the bridge still copies the code into `source` for the existing presentation. The code-action match uses `Diagnostic.code`. `AGD-0054` may change `source` later.
|
||||
|
||||
Do not delete the first duplicate, and do not trim the whitespace around the deleted span. That cleanup is formatting and belongs to `AGD-0048`.
|
||||
|
||||
Do not insert `[Doc(markdown = """""")]`, an empty `[Host]`, or an empty `[BuiltinType]`. Those edits trade one diagnostic for another, or invent a declaration.
|
||||
|
||||
Do not treat `W_SEM_IGNORED_VALUE` as a source edit. Discard exists in lowering, not as PBS syntax.
|
||||
|
||||
Do not offer the `InitAllowed` rewrite for `[InitAllowed()]` or for a project file. The validator does not diagnose those shapes as “arguments not allowed”, so there is no diagnostic to attach.
|
||||
|
||||
Do not return a protocol error when there is no fix. Rename refuses a bad cursor with an error. Quick fix answers “nothing to do” with an empty list.
|
||||
|
||||
Do not advertise `codeActionProvider` for every frontend that has a language service. The default capability is unsupported.
|
||||
|
||||
Do not treat this lesson as closing formatting, import assistance, diagnostic presentation, snapshots, folding, document links, or hierarchy.
|
||||
|
||||
## References
|
||||
|
||||
- Agenda: `AGD-0047` (scope A, producer B, residence B, first wave C)
|
||||
- Decision: `DEC-0057`
|
||||
- Plan: `PLN-0136`
|
||||
- Spec 23 §8.3 — optional code actions; frontend-owned repair; match by code and range; empty list when unsupported
|
||||
- Spec: `docs/specs/compiler-languages/pbs/12. Diagnostics Specification.md` — wording is not identity; remediation stays outside the v1 diagnostic minimum
|
||||
- `LSN-0056` — code actions are an optional editorial capability
|
||||
- `LSN-0058` — generic `FrontendLanguageService` for the LSP
|
||||
- `LSN-0067` — no new editorial SPI without a real consumer; PBS implements the existing language service
|
||||
- Still open: `AGD-0048` formatting, `AGD-0049` import assistance, `AGD-0054` diagnostics UX, `AGD-0051` snapshots, `AGD-0056` hierarchy
|
||||
+70
@@ -0,0 +1,70 @@
|
||||
---
|
||||
id: LSN-0074
|
||||
ticket: pbs-lsp-remaining-editor-surface
|
||||
title: PBS remaining editor surface is frontend-owned and transported by the LSP
|
||||
created: 2026-09-22
|
||||
tags: [studio, lsp, vscode, compiler-pbs, editor]
|
||||
---
|
||||
|
||||
# PBS remaining editor surface is frontend-owned and transported by the LSP
|
||||
|
||||
## Original Problem
|
||||
|
||||
Nine open LSP agendas still described formatting, imports, semantic tokens, snapshots, completion, folding, diagnostics, document links, and call hierarchy as if none of that surface existed. By the time those agendas were still open, the server already advertised hover, completion, signature help, definition, references, outline, workspace symbols, rename, quick fix, and full semantic tokens. Each request still rebuilt analysis. References and rename had already shipped without a snapshot cache. There was no diagnostic whose meaning was "this name is not imported."
|
||||
|
||||
Treating the nine agendas as nine decisions would have reimplemented finished work and locked stale premises.
|
||||
|
||||
## Consolidated Decision
|
||||
|
||||
`DEC-0058` retired that split. One plan, `PLN-0137`, landed seven steps. The frontend produces the editorial result. The LSP transports it and does not invent a second policy. A missing capability is not advertised and returns an empty list, not a protocol error.
|
||||
|
||||
The wave explicitly does not add a project snapshot cache, type hierarchy, `completionItem/resolve`, snippets, a ranking score, range or on-type formatting, organize imports, a missing-import quick fix, `relatedInformation`, or a new semantic-token key.
|
||||
|
||||
1. Published editor diagnostic `source` is the bound frontend `languageId`. For PBS that is `pbs`. `code` stays the stable compiler code. The code is not copied into `source`.
|
||||
2. A document link covers only the span of a `ModuleRef` whose module assembly already resolved to a regular file. Virtual stdlib and unresolved modules produce no link.
|
||||
3. Folding comes from recovered spans of the listed declarations, their bodies, parameter lists, and `Doc` text blocks. A brace, parenthesis, or text block the tree does not cover still folds, including an unmatched opener through the end of the text. Selection grows outward from identifier, to argument or parameter list, to block or `Doc` text block, to declaration.
|
||||
4. Formatting is full-document only. It reprints the token stream, indents by four spaces where brace or parenthesis nesting changes, leaves `Doc` text-block interiors untouched, and does not reorder declarations or move comments off their line.
|
||||
5. Semantic tokens keep `PBSSemanticTokenProvider` as the baseline. Hover resolution may replace an identifier token only when an existing `PbsSemanticKind` matches the symbol. Failure, a broken file, or a symbol with no existing key keeps the baseline token.
|
||||
6. Completion inside a `ModuleRef` lists project and stdlib modules the current resolver can already name. Every other offset keeps the existing member or general completion. Items stay eager and `resolveProvider` stays false.
|
||||
7. Call hierarchy walks `CallExpr` nodes for functions and methods. It does not use the references index. A cursor that is not on a callable is empty. Type hierarchy is not advertised.
|
||||
|
||||
## Final Implementation
|
||||
|
||||
`CompilerLanguageServiceBridge` reads `LspProjectContext.languageId` into `BaselineDocumentIssue.source`. Document links read the physical module map that module assembly already built; stdlib files under `/virtual/stdlib` are not regular files, so they are not links. Folding, selection, and formatting reparse the open buffer with the existing lexer and parser. They do not require a successful project analysis. The semantic-token overlay runs only when editorial context is available and otherwise returns the provider tokens, including when project discovery fails. Module completion labels are the project modules from that same physical map plus the modules `ResourceStdlibEnvironmentResolver` can already resolve. Call hierarchy collects function, method, and constructor declarations from the recovered AST and matches `CallExpr` callees by name and call shape.
|
||||
|
||||
Spec 23 §8.3 states each of these rules. The nine earlier agendas, `AGD-0048` through `AGD-0056`, were abandoned and are not normative.
|
||||
|
||||
## Examples
|
||||
|
||||
A project import `@app:a` that resolves to `src/a/source.pbs` is one document link on that module-reference span. `@sdk:log` is not, because the stdlib file is virtual.
|
||||
|
||||
```pbs
|
||||
fn helper() -> int { return 1; }
|
||||
fn main() -> int { return helper; }
|
||||
```
|
||||
|
||||
The use of `helper` without a call is an identifier in the lexical pass. Hover resolves it as a function, so the overlay key is `pbs-function`. A local such as `value` has no existing key, so it stays `pbs-identifier`.
|
||||
|
||||
```pbs
|
||||
fn helper() -> int { return 1; }
|
||||
fn main() -> int { return helper(); }
|
||||
```
|
||||
|
||||
Prepare on `main` returns that function. Outgoing calls include `helper`. Incoming calls of `helper` include `main`. A cursor on a struct name returns no item.
|
||||
|
||||
## Common Pitfalls
|
||||
|
||||
- Do not copy the diagnostic code into `source`. The editor then shows the code twice and loses the language id.
|
||||
- Do not build document links to `/virtual/stdlib`. Definition already refuses that destination.
|
||||
- Do not treat document symbols as folding ranges. Outline and folding are different payloads.
|
||||
- Do not pretty-print from the AST. Comments and `Doc` text-block interiors are not fully modeled as trivia on the tree.
|
||||
- Do not add `pbs-local`, `pbs-parameter`, or `pbs-field` in the overlay. Those symbols stay on the baseline token until a later decision adds the key.
|
||||
- Do not implement call hierarchy by inverting the references index. A reference is a use of a name, not a call.
|
||||
- Do not start a snapshot cache because a later feature feels slow. This wave deliberately kept request-local analysis.
|
||||
|
||||
## References
|
||||
|
||||
- `DEC-0058` and `PLN-0137`, removed by housekeeping after this lesson
|
||||
- `docs/specs/compiler/23. Compiler Pipeline Entry Points Specification.md` §8.3
|
||||
- Earlier surface: `LSN-0068`, `LSN-0069`, `LSN-0070`, `LSN-0071`, `LSN-0072`, `LSN-0073`
|
||||
- Abandoned agendas: `AGD-0048` through `AGD-0056`
|
||||
+103
@@ -0,0 +1,103 @@
|
||||
---
|
||||
id: LSN-0075
|
||||
ticket: studio-core-javafx-decoupling
|
||||
title: Studio Services Must Outlive the Current UI
|
||||
created: 2026-09-25
|
||||
tags: [studio, architecture, spring, spring-modulith, javafx, adapters]
|
||||
---
|
||||
|
||||
## Context
|
||||
|
||||
Prometeu Studio began as a desktop application in which JavaFX controls, application workflows, provider integrations, background execution, and lifecycle management shared one Gradle module. A static `p.studio.Container` made these dependencies easy to reach, but it also made the visual adapter the practical center of the product. That shape could not support another consumer, such as a future agent adapter, without either driving the UI or duplicating Studio behavior.
|
||||
|
||||
The migration needed to preserve the existing Java product and its behavior while making JavaFX replaceable. It also needed to preserve the autonomy of compiler, LSP, runtime, and especially `p.packer`; separating Studio did not authorize absorbing those domains.
|
||||
|
||||
## Key Decisions
|
||||
|
||||
### Human and non-visual adapters consume the same Studio services
|
||||
|
||||
**What:** The Studio is physically divided into `prometeu-studio-api`, `prometeu-studio-core`, `prometeu-studio-ui-javafx`, and `prometeu-app`. JavaFX depends on the neutral API, Core implements application use cases, and the application module composes concrete adapters.
|
||||
|
||||
**Why:** The stable boundary is UI versus application services, not JavaFX versus a future web framework. A future agent can depend on the same API without moving application rules out of Core.
|
||||
|
||||
**Trade-offs:** More constructor parameters and explicit contracts are required. That cost is intentional: dependencies are visible, testable, and constrained by Gradle instead of hidden behind a global container.
|
||||
|
||||
### Spring is a composition mechanism, not a domain dependency
|
||||
|
||||
**What:** Spring Boot runs in non-web mode only in `prometeu-app`. Core objects remain constructor-injected POJOs. Spring Modulith verifies the six functional Core modules: project, session, assets, shipper, runtime, and execution.
|
||||
|
||||
**Why:** Spring provides deterministic construction and lifecycle without contaminating the public API or Core. Modulith supplies executable documentation and dependency checks while Gradle remains the physical classpath boundary.
|
||||
|
||||
**Trade-offs:** The application configuration is deliberately explicit. Broad component scanning and turning JavaFX controls into Spring singletons would recreate hidden ownership and lifecycle problems.
|
||||
|
||||
### Provider boundaries follow stability, not uniformity
|
||||
|
||||
**What:** Core uses a provider's public API directly when it is stable and neutral. It owns a narrow port when the available integration is static, concrete, lifecycle-oriented, or otherwise unsuitable for Core. Packer's stable API is consumed directly; compiler static access, LSP lifecycle, and runtime process integration are isolated behind consumer-owned gateways implemented in `prometeu-app`.
|
||||
|
||||
**Why:** Wrapping every dependency creates redundant abstractions, while importing concrete implementations leaks infrastructure into Core. The useful boundary depends on the provider contract.
|
||||
|
||||
**Trade-offs:** The integration matrix must be reviewed case by case. There is no universal rule that every provider receives a gateway.
|
||||
|
||||
### Long-running work is a neutral application contract
|
||||
|
||||
**What:** Build, pack, and execution expose `OperationHandle<R>` with identity, snapshots, completion, cancellation, updates, and typed results. The application owns the executor implementation; JavaFX only projects operation state and switches to the FX thread.
|
||||
|
||||
**Why:** Background work must be equally consumable by JavaFX and future adapters. An executor or JavaFX `Task` is an implementation detail, not an application contract.
|
||||
|
||||
**Trade-offs:** Cancellation races and terminal state transitions require explicit tests. In particular, stopping execution must cancel the outer execution handle before its nested preparation handle can complete it successfully.
|
||||
|
||||
## Patterns and Algorithms
|
||||
|
||||
The dependency pattern is:
|
||||
|
||||
```text
|
||||
JavaFX adapter ---> Studio API <--- future adapters
|
||||
^
|
||||
|
|
||||
Studio Core
|
||||
^
|
||||
|
|
||||
Spring non-web composition
|
||||
```
|
||||
|
||||
External providers remain outside the Core module graph. Stable public provider APIs may be direct Core dependencies; concrete adapters remain in the application module.
|
||||
|
||||
Operational failures that a caller can recover from are returned as typed results or diagnostics. For example, metadata writes convert I/O failures into `AssetMetadataWriteResult`. JavaFX renders that result and does not treat an unexpected exception message or stack trace as a functional contract.
|
||||
|
||||
The removal sequence for a service locator is also reusable:
|
||||
|
||||
1. establish architecture tests and final modules;
|
||||
2. introduce neutral contracts and explicit factories;
|
||||
3. move behavior slice by slice into constructor-injected services;
|
||||
4. reduce static call sites to zero;
|
||||
5. delete the static container and manual composition together;
|
||||
6. remove the mixed legacy module;
|
||||
7. run the full build, packaging, desktop smoke, and shutdown gate as one indivisible acceptance step.
|
||||
|
||||
## Pitfalls
|
||||
|
||||
- Renaming packages without changing Gradle dependencies does not create a replaceable frontend.
|
||||
- Replacing `Container` with `ApplicationContext.getBean()` throughout the code is still a service locator. Context lookup belongs only at the explicit application bootstrap boundary.
|
||||
- Registering every control or dialog as a Spring singleton gives Spring ownership of visual lifecycle and makes multiple windows or future adapters harder.
|
||||
- A gateway that merely mirrors a stable provider API adds indirection without protection. Conversely, direct use of static or concrete provider entry points leaks infrastructure into Core.
|
||||
- Moving Packer behavior into `p.studio.core.assets` would reverse domain ownership. Studio coordinates Packer; `p.packer` remains independently consumable.
|
||||
- Returning raw exception messages to JavaFX turns implementation accidents into an unstable user-facing protocol. Expected failures need neutral results or diagnostics.
|
||||
- Marking the migration complete after compilation alone misses packaging, restoration, real JavaFX interaction, cancellation, and shutdown leaks.
|
||||
|
||||
## Takeaways
|
||||
|
||||
- The durable product boundary is the Studio service surface, not the current frontend technology.
|
||||
- Spring belongs in composition; Spring Modulith belongs in verification and documentation; neither belongs in the neutral API.
|
||||
- Gradle modules enforce physical isolation, while functional Core modules express ownership and allowed dependencies.
|
||||
- JavaFX is an equivalent adapter, not the owner of project, asset, build, runtime, or execution rules.
|
||||
- `Container` removal is a completion criterion, not an optional cleanup step.
|
||||
- A future agent module can now be added as another API consumer without revisiting this migration or coupling AI concerns to JavaFX.
|
||||
|
||||
## References
|
||||
|
||||
- Decision: `DEC-0059` — Separate Studio Core from JavaFX with Spring Boot non-web and Spring Modulith.
|
||||
- Plan: `PLN-0138` — Complete Studio Core and JavaFX Boundary Migration.
|
||||
- Studio architecture: `docs/specs/studio/9. Studio Core and Adapter Architecture Specification.md`.
|
||||
- Studio specifications: `docs/specs/studio/README.md`.
|
||||
- Packer boundary: `docs/specs/packer/1. Domain and Artifact Boundary Specification.md`.
|
||||
- Packer integration: `docs/specs/packer/5. Diagnostics, Operations, and Studio Integration Specification.md`.
|
||||
@@ -1,62 +0,0 @@
|
||||
---
|
||||
id: AGD-0047
|
||||
ticket: pbs-lsp-code-actions
|
||||
title: PBS LSP Code Actions and Quick Fixes
|
||||
status: open
|
||||
created: 2026-07-15
|
||||
resolved:
|
||||
decision:
|
||||
tags: [studio, lsp, vscode, compiler-pbs, editor, code-actions, quick-fix]
|
||||
---
|
||||
|
||||
## Pain
|
||||
|
||||
Domain owner: `studio/lsp`
|
||||
|
||||
PBS diagnostics are visible, but users do not get actionable quick fixes for common compiler/editor problems, making simple repairs slower than necessary.
|
||||
|
||||
## Context
|
||||
|
||||
The LSP maps diagnostics but does not announce codeActionProvider. Compiler diagnostics already carry codes and ranges, but not every diagnostic has enough structured repair data to generate safe edits.
|
||||
|
||||
## Open Questions
|
||||
|
||||
- [ ] Which diagnostics should receive quick fixes first?
|
||||
- [ ] Should code actions be produced from diagnostic codes only, or from structured compiler repair hints?
|
||||
- [ ] How should imports, reserved attributes, missing methods, and invalid Doc shapes be prioritized?
|
||||
|
||||
## Options
|
||||
|
||||
### Option A - Diagnostic-code quick fixes
|
||||
|
||||
- **Approach:** Map known diagnostic codes to simple edits in the LSP layer.
|
||||
- **Pro:** Fast for a small set of obvious repairs.
|
||||
- **Con:** Couples fixes to diagnostic text/ranges and can become brittle.
|
||||
- **Maintainability:** Moderate if limited to trivial edits.
|
||||
|
||||
### Option B - Compiler repair hints
|
||||
|
||||
- **Approach:** Extend diagnostics with structured repair metadata and let the LSP map hints to code actions.
|
||||
- **Pro:** Keeps product logic close to compiler knowledge.
|
||||
- **Con:** Requires a new diagnostic/repair contract.
|
||||
- **Maintainability:** Strong for non-trivial fixes and future frontends.
|
||||
|
||||
## Tradeoffs
|
||||
|
||||
Quick fixes are only useful if safe. Simple code-based fixes can ship first, but imports and generated stubs need stronger compiler context.
|
||||
|
||||
## Recommendation
|
||||
|
||||
Prefer Option B as the target design, with Option A allowed only for a small bootstrap set of unambiguous repairs.
|
||||
|
||||
## Discussion
|
||||
|
||||
This should follow diagnostics UX and import assistance for the first high-value fixes.
|
||||
|
||||
## Resolution
|
||||
|
||||
Ainda em aberto.
|
||||
|
||||
## Next Step
|
||||
|
||||
Pick the first three diagnostic codes eligible for safe quick fixes.
|
||||
@@ -1,62 +0,0 @@
|
||||
---
|
||||
id: AGD-0048
|
||||
ticket: pbs-lsp-formatting
|
||||
title: PBS LSP Formatting
|
||||
status: open
|
||||
created: 2026-07-15
|
||||
resolved:
|
||||
decision:
|
||||
tags: [studio, lsp, vscode, compiler-pbs, editor, formatting]
|
||||
---
|
||||
|
||||
## Pain
|
||||
|
||||
Domain owner: `studio/lsp`
|
||||
|
||||
PBS formatting is not automated, so style drifts across files, especially around attributes, services, blocks, imports, and multi-line Doc text blocks.
|
||||
|
||||
## Context
|
||||
|
||||
The LSP does not announce documentFormattingProvider. PBS has a parser and AST, but formatting must preserve documentation text block content while normalizing surrounding syntax and indentation.
|
||||
|
||||
## Open Questions
|
||||
|
||||
- [ ] Should formatting be AST-based, token-based, or hybrid to preserve comments and text blocks?
|
||||
- [ ] What canonical style should PBS use for attributes, braces, imports, params, and text blocks?
|
||||
- [ ] Should the first wave support full document formatting only, or also range/on-type formatting?
|
||||
|
||||
## Options
|
||||
|
||||
### Option A - Token-preserving formatter
|
||||
|
||||
- **Approach:** Format from tokens and trivia, preserving comments and documentation text block contents.
|
||||
- **Pro:** Safer for active editing and text blocks.
|
||||
- **Con:** Harder to enforce deep structural layout.
|
||||
- **Maintainability:** Good if PBS formatting remains mostly syntactic.
|
||||
|
||||
### Option B - AST pretty-printer
|
||||
|
||||
- **Approach:** Reprint code from the AST using canonical style rules.
|
||||
- **Pro:** Produces consistent output.
|
||||
- **Con:** Risks losing comments/trivia and cannot handle malformed files well.
|
||||
- **Maintainability:** Strong only after AST/trivia ownership is explicit.
|
||||
|
||||
## Tradeoffs
|
||||
|
||||
Formatting must not damage `Doc` text blocks. That makes trivia preservation a first-class requirement rather than an implementation detail.
|
||||
|
||||
## Recommendation
|
||||
|
||||
Prefer Option A or a hybrid token/AST formatter. Avoid a pure AST pretty-printer until comments/trivia are modeled.
|
||||
|
||||
## Discussion
|
||||
|
||||
Formatter decision should define canonical style before implementation.
|
||||
|
||||
## Resolution
|
||||
|
||||
Ainda em aberto.
|
||||
|
||||
## Next Step
|
||||
|
||||
Decide PBS canonical formatting rules for attributes, braces, imports, params, and text blocks.
|
||||
@@ -1,62 +0,0 @@
|
||||
---
|
||||
id: AGD-0049
|
||||
ticket: pbs-lsp-import-assistance
|
||||
title: PBS LSP Import Assistance
|
||||
status: open
|
||||
created: 2026-07-15
|
||||
resolved:
|
||||
decision:
|
||||
tags: [studio, lsp, vscode, compiler-pbs, editor, imports, completion]
|
||||
---
|
||||
|
||||
## Pain
|
||||
|
||||
Domain owner: `studio/lsp`
|
||||
|
||||
PBS users do not get import-aware assistance, so discovering exported symbols and adding the right import from barrels, stdlib, or project modules remains manual.
|
||||
|
||||
## Context
|
||||
|
||||
Completion already exists for local/editorial contexts, and stdlib imports are understood by the compiler pipeline. The LSP does not yet provide auto-import completion, organize imports, or import quick fixes.
|
||||
|
||||
## Open Questions
|
||||
|
||||
- [ ] Should auto-import target project modules, stdlib modules, or both in the first wave?
|
||||
- [ ] How should barrels and explicit module imports be ranked and rendered in completion?
|
||||
- [ ] Should organize imports be a code action, source action, formatter responsibility, or separate feature?
|
||||
|
||||
## Options
|
||||
|
||||
### Option A - Import completion only
|
||||
|
||||
- **Approach:** Suggest symbols from known modules and include import detail, but do not edit imports automatically.
|
||||
- **Pro:** Low risk and improves discovery.
|
||||
- **Con:** Still leaves manual import edits.
|
||||
- **Maintainability:** Good as a stepping stone.
|
||||
|
||||
### Option B - Auto-import and organize imports
|
||||
|
||||
- **Approach:** Completion/code actions insert missing imports and source actions sort/remove unused imports.
|
||||
- **Pro:** Matches modern editor expectations.
|
||||
- **Con:** Requires robust module export indexing and edit placement rules.
|
||||
- **Maintainability:** Strong if built on a proper import graph.
|
||||
|
||||
## Tradeoffs
|
||||
|
||||
Auto-import depends on knowing canonical exports and choosing an edit location. Doing that ad hoc in completion would create formatting and duplicate import issues.
|
||||
|
||||
## Recommendation
|
||||
|
||||
Prefer Option B as the target, but start with import-aware suggestions plus a limited missing-import quick fix.
|
||||
|
||||
## Discussion
|
||||
|
||||
This should be coordinated with code actions and formatter.
|
||||
|
||||
## Resolution
|
||||
|
||||
Ainda em aberto.
|
||||
|
||||
## Next Step
|
||||
|
||||
Decide first-wave import sources: stdlib only, project modules only, or both.
|
||||
@@ -1,62 +0,0 @@
|
||||
---
|
||||
id: AGD-0050
|
||||
ticket: pbs-lsp-semantic-tokens-semantic-classification
|
||||
title: PBS LSP Semantic Token Classification
|
||||
status: open
|
||||
created: 2026-07-15
|
||||
resolved:
|
||||
decision:
|
||||
tags: [studio, lsp, vscode, compiler-pbs, editor, semantic-tokens]
|
||||
---
|
||||
|
||||
## Pain
|
||||
|
||||
Domain owner: `studio/lsp`
|
||||
|
||||
PBS semantic highlighting exists, but parts of the token classification can remain lexical or superficial, which limits visual accuracy for same-looking identifiers with different semantic roles.
|
||||
|
||||
## Context
|
||||
|
||||
The current LSP announces full semantic tokens and maps frontend semantic presentation to VS Code. The compiler has semantic read surfaces that can classify symbols more accurately than raw tokenization.
|
||||
|
||||
## Open Questions
|
||||
|
||||
- [ ] Which token categories must become semantic identity-based first?
|
||||
- [ ] Should semantic tokens be produced from compiler semantic surfaces, parser AST, lexer tokens, or layered output?
|
||||
- [ ] How should tokens behave in files with syntax or semantic errors during active editing?
|
||||
|
||||
## Options
|
||||
|
||||
### Option A - Lexical tokens with semantic overlays
|
||||
|
||||
- **Approach:** Keep lexer-based tokenization as baseline and overlay semantic categories where resolution succeeds.
|
||||
- **Pro:** Stable during broken edits and incremental to improve.
|
||||
- **Con:** Some unresolved identifiers remain visually generic.
|
||||
- **Maintainability:** Strong because fallback behavior is explicit.
|
||||
|
||||
### Option B - Fully semantic token stream
|
||||
|
||||
- **Approach:** Generate all semantic tokens from compiler semantic surfaces.
|
||||
- **Pro:** Maximum accuracy when analysis succeeds.
|
||||
- **Con:** Highlighting may disappear or degrade sharply on incomplete code.
|
||||
- **Maintainability:** Risky unless snapshot/error recovery is excellent.
|
||||
|
||||
## Tradeoffs
|
||||
|
||||
Highlighting must be resilient while the user is typing. A perfect semantic pass that fails on partial code is worse than a layered model.
|
||||
|
||||
## Recommendation
|
||||
|
||||
Prefer Option A: lexical baseline plus semantic overlays from resolved symbols.
|
||||
|
||||
## Discussion
|
||||
|
||||
This can proceed independently but benefits from LSP snapshot/cache work.
|
||||
|
||||
## Resolution
|
||||
|
||||
Ainda em aberto.
|
||||
|
||||
## Next Step
|
||||
|
||||
Choose semantic overlay categories for the first pass.
|
||||
@@ -1,62 +0,0 @@
|
||||
---
|
||||
id: AGD-0051
|
||||
ticket: pbs-lsp-performance-cache-and-snapshots
|
||||
title: PBS LSP Performance Cache and Snapshots
|
||||
status: open
|
||||
created: 2026-07-15
|
||||
resolved:
|
||||
decision:
|
||||
tags: [studio, lsp, vscode, compiler-pbs, editor, performance, caching]
|
||||
---
|
||||
|
||||
## Pain
|
||||
|
||||
Domain owner: `studio/lsp`
|
||||
|
||||
Several PBS LSP requests rebuild or reanalyze substantial project state, which can become slow or jittery as projects grow and as richer features are added.
|
||||
|
||||
## Context
|
||||
|
||||
The current bridge favors correctness and simplicity by invoking compiler pipeline analysis for diagnostics and editorial documents. A complete LSP needs snapshot caching, invalidation, cancellation, and predictable latency.
|
||||
|
||||
## Open Questions
|
||||
|
||||
- [ ] What is the canonical project/document snapshot boundary for LSP requests?
|
||||
- [ ] Which requests can reuse semantic read surfaces safely across document changes?
|
||||
- [ ] How should cancellation, stale responses, and background reanalysis be handled?
|
||||
|
||||
## Options
|
||||
|
||||
### Option A - Request-local analysis
|
||||
|
||||
- **Approach:** Keep each LSP request self-contained and rebuild analysis as needed.
|
||||
- **Pro:** Simple, deterministic, and less stateful.
|
||||
- **Con:** Latency grows with project size and feature richness.
|
||||
- **Maintainability:** Good for correctness, weak for interactive performance.
|
||||
|
||||
### Option B - Project snapshot cache
|
||||
|
||||
- **Approach:** Maintain per-project analysis snapshots with document overlays, invalidation, and cancellation-aware request handling.
|
||||
- **Pro:** Required for responsive definition, references, rename, and semantic tokens.
|
||||
- **Con:** Introduces lifecycle complexity and stale-result risks.
|
||||
- **Maintainability:** Strong if snapshot ownership and invalidation are explicit.
|
||||
|
||||
## Tradeoffs
|
||||
|
||||
A complete LSP needs shared state, but shared state must not leak stale analysis into edits. The decision is about the boundary, not just caching.
|
||||
|
||||
## Recommendation
|
||||
|
||||
Prefer Option B before implementing workspace-wide features like references and rename.
|
||||
|
||||
## Discussion
|
||||
|
||||
Define snapshot lifecycle, invalidation triggers, and cancellation policy.
|
||||
|
||||
## Resolution
|
||||
|
||||
Ainda em aberto.
|
||||
|
||||
## Next Step
|
||||
|
||||
Decide whether snapshot caching is a prerequisite for references/rename or can be staged later.
|
||||
@@ -1,62 +0,0 @@
|
||||
---
|
||||
id: AGD-0052
|
||||
ticket: pbs-lsp-completion-depth
|
||||
title: PBS LSP Completion Depth
|
||||
status: open
|
||||
created: 2026-07-15
|
||||
resolved:
|
||||
decision:
|
||||
tags: [studio, lsp, vscode, compiler-pbs, editor, completion]
|
||||
---
|
||||
|
||||
## Pain
|
||||
|
||||
Domain owner: `studio/lsp`
|
||||
|
||||
PBS completion works for core cases, but a complete daily-use experience needs ranking, resolve details, snippets, overload handling, context-aware suggestions, and richer documentation.
|
||||
|
||||
## Context
|
||||
|
||||
The current LSP announces completion with trigger character '.' and returns detail/documentation for resolved compiler candidates. It does not use resolveProvider, snippets, broad trigger contexts, or advanced ranking.
|
||||
|
||||
## Open Questions
|
||||
|
||||
- [ ] Which completion contexts should be supported first beyond member access?
|
||||
- [ ] Should completion use resolveProvider for expensive documentation/details or return everything eagerly?
|
||||
- [ ] How should overloads, snippets, imports, keywords, and stdlib candidates be ranked?
|
||||
|
||||
## Options
|
||||
|
||||
### Option A - Eager rich completion
|
||||
|
||||
- **Approach:** Return labels, details, docs, and snippets directly in every completion response.
|
||||
- **Pro:** Simple client behavior and immediate docs.
|
||||
- **Con:** Can become expensive for broad/global completion.
|
||||
- **Maintainability:** Good while candidate sets remain small.
|
||||
|
||||
### Option B - Completion resolve provider
|
||||
|
||||
- **Approach:** Return lightweight candidates first and populate expensive docs/details through `completionItem/resolve`.
|
||||
- **Pro:** Scales better for large candidate sets and import-aware suggestions.
|
||||
- **Con:** Requires client/server resolve plumbing and stable candidate identities.
|
||||
- **Maintainability:** Strong for a full LSP.
|
||||
|
||||
## Tradeoffs
|
||||
|
||||
The current eager model is fine for scoped completions, but global/import-aware completion may need resolve to avoid latency.
|
||||
|
||||
## Recommendation
|
||||
|
||||
Prefer a staged approach: keep eager for current contexts, design resolve before broad workspace/import completion.
|
||||
|
||||
## Discussion
|
||||
|
||||
Define completion contexts and ranking before adding snippets or resolve.
|
||||
|
||||
## Resolution
|
||||
|
||||
Ainda em aberto.
|
||||
|
||||
## Next Step
|
||||
|
||||
List first-wave completion contexts beyond member access.
|
||||
@@ -1,62 +0,0 @@
|
||||
---
|
||||
id: AGD-0053
|
||||
ticket: pbs-lsp-folding-and-selection-ranges
|
||||
title: PBS LSP Folding and Selection Ranges
|
||||
status: open
|
||||
created: 2026-07-15
|
||||
resolved:
|
||||
decision:
|
||||
tags: [studio, lsp, vscode, compiler-pbs, editor, folding, selection-range]
|
||||
---
|
||||
|
||||
## Pain
|
||||
|
||||
Domain owner: `studio/lsp`
|
||||
|
||||
PBS users do not get structural folding or smart selection ranges, so navigating and selecting nested functions, blocks, services, attributes, and Doc text blocks is more manual than it should be.
|
||||
|
||||
## Context
|
||||
|
||||
The parser knows syntactic spans for declarations and blocks. The LSP currently does not announce foldingRangeProvider or selectionRangeProvider.
|
||||
|
||||
## Open Questions
|
||||
|
||||
- [ ] Should folding ranges be computed from AST spans, token pairs, or a hybrid that handles malformed files?
|
||||
- [ ] Which constructs should fold in the first wave: imports, declarations, blocks, attributes, text blocks, or all of them?
|
||||
- [ ] What selection range hierarchy should VS Code expose for identifiers, calls, params, blocks, and declarations?
|
||||
|
||||
## Options
|
||||
|
||||
### Option A - Parser span ranges
|
||||
|
||||
- **Approach:** Use AST spans for declarations, blocks, parameter lists, and text blocks.
|
||||
- **Pro:** Accurate for well-formed code and easy to map to LSP ranges.
|
||||
- **Con:** Can degrade when parsing fails mid-file.
|
||||
- **Maintainability:** Good because parser owns structure.
|
||||
|
||||
### Option B - Token pair scanning
|
||||
|
||||
- **Approach:** Compute ranges from brace/paren/text-block tokens without relying on full AST validity.
|
||||
- **Pro:** More resilient during malformed edits.
|
||||
- **Con:** Less semantically meaningful and can produce noisy ranges.
|
||||
- **Maintainability:** Good only as fallback.
|
||||
|
||||
## Tradeoffs
|
||||
|
||||
Folding and selection should keep working while typing. AST ranges are higher quality, but token fallback may be needed for broken files.
|
||||
|
||||
## Recommendation
|
||||
|
||||
Prefer a hybrid: AST ranges first, token fallback for unmatched/incomplete constructs.
|
||||
|
||||
## Discussion
|
||||
|
||||
This is an editor UX feature with low semantic dependency and can be planned independently.
|
||||
|
||||
## Resolution
|
||||
|
||||
Ainda em aberto.
|
||||
|
||||
## Next Step
|
||||
|
||||
Decide first-wave foldable constructs and selection hierarchy.
|
||||
@@ -1,62 +0,0 @@
|
||||
---
|
||||
id: AGD-0054
|
||||
ticket: pbs-lsp-diagnostics-ux
|
||||
title: PBS LSP Diagnostics UX
|
||||
status: open
|
||||
created: 2026-07-15
|
||||
resolved:
|
||||
decision:
|
||||
tags: [studio, lsp, vscode, compiler-pbs, editor, diagnostics, ux]
|
||||
---
|
||||
|
||||
## Pain
|
||||
|
||||
Domain owner: `studio/lsp`
|
||||
|
||||
PBS diagnostics reach VS Code, but the editor experience can still be hard to act on when ranges, related information, severity, and phase context are too generic.
|
||||
|
||||
## Context
|
||||
|
||||
The LSP maps compiler diagnostics to LSP diagnostics. Compiler diagnostics include phase/code/message/range in several paths, but not all editor-friendly fields are consistently exposed.
|
||||
|
||||
## Open Questions
|
||||
|
||||
- [ ] Which diagnostics need better ranges or related information first?
|
||||
- [ ] Should diagnostic source include compiler phase, frontend, or both?
|
||||
- [ ] What structured diagnostic metadata is needed for future quick fixes without coupling UI to text messages?
|
||||
|
||||
## Options
|
||||
|
||||
### Option A - Mapper-only UX improvements
|
||||
|
||||
- **Approach:** Improve LSP diagnostic mapping using existing diagnostic fields.
|
||||
- **Pro:** Quick improvements to source, severity, and display consistency.
|
||||
- **Con:** Cannot add missing related spans or repair metadata that compiler diagnostics do not expose.
|
||||
- **Maintainability:** Good for presentation-only changes.
|
||||
|
||||
### Option B - Structured diagnostic contract
|
||||
|
||||
- **Approach:** Extend compiler diagnostics with editor-facing metadata such as phase, related locations, stable quick-fix hints, and refined ranges.
|
||||
- **Pro:** Enables better diagnostics and future code actions without parsing message text.
|
||||
- **Con:** Requires compiler/core diagnostic API changes.
|
||||
- **Maintainability:** Strong as the foundation for quick fixes and richer UX.
|
||||
|
||||
## Tradeoffs
|
||||
|
||||
Some improvements belong in the LSP mapper, but the most valuable changes require structured information at diagnostic creation time.
|
||||
|
||||
## Recommendation
|
||||
|
||||
Prefer Option B as the target, with mapper-only cleanup allowed for low-risk display fixes.
|
||||
|
||||
## Discussion
|
||||
|
||||
This agenda should inform code actions before quick fixes become broad.
|
||||
|
||||
## Resolution
|
||||
|
||||
Ainda em aberto.
|
||||
|
||||
## Next Step
|
||||
|
||||
Inventory high-frequency diagnostics and identify which need better ranges, related information, or repair hints.
|
||||
@@ -1,62 +0,0 @@
|
||||
---
|
||||
id: AGD-0055
|
||||
ticket: pbs-lsp-document-links
|
||||
title: PBS LSP Document Links
|
||||
status: open
|
||||
created: 2026-07-15
|
||||
resolved:
|
||||
decision:
|
||||
tags: [studio, lsp, vscode, compiler-pbs, editor, document-links, imports]
|
||||
---
|
||||
|
||||
## Pain
|
||||
|
||||
Domain owner: `studio/lsp`
|
||||
|
||||
PBS import/module references and asset-like surfaces are plain text in VS Code, so users cannot click through to imported modules or related project resources.
|
||||
|
||||
## Context
|
||||
|
||||
The compiler understands module references and project files. The LSP does not announce documentLinkProvider, and the VS Code extension delegates all language behavior to the server.
|
||||
|
||||
## Open Questions
|
||||
|
||||
- [ ] Which references should become document links first: imports, barrels, stdlib modules, assets/addressables, or docs?
|
||||
- [ ] How should virtual or stdlib resources be represented as link targets?
|
||||
- [ ] Should document links overlap with go-to-definition or remain a separate lightweight navigation feature?
|
||||
|
||||
## Options
|
||||
|
||||
### Option A - Import/module links only
|
||||
|
||||
- **Approach:** Expose `documentLink` for module references such as `@sdk:gfx` and barrel paths.
|
||||
- **Pro:** Narrow, useful, and mostly aligned with existing module resolution.
|
||||
- **Con:** Does not cover assets/addressables or documentation links.
|
||||
- **Maintainability:** Strong first wave.
|
||||
|
||||
### Option B - General resource links
|
||||
|
||||
- **Approach:** Link imports, stdlib modules, assets, addressables, and possibly documentation/resource surfaces.
|
||||
- **Pro:** Richer navigation across project resources.
|
||||
- **Con:** Requires resource-specific target policy and may overlap with definition.
|
||||
- **Maintainability:** Good only after resource ownership is defined.
|
||||
|
||||
## Tradeoffs
|
||||
|
||||
Document links should remain lightweight. If a link requires semantic identity and symbol resolution, it may belong in go-to-definition instead.
|
||||
|
||||
## Recommendation
|
||||
|
||||
Prefer Option A first: imports and module references only.
|
||||
|
||||
## Discussion
|
||||
|
||||
Coordinate stdlib target handling with go-to-definition.
|
||||
|
||||
## Resolution
|
||||
|
||||
Ainda em aberto.
|
||||
|
||||
## Next Step
|
||||
|
||||
Decide first-wave link targets and how stdlib/module URIs are represented.
|
||||
@@ -1,62 +0,0 @@
|
||||
---
|
||||
id: AGD-0056
|
||||
ticket: pbs-lsp-call-and-type-hierarchy
|
||||
title: PBS LSP Call and Type Hierarchy
|
||||
status: open
|
||||
created: 2026-07-15
|
||||
resolved:
|
||||
decision:
|
||||
tags: [studio, lsp, vscode, compiler-pbs, editor, call-hierarchy, type-hierarchy]
|
||||
---
|
||||
|
||||
## Pain
|
||||
|
||||
Domain owner: `studio/lsp`
|
||||
|
||||
PBS users cannot inspect call relationships or type/member relationships from the editor, which limits understanding of larger projects after basic navigation exists.
|
||||
|
||||
## Context
|
||||
|
||||
Call hierarchy and type hierarchy are advanced LSP features. They depend on reliable semantic identity, references, callsite classification, and type ownership surfaces, so they should probably follow definition/references rather than precede them.
|
||||
|
||||
## Open Questions
|
||||
|
||||
- [ ] Should call hierarchy and type hierarchy be one discussion or split after dependencies are clearer?
|
||||
- [ ] Which relationships are valuable for PBS: function call graph, service method calls, struct methods, contract implementations, host/intrinsic calls, or all of them?
|
||||
- [ ] What prerequisite symbol/reference infrastructure must be completed before this feature is safe to implement?
|
||||
|
||||
## Options
|
||||
|
||||
### Option A - Call hierarchy only
|
||||
|
||||
- **Approach:** Implement incoming/outgoing calls for functions and methods after callsite references are stable.
|
||||
- **Pro:** Directly useful and builds on executable call resolution.
|
||||
- **Con:** Does not cover type ownership, contracts, or implementations.
|
||||
- **Maintainability:** Strong if based on the reference/callsite index.
|
||||
|
||||
### Option B - Split call hierarchy and type hierarchy
|
||||
|
||||
- **Approach:** Treat call graph and type/member/contract hierarchy as separate decisions and implementations.
|
||||
- **Pro:** Avoids mixing two different semantic models.
|
||||
- **Con:** Creates more workflow artifacts and sequencing work.
|
||||
- **Maintainability:** Strong; each feature can evolve on its own contract.
|
||||
|
||||
## Tradeoffs
|
||||
|
||||
Call hierarchy and type hierarchy share LSP vocabulary but not the same compiler data. Coupling them too early would make the first implementation harder to reason about.
|
||||
|
||||
## Recommendation
|
||||
|
||||
Prefer Option B: split after this agenda confirms dependencies, likely implementing call hierarchy first.
|
||||
|
||||
## Discussion
|
||||
|
||||
This should wait until definition and references are complete.
|
||||
|
||||
## Resolution
|
||||
|
||||
Ainda em aberto.
|
||||
|
||||
## Next Step
|
||||
|
||||
Decide whether to split into two discussions before moving to decisions.
|
||||
@@ -282,8 +282,26 @@ When a frontend exposes workspace symbols, the result MUST be a flat search of n
|
||||
|
||||
When a frontend exposes rename, the result MUST be a validated workspace edit of identifier spans whose locations identify compiler-known physical source files. Identity MUST be the physical declaration locations that definition returns at the cursor. A local or parameter name span MUST still be renameable when definition at that offset is empty. Each rewritten location MUST identify a compiler-known physical source file. A cursor that is not renameable, including builtins, virtual paths, unresolved names, keywords, comments, strings, import aliases and uses of those aliases, error case labels without their own span, and barrel files, MUST produce a protocol error or a null prepareRename result. Tooling MUST NOT return a successful empty workspace edit for a refused cursor or an invalid new name. The new name MUST be a language identifier that is not a keyword and MUST NOT collide in the same binding space, ignoring the sites being rewritten and the overload set being renamed. The server MUST NOT write files and MUST NOT rename file paths. Host prepareRename MUST advertise a prepareProvider when rename is exposed. Tooling MUST NOT require virtual documents, untitled buffers, or synthetic URIs for this capability.
|
||||
|
||||
When a frontend exposes code actions, the result MUST be quick fixes only: one workspace edit tied to a diagnostic of the requested physical document. The frontend MUST produce each repair from that document's syntax. Each repair MUST name the stable diagnostic code, the primary span, and exactly one local text edit. Tooling MUST transport that repair. Tooling MUST NOT choose the edit by parsing the diagnostic message or by a diagnostic-code table. A repair MUST NOT be a required field of compiler diagnostics and MUST NOT be published inside diagnostic data. The published diagnostic MUST carry the stable code so a later code-action request can match it. A repair MUST be returned only when the request context contains a diagnostic with the same code and the same primary range. An empty diagnostic context MUST produce an empty list. The edit MUST change only the requested physical source file. The server MUST NOT write files, MUST NOT return a command, and MUST NOT require a resolve round trip. A missing code-action capability MUST NOT advertise code actions and MUST produce an empty list rather than a protocol error. Virtual, untitled, or synthetic documents MUST NOT receive an edit. Code actions MUST NOT include organize-imports, source actions, refactors, or generated stubs unless a future accepted decision says so.
|
||||
|
||||
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.
|
||||
|
||||
When a frontend exposes document links, each link MUST cover the span of a module reference whose resolved destination is a compiler-known regular file. A module reference that does not resolve to a regular file MUST produce no link. Tooling MUST NOT target virtual, untitled, or synthetic URIs, including virtual stdlib documents. Document links MUST NOT replace definition. A missing document-link capability MUST NOT be advertised and MUST produce an empty list rather than a protocol error.
|
||||
|
||||
When a frontend exposes folding ranges, the ranges MUST come from recovered syntax spans for top-level `fn`, `struct`, `service`, `contract`, `enum`, `error`, `callback`, and `host` declarations, their bodies, and `Doc` text blocks. A parameter list MUST fold from the parenthesis pair. A brace, parenthesis, or text-block delimiter that the recovered tree does not cover MUST still produce a token range, including an unmatched opener through the end of the text. Folding ranges MUST NOT be document symbols.
|
||||
|
||||
When a frontend exposes selection ranges, the chain at a cursor MUST run from the inside outward in this order: identifier, argument or parameter list, block or `Doc` text block, declaration. A layer that does not contain the cursor MUST be omitted. A missing folding or selection capability MUST NOT be advertised and MUST produce an empty list rather than a protocol error.
|
||||
|
||||
When a frontend exposes call hierarchy, incoming and outgoing calls MUST be callsites found by walking call expressions in the syntax tree. The references index MUST NOT be used as the call graph. A cursor that is not on a function, method, or constructor MUST produce an empty prepare result. Type hierarchy MUST NOT be advertised. A missing call-hierarchy capability MUST NOT be advertised and MUST produce an empty list rather than a protocol error.
|
||||
|
||||
When a frontend exposes completion inside a module reference, the candidates MUST be project and stdlib modules the current module resolver can already name. Completion outside a module reference MUST keep its existing member and general candidates. Completion items MUST stay eager. `resolveProvider` MUST stay false. Snippets and a new ranking score MUST NOT be added.
|
||||
|
||||
When a frontend exposes semantic tokens, the lexical token provider remains the baseline. An identifier token MAY be replaced with an existing semantic key when the same resolution used by hover names that symbol and an existing key matches it. Resolution failure, a broken file, or a symbol with no existing key MUST keep the baseline token. This overlay MUST NOT add a semantic-token key.
|
||||
|
||||
When a frontend exposes formatting, it MUST be full-document formatting only. Range formatting and on-type formatting MUST NOT be advertised. The formatter MUST reprint the existing token stream. It MUST NOT reorder declarations, join lines, or split lines. Indentation MUST be four spaces and MUST change only where brace or parenthesis nesting changes. The interior of a `Doc` text block MUST be copied unchanged. A comment MUST stay on the line of the token it already follows. A missing formatting capability MUST NOT be advertised and MUST produce an empty edit list rather than a protocol error.
|
||||
|
||||
`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.
|
||||
|
||||
@@ -25,6 +25,9 @@ Runtime-side reading semantics for `assets.pa` are defined upstream in `../runti
|
||||
5. A future shipper is a consumer of packer artifacts, not a co-author of the asset contract.
|
||||
6. Runtime reading semantics are not redefined by the packer.
|
||||
7. The packer must stop at artifact publication, not cartridge assembly.
|
||||
8. The packer's Java package root is `p.packer`; it must not be moved under `p.studio` or treated as a Studio subdomain.
|
||||
9. The packer must remain independently consumable by Studio, command-line tooling, build tooling, and future automation adapters.
|
||||
10. No Packer module may depend on `p.studio`, Studio UI, or Studio application modules.
|
||||
|
||||
## Packer-Owned Artifacts
|
||||
|
||||
@@ -57,6 +60,18 @@ Rules:
|
||||
- shipper-specific workflow detail is deferred;
|
||||
- published artifact names and meanings must remain documented and stable enough for later consumption.
|
||||
|
||||
## Studio Consumption Boundary
|
||||
|
||||
Studio is a consumer of Packer capabilities, not the owner of Packer semantics.
|
||||
|
||||
Rules:
|
||||
|
||||
- Studio should consume a stable, neutral, use-case-oriented public Packer API directly;
|
||||
- Studio must not add a gateway that merely mirrors an already suitable public Packer API;
|
||||
- when only concrete, static, infrastructure-oriented, unstable, or excessively broad integration is available, the Studio consumer may define a narrow consumer-owned gateway;
|
||||
- implementations of Studio-owned gateways must stay outside Packer and outside the Studio Core functional contract;
|
||||
- Studio projections and orchestration must not duplicate Packer validation, packing, diagnostic, concurrency, or artifact semantics.
|
||||
|
||||
## Non-Goals
|
||||
|
||||
- cartridge assembly flow
|
||||
|
||||
+16
-2
@@ -60,10 +60,24 @@ When the packer is embedded inside another host such as Studio, the host must bo
|
||||
|
||||
Rules:
|
||||
|
||||
- the embedded packer runtime must receive a typed event bus reference from the host when shared host visibility is part of the integration contract;
|
||||
- the embedded packer runtime must receive a typed event sink or adapter from the host when shared host visibility is part of the integration contract;
|
||||
- that reference is the baseline path for packer publish/subscribe integration in the embedded host;
|
||||
- the embedded packer runtime must not quietly create a disconnected parallel event system when host integration expects shared operational visibility;
|
||||
- in Studio, this shared typed event bus reference is owned by the Studio `Container`.
|
||||
- in Studio, bootstrap, shutdown, and event adaptation are owned by the `prometeu-app` composition root;
|
||||
- the embedded integration must not use `p.studio.Container`, Spring context lookup, or another static service locator.
|
||||
|
||||
### Studio Dependency Rule
|
||||
|
||||
The dependency direction is always Studio to Packer.
|
||||
|
||||
Rules:
|
||||
|
||||
- Studio Core may consume stable public contracts from `prometeu-packer-api` directly;
|
||||
- a Studio-owned gateway is required only when an integration is concrete, static, infrastructure-oriented, unstable, excessively broad, or leaks provider lifecycle details;
|
||||
- such a gateway must expose only the capabilities required by its consuming Studio module;
|
||||
- gateway implementations and Packer bootstrap belong in `prometeu-app` or another explicit infrastructure adapter;
|
||||
- the JavaFX adapter must consume neutral Studio API contracts and must not call Packer directly;
|
||||
- Packer must not depend on `p.studio` and must not publish Studio UI events as part of its domain contract.
|
||||
|
||||
Baseline core services:
|
||||
|
||||
|
||||
@@ -52,6 +52,10 @@ Specs should normally be fed by:
|
||||
|
||||
If a spec edit would require guessing an unresolved design choice, stop and surface the missing decision first.
|
||||
|
||||
## Integration Boundary
|
||||
|
||||
The Packer package root is `p.packer`, and Packer remains autonomous from Studio. Studio consumes stable public Packer APIs directly and introduces a narrow consumer-owned gateway only for concrete, static, unstable, or infrastructure-specific integration. Packer never depends on `p.studio`.
|
||||
|
||||
## Current Corpus
|
||||
|
||||
The current packer core corpus is:
|
||||
|
||||
@@ -57,11 +57,13 @@ The shell-level workspace host exists to mount independently authored workspaces
|
||||
Baseline workspace architecture rules are:
|
||||
|
||||
- each workspace should have a composition root that mounts the workspace into the shell;
|
||||
- the shell and workspace composition roots must receive neutral Studio API services through explicit constructor or factory injection;
|
||||
- a workspace composition root should coordinate workspace services, state orchestration, and structural sync, but it should not own every local render path directly;
|
||||
- project-session services that must survive workspace focus changes should be owned above individual workspace focus lifecycles and then consumed by workspace composition roots;
|
||||
- event-observing workspace controls must be lifecycle-managed;
|
||||
- workspace-local updates should flow through the Studio event system rather than ad hoc imperative redraw chains;
|
||||
- future workspaces should consume shared Studio workspace framework primitives where those primitives already cover the needed behavior.
|
||||
- shell and workspace code must not resolve application services through a static container or Spring application-context lookup.
|
||||
|
||||
The shell must not encourage a workspace model where every interaction falls back to whole-workspace refresh.
|
||||
|
||||
|
||||
@@ -73,13 +73,14 @@ Propagation rules:
|
||||
- propagation is workspace to global;
|
||||
- global-to-workspace rebroadcast is not baseline behavior.
|
||||
|
||||
The global Studio bus is backed by a typed event bus reference owned by the Studio application container.
|
||||
The global Studio bus is a JavaFX-adapter facility created by the application composition root and injected into the UI factory.
|
||||
|
||||
Container rules:
|
||||
Composition rules:
|
||||
|
||||
- the Studio `Container` owns the global typed event bus reference used by `StudioEventBus`;
|
||||
- host-integrated services that need shared Studio operational visibility should receive that container-owned typed event bus reference during bootstrap instead of allocating disconnected local buses;
|
||||
- the `Container` must be initialized during Studio boot before packer-backed integration services, workspaces, or adapters begin use.
|
||||
- `prometeu-app` owns construction and lifecycle of the shared UI bus;
|
||||
- UI composition roots receive the bus explicitly and workspace buses derive from that injected instance;
|
||||
- host integrations publish neutral application facts through their owning API boundary and may be adapted to UI events at the JavaFX edge;
|
||||
- `p.studio.Container`, Spring context lookup, or another static service locator must not participate in event access.
|
||||
|
||||
This topology exists so callers do not need to duplicate publication decisions manually.
|
||||
|
||||
@@ -98,6 +99,8 @@ Illustrative baseline categories include:
|
||||
- diagnostics update events;
|
||||
- asset selection events.
|
||||
|
||||
Selection, navigation, attach/detach, edit scope, and presentation refresh are UI-local event categories. Application facts such as execution state, build results, runtime state, and asset operation results belong to neutral API contracts owned by their functional module and must not be defined only as JavaFX events.
|
||||
|
||||
For project bootstrap and splash/loading integration, the Studio event catalog should reserve typed events for:
|
||||
|
||||
- project loading started;
|
||||
|
||||
@@ -1,169 +1,66 @@
|
||||
# Studio Components Module Specification
|
||||
# Studio JavaFX Components Boundary Specification
|
||||
|
||||
Status: Draft
|
||||
Scope: `prometeu-studio-components` role, admission policy, and JavaFX wrapping boundary
|
||||
Purpose: Define the authoritative visual control layer for the Studio.
|
||||
## Status
|
||||
|
||||
Active
|
||||
|
||||
## Applies To
|
||||
|
||||
- `prometeu-studio-ui-javafx`
|
||||
- shared Studio controls and workspace-framework primitives
|
||||
- JavaFX controls actively used by the Studio
|
||||
|
||||
## Purpose
|
||||
|
||||
Define the visual component boundary inside the JavaFX adapter without creating a second application or domain layer.
|
||||
|
||||
## Authority and Precedence
|
||||
|
||||
This specification consolidates the accepted Studio components module decision into normative form.
|
||||
|
||||
## Normative Inputs
|
||||
|
||||
- `prometeu-studio-components`
|
||||
- Studio shell and workspace UI needs
|
||||
- JavaFX controls actively used by the Studio
|
||||
This specification is subordinate to [`9. Studio Core and Adapter Architecture Specification.md`](9.%20Studio%20Core%20and%20Adapter%20Architecture%20Specification.md).
|
||||
|
||||
## Core Rules
|
||||
|
||||
1. `prometeu-studio-components` is the official visual control module for Studio UI.
|
||||
2. Studio UI should normally consume visual controls from `prometeu-studio-components`, not directly from raw JavaFX.
|
||||
3. A control enters the module when it is needed by the current Studio UI wave.
|
||||
4. Controls in the module wrap and shape the JavaFX controls the Studio actively uses, but do not clone the full JavaFX API.
|
||||
5. Every admitted control must preserve theme and i18n compatibility.
|
||||
6. Reusable event-driven workspace controls should be admitted when they are part of the active Studio workspace framework.
|
||||
1. Reusable Studio visual controls belong to `prometeu-studio-ui-javafx`.
|
||||
2. The JavaFX adapter may organize reusable controls by shell, forms, banks, lifecycle, navigation, feedback, and inspection roles.
|
||||
3. A control is admitted when it has an immediate Studio consumer; speculative mirroring of JavaFX is forbidden.
|
||||
4. Shared controls must preserve theme, localization, and explicit visual-state behavior.
|
||||
5. Controls that observe UI events must expose predictable attach/detach or subscribe/unsubscribe lifecycle behavior.
|
||||
6. Visual controls must depend on neutral Studio API contracts, not core or provider implementations.
|
||||
7. Domain rules, application orchestration, filesystem workflows, compiler/Packer/LSP/runtime calls, and Spring composition do not belong in the visual component layer.
|
||||
|
||||
## Module Role
|
||||
## JavaFX Wrapping Boundary
|
||||
|
||||
`prometeu-studio-components` is:
|
||||
The Studio may use raw JavaFX for trivial local composition. A reusable control should expose the Studio-facing API actually needed instead of cloning the complete upstream JavaFX surface.
|
||||
|
||||
- the authoritative Studio control layer;
|
||||
- the home of the Studio visual dialect;
|
||||
- the place where Studio-facing controls are shaped for Studio use;
|
||||
- the preferred home for reusable lifecycle-aware workspace controls when those controls are part of the visible Studio UI dialect.
|
||||
Shared controls may include:
|
||||
|
||||
`prometeu-studio-components` is not:
|
||||
- shell and action controls;
|
||||
- workspace rails and hosts;
|
||||
- form sections and action bars;
|
||||
- list, tree, inspector, and dual-list surfaces;
|
||||
- activity, progress, badges, headers, and feedback controls;
|
||||
- lifecycle-managed visual primitives.
|
||||
|
||||
- a speculative generic framework;
|
||||
- a full reimplementation of JavaFX;
|
||||
- a dumping ground for unrelated non-visual infrastructure.
|
||||
## Construction and Lifecycle
|
||||
|
||||
## Admission Policy
|
||||
Controls, rows, dialogs, and views MUST NOT be Spring singletons by default. A Spring-managed JavaFX composition factory may create them with explicit constructor dependencies.
|
||||
|
||||
A control is admissible when it is needed by the current Studio UI work.
|
||||
Controls that attach event subscriptions MUST release them when detached. UI-local events may coordinate selection, navigation, editing scope, attach/detach, and presentation refresh. Request/response application behavior MUST use injected Studio API services directly.
|
||||
|
||||
Rules:
|
||||
## State Boundary
|
||||
|
||||
- immediate current Studio use is sufficient justification;
|
||||
- a second use is not required when the control is clearly part of the shell or the current workspace surface;
|
||||
- no control should be added without an immediate Studio consumer.
|
||||
- a control needed first by one workspace may still be admitted when it is clearly intended as a reusable Studio workspace primitive.
|
||||
Presentation-only view models, form drafts, selection state, and formatting helpers may live beside JavaFX controls when they do not determine domain outcomes.
|
||||
|
||||
## Studio Usage Rule
|
||||
|
||||
The baseline Studio UI should not rely on raw JavaFX controls as its normal visual surface.
|
||||
|
||||
Rules:
|
||||
|
||||
- a visual control used by Studio should normally come from `prometeu-studio-components`;
|
||||
- extremely trivial local composition may stay in `prometeu-studio`;
|
||||
- local exceptions must remain exceptional rather than becoming the default path.
|
||||
|
||||
## Wrapping Boundary
|
||||
|
||||
Controls in `prometeu-studio-components` must wrap the JavaFX controls the Studio actively uses.
|
||||
|
||||
Rules:
|
||||
|
||||
- the Studio-layer control should expose the Studio-facing API actually needed;
|
||||
- exhaustive mirroring of upstream JavaFX APIs is not required;
|
||||
- the goal is consistency and clarity, not a perfect one-to-one mirror of every JavaFX type.
|
||||
|
||||
## Control Lifecycle Hooks
|
||||
|
||||
Studio controls may need to observe event buses or other external state.
|
||||
|
||||
Rules:
|
||||
|
||||
- the control layer must provide explicit subscribe and unsubscribe lifecycle methods that can be overridden when needed;
|
||||
- the control layer should also provide `onAttached()` and `onDetached()` lifecycle hooks;
|
||||
- `onAttached()` should call `subscribe()`;
|
||||
- `onDetached()` should call `unsubscribe()`;
|
||||
- controls that attach subscriptions must also define how those subscriptions are released;
|
||||
- event-driven controls must not hide subscription lifecycle completely inside ad hoc local wiring.
|
||||
|
||||
These hooks exist so event-driven controls remain predictable and safe to embed in shell and workspace UI.
|
||||
|
||||
## Reusable Workspace Primitives
|
||||
|
||||
Some reusable controls are not shell-only and are not domain-specific either.
|
||||
|
||||
They may still belong in `prometeu-studio-components` when they are part of the visible Studio workspace framework.
|
||||
|
||||
Illustrative admissible examples include:
|
||||
|
||||
- projection hosts for list/tree/detail surfaces;
|
||||
- lifecycle-managed row or item controls;
|
||||
- reusable section or inspector surfaces;
|
||||
- visible controls that encode local-patch versus structural-sync interaction patterns.
|
||||
|
||||
What does not belong here:
|
||||
|
||||
- workspace-specific orchestration logic;
|
||||
- domain-specific service calls;
|
||||
- hidden coordination code with no visible control responsibility.
|
||||
|
||||
## Typical Control Scope
|
||||
|
||||
Typical controls that belong in the module include:
|
||||
|
||||
- shell controls;
|
||||
- action controls and buttons;
|
||||
- tab systems;
|
||||
- tree and list controls;
|
||||
- inspector and panel surfaces;
|
||||
- activity and feedback surfaces;
|
||||
- badges, headers, and related Studio primitives.
|
||||
|
||||
What stays outside the module:
|
||||
|
||||
- workspace-specific composition logic;
|
||||
- non-visual domain behavior;
|
||||
- speculative controls with no immediate Studio consumer.
|
||||
|
||||
## Theme and i18n
|
||||
|
||||
Every admitted control must support:
|
||||
|
||||
- CSS-based theming;
|
||||
- safe locale-aware text behavior when text is exposed;
|
||||
- no hardcoded user-facing text;
|
||||
- explicit visual states where state matters.
|
||||
|
||||
## Organization Guidance
|
||||
|
||||
The module should be organized by Studio role rather than vague technical buckets.
|
||||
|
||||
Illustrative areas include:
|
||||
|
||||
- shell;
|
||||
- actions;
|
||||
- navigation;
|
||||
- feedback;
|
||||
- inspection;
|
||||
- trees.
|
||||
|
||||
## Anti-Bloat Rule
|
||||
|
||||
The module must remain:
|
||||
|
||||
- intentional;
|
||||
- Studio-driven;
|
||||
- small enough to reason about;
|
||||
- broad enough to prevent UI entropy in the application.
|
||||
Non-visual policies and workflows that determine asset validity, capacity, metadata, build, runtime, project, or semantic results MUST live behind `prometeu-studio-api` and be implemented by `prometeu-studio-core` or an explicit infrastructure adapter.
|
||||
|
||||
## Non-Goals
|
||||
|
||||
- defining the first concrete component set in full detail
|
||||
- defining final package layout exhaustively
|
||||
- mirroring the entire JavaFX control hierarchy
|
||||
- storing domain-specific workspace orchestration code in the components module
|
||||
- creating a standalone `prometeu-studio-components` Gradle module;
|
||||
- wrapping the full JavaFX API;
|
||||
- storing workspace business logic in controls;
|
||||
- using Spring as a registry for each visual object;
|
||||
- defining components for a future web UI.
|
||||
|
||||
## Exit Criteria
|
||||
|
||||
This specification is complete enough when:
|
||||
|
||||
- the module role is unambiguous;
|
||||
- admission rules are stable enough to guide implementation;
|
||||
- reusable workspace-control admission is clear enough to prevent local reimplementation drift;
|
||||
- the JavaFX wrapping boundary is clear enough to prevent drift.
|
||||
This specification is satisfied when reusable JavaFX controls have clear visual ownership, explicit lifecycle behavior, neutral injected dependencies, and no application or provider implementation responsibilities.
|
||||
|
||||
@@ -6,7 +6,10 @@ Active
|
||||
|
||||
## Applies To
|
||||
|
||||
- `prometeu-studio`
|
||||
- `prometeu-studio-api`
|
||||
- `prometeu-studio-core`
|
||||
- `prometeu-studio-ui-javafx`
|
||||
- `prometeu-app`
|
||||
- the Studio `Assets` workspace
|
||||
- packer-facing Studio service integration for asset browsing, inspection, diagnostics, and staged mutations
|
||||
|
||||
@@ -29,6 +32,7 @@ This specification extends:
|
||||
- [`1. Studio Shell and Workspace Layout Specification.md`](1.%20Studio%20Shell%20and%20Workspace%20Layout%20Specification.md)
|
||||
- [`2. Studio UI Foundations Specification.md`](2.%20Studio%20UI%20Foundations%20Specification.md)
|
||||
- [`3. Studio Components Module Specification.md`](3.%20Studio%20Components%20Module%20Specification.md)
|
||||
- [`9. Studio Core and Adapter Architecture Specification.md`](9.%20Studio%20Core%20and%20Adapter%20Architecture%20Specification.md)
|
||||
|
||||
For packer-facing semantics, this specification must align with:
|
||||
|
||||
@@ -52,7 +56,7 @@ The workspace must assume:
|
||||
- diagnostics, activity, progress, and staged mutation responses are available from Studio-facing services;
|
||||
- packer-facing operational freshness may surface states such as `healthy`, `stale`, `diverged`, `reconciling`, or `failed`.
|
||||
|
||||
Packer-backed operational events consumed by this workspace are expected to enter Studio through the container-owned typed event bus path rather than through workspace-local ad hoc bus creation.
|
||||
The JavaFX workspace must consume neutral Studio asset contracts. Stable public Packer APIs are consumed by Studio Core where appropriate; Packer bootstrap and concrete integration remain in `prometeu-app`. Packer-backed application facts may be projected into UI-local events at the JavaFX edge, but the workspace must not call Packer directly or create an ad hoc provider integration.
|
||||
|
||||
## Workspace Model
|
||||
|
||||
@@ -100,6 +104,7 @@ The `Assets` workspace must be implemented as a composition root plus lifecycle-
|
||||
Rules:
|
||||
|
||||
- the workspace root should coordinate service calls, workspace state, and structural synchronization;
|
||||
- service calls must target injected `prometeu-studio-api` contracts; domain workflows and filesystem orchestration must not be implemented by the workspace root;
|
||||
- the workspace root should not own the render and update path of every navigator row, details section, and form control directly;
|
||||
- the navigator host, asset rows, selected-asset details host, and details-internal sections/forms should subscribe only to the events and state they consume;
|
||||
- event-consuming controls must subscribe only while mounted in the UI tree;
|
||||
|
||||
@@ -6,7 +6,10 @@ Active
|
||||
|
||||
## Applies To
|
||||
|
||||
- `prometeu-studio`
|
||||
- `prometeu-studio-api`
|
||||
- `prometeu-studio-core`
|
||||
- `prometeu-studio-ui-javafx`
|
||||
- `prometeu-app`
|
||||
- Studio project-session persistence under `.studio/`
|
||||
- project-local Studio session restoration state
|
||||
- project-local Studio setup configuration
|
||||
@@ -26,7 +29,7 @@ It extends:
|
||||
## Core Rules
|
||||
|
||||
1. The canonical root for project-local Studio persistence MUST be `.studio/` in the project root.
|
||||
2. The main project-local Studio session-restoration store MUST be owned by `StudioProjectSession`, or by a service explicitly owned by `StudioProjectSession`.
|
||||
2. The main project-local Studio session-restoration store MUST be owned by the neutral project-session boundary, implemented in `p.studio.core.session` or by a project service explicitly composed into that session.
|
||||
3. The main session-restoration store MUST remain a single file at `.studio/state.json`.
|
||||
4. The main session-restoration store MUST be versioned.
|
||||
5. The main session-restoration store MUST load when the project session opens.
|
||||
|
||||
@@ -0,0 +1,159 @@
|
||||
# Studio Core and Adapter Architecture Specification
|
||||
|
||||
## Status
|
||||
|
||||
Active
|
||||
|
||||
## Applies To
|
||||
|
||||
- `prometeu-studio-api`
|
||||
- `prometeu-studio-core`
|
||||
- `prometeu-studio-ui-javafx`
|
||||
- `prometeu-app`
|
||||
- integrations with compiler, Packer, LSP, and the runtime
|
||||
|
||||
## Purpose
|
||||
|
||||
Define the physical and functional boundary that makes the Studio consumable by interchangeable human and automation adapters without coupling application behavior to JavaFX, Spring, or a specific external provider.
|
||||
|
||||
## Authority and Precedence
|
||||
|
||||
This specification implements `DEC-0059` and is the normative architecture reference for the Studio split. More specific domain specs may refine behavior, but they MUST preserve the dependency direction defined here.
|
||||
|
||||
## Architectural Model
|
||||
|
||||
The Studio is a set of project and tooling services consumed by adapters:
|
||||
|
||||
```text
|
||||
JavaFX UI ──> Studio API <── future non-visual adapters
|
||||
│
|
||||
▼
|
||||
Studio Core
|
||||
▲
|
||||
│
|
||||
application/infrastructure adapters
|
||||
```
|
||||
|
||||
JavaFX is the current human adapter. A future agent surface is not part of this specification, but MUST be able to consume the same neutral services instead of simulating UI interaction.
|
||||
|
||||
## Physical Modules
|
||||
|
||||
1. `prometeu-studio-api` MUST contain toolkit-neutral contracts, commands, queries, DTOs, diagnostics, results, events, and operation contracts.
|
||||
2. `prometeu-studio-core` MUST contain JavaFX-free application services, sessions, policies, orchestration, and Studio-owned use-case implementations.
|
||||
3. `prometeu-studio-ui-javafx` MUST contain visual workspaces, controls, dialogs, bindings, navigation, presentation projections, theme application, localization binding, and JavaFX-thread dispatch.
|
||||
4. `prometeu-app` MUST contain the desktop entry point, Spring composition, concrete integration adapters, lifecycle, and packaging.
|
||||
|
||||
Gradle is the physical classpath boundary. Spring Modulith verifies the functional modules rooted exclusively at `p.studio.core`; it does not replace the Gradle modules.
|
||||
|
||||
The legacy mixed `prometeu-studio` module and the static `p.studio.Container` service locator MUST NOT exist in the final architecture.
|
||||
|
||||
## API Neutrality
|
||||
|
||||
The public Studio API MUST be plain Java and MUST NOT depend on:
|
||||
|
||||
- JavaFX;
|
||||
- Spring Framework, Spring Boot, or Spring Modulith;
|
||||
- AI, MCP, or provider SDKs;
|
||||
- concrete compiler, Packer, LSP, or runtime implementations;
|
||||
- `p.studio.core` or `p.studio.ui.javafx` internals.
|
||||
|
||||
Public contracts MUST NOT expose `Stage`, `Scene`, `Node`, JavaFX properties, controls, `Task`, `ApplicationContext`, Spring events, or provider-specific implementation types.
|
||||
|
||||
Expected failures MUST use domain status, diagnostics, and typed results. A universal `Result<T>` abstraction MUST NOT be introduced.
|
||||
|
||||
## Core Rules
|
||||
|
||||
Core classes MUST be POJOs with constructor injection and MUST remain testable without a Spring context.
|
||||
|
||||
The core module MUST NOT:
|
||||
|
||||
- depend on JavaFX or UI packages;
|
||||
- call `Platform.runLater`;
|
||||
- perform navigation or workspace selection;
|
||||
- use presentation severity or visual state as domain semantics;
|
||||
- obtain dependencies from a static holder or `ApplicationContext` lookup.
|
||||
|
||||
The functional core modules are:
|
||||
|
||||
- `project`: project identity, catalog, creation, paths, setup, and restoration state;
|
||||
- `session`: open-project lifecycle, ordered cleanup, execution ownership, and the LSP lifecycle port;
|
||||
- `assets`: Studio-owned asset projections, metadata, policies, non-visual sessions, validation, and workflow orchestration;
|
||||
- `shipper`: build/pack coordination, manifest generation, artifacts, and neutral logs/results;
|
||||
- `runtime`: runtime settings, handshake, process/client lifecycle, and technical logs;
|
||||
- `execution`: play/stop state, cancellation, shutdown, and orchestration of shipper and runtime.
|
||||
|
||||
The functional dependency direction MUST remain:
|
||||
|
||||
```text
|
||||
assets --> project
|
||||
shipper --> project
|
||||
runtime --> project
|
||||
execution --> project, shipper, runtime
|
||||
session --> project, execution, LSP port
|
||||
```
|
||||
|
||||
## JavaFX Adapter Rules
|
||||
|
||||
The JavaFX module MUST depend on Studio API contracts rather than core or provider implementations. It owns visual state, UI events, navigation, FX-thread transitions, CSS, fonts, locale bindings, and lifecycle of visual objects.
|
||||
|
||||
JavaFX controls and dialogs MUST be constructed by UI factories or composition roots. They MUST NOT become Spring singletons by default.
|
||||
|
||||
Presentation-only drafts and projections MAY remain in the JavaFX module. Rules that determine project, asset, build, runtime, or semantic outcomes MUST live behind neutral API contracts and core services.
|
||||
|
||||
The JavaFX module MUST NOT directly invoke compiler implementations, `p.packer`, LSP implementations, runtime implementations, or filesystem orchestration.
|
||||
|
||||
## Spring Composition
|
||||
|
||||
Spring Boot MUST be used only by `prometeu-app` as a non-web composition and lifecycle mechanism. The application MUST start with `WebApplicationType.NONE` or an equivalent guarantee and MUST NOT introduce Spring Web, WebFlux, Data, AI, durable events, or a web server without a later accepted decision.
|
||||
|
||||
Spring configuration MAY create core services, infrastructure adapters, and a JavaFX composition factory. It MUST NOT use field injection, context lookup, broad service bags, or a replacement static container.
|
||||
|
||||
The desktop entry point MUST retain the JavaFX composition root and close it before closing the Spring context. Closing that root MUST be idempotent and MUST close any active or asynchronously opening project session, execution surface, loading window, project window, and launcher window before provider beans and executors are destroyed.
|
||||
|
||||
Spring Modulith verification MUST use `p.studio.core` as its exclusive application root and MUST run as an architecture gate.
|
||||
|
||||
## External Integration Rule
|
||||
|
||||
An integration MUST use the provider's public API directly when that API is stable, neutral, use-case oriented, and safe to compose and test. A redundant gateway that merely mirrors such an API MUST NOT be created.
|
||||
|
||||
A narrow consumer-owned gateway MUST be used when the available integration is concrete, static, infrastructure-oriented, unstable, excessively broad, or leaks lifecycle and implementation details. Its implementation belongs in `prometeu-app` or another explicit infrastructure adapter.
|
||||
|
||||
| Studio consumer | Provider | Required boundary |
|
||||
| --- | --- | --- |
|
||||
| `assets` | `p.packer` | Stable public Packer API directly; narrow assets-owned gateway only when necessary |
|
||||
| `shipper` | compiler and `p.packer` | Stable public APIs or a narrow shipper-owned compiler gateway |
|
||||
| `session` | LSP | Neutral session-owned lifecycle port |
|
||||
| `runtime` | external runtime/process | Narrow runtime-owned gateway |
|
||||
| JavaFX UI | Studio | Studio API only |
|
||||
|
||||
`p.packer` remains an autonomous domain and MUST NOT depend on any `p.studio` package. Studio MUST NOT copy or assume ownership of Packer semantics.
|
||||
|
||||
## Commands, Events, and Operations
|
||||
|
||||
Commands and queries requiring an immediate response MUST use direct service calls. In-process events MAY communicate facts that require no response, and each application event MUST be owned by the functional module that owns the fact.
|
||||
|
||||
Selection, navigation, attach/detach, and visual lifecycle events remain UI-local.
|
||||
|
||||
Long-running build, pack, runtime, and execution work MUST expose a neutral operation contract with stable identity, observable snapshot, standard-Java asynchronous completion, cancellation, updates, and a typed result.
|
||||
|
||||
Core services MUST submit such work through the neutral `OperationExecutor` port. `prometeu-app` owns the executor-backed implementation and its thread lifecycle; JavaFX consumes `OperationHandle` completion and snapshots and performs only the required FX-thread projection.
|
||||
|
||||
## Conformance Gates
|
||||
|
||||
The architecture is conformant only when all of the following hold together:
|
||||
|
||||
- API and core compile without JavaFX or Spring dependencies;
|
||||
- UI has no dependency on core or concrete external providers;
|
||||
- `ApplicationModules.verify()` succeeds for the exclusive `p.studio.core` root;
|
||||
- the application boots and shuts down in non-web mode;
|
||||
- `Container`, `AppContainer`, compatibility allowlists, and the mixed module are absent;
|
||||
- unit, integration, architecture, packaging, and desktop smoke tests pass;
|
||||
- no service locator or context lookup replaces the removed static container.
|
||||
|
||||
## Non-Goals
|
||||
|
||||
- creating an agent or MCP module;
|
||||
- replacing JavaFX with a web UI;
|
||||
- migrating the Studio to Rust, Electron, Tauri, or a parallel rewrite;
|
||||
- redesigning compiler, Packer, LSP, or runtime semantics;
|
||||
- introducing microservices or durable event infrastructure.
|
||||
@@ -55,6 +55,7 @@ The current Studio core corpus is:
|
||||
3. [`3. Studio Components Module Specification.md`](3.%20Studio%20Components%20Module%20Specification.md)
|
||||
4. [`4. Assets Workspace Specification.md`](4.%20Assets%20Workspace%20Specification.md)
|
||||
5. [`8. Project-Local Studio State Specification.md`](8.%20Project-Local%20Studio%20State%20Specification.md)
|
||||
6. [`9. Studio Core and Adapter Architecture Specification.md`](9.%20Studio%20Core%20and%20Adapter%20Architecture%20Specification.md)
|
||||
|
||||
## Reading Order
|
||||
|
||||
@@ -64,7 +65,8 @@ Recommended order:
|
||||
2. shared UI foundations;
|
||||
3. components module policy;
|
||||
4. assets workspace behavior;
|
||||
5. project-local Studio state behavior.
|
||||
5. project-local Studio state behavior;
|
||||
6. Studio Core, adapter, composition, and external integration boundaries.
|
||||
|
||||
## Current Wave Notes
|
||||
|
||||
@@ -75,3 +77,6 @@ Normative reminders:
|
||||
- the active Studio workspace corpus is `Assets`, `Debug`, and `Shipper`;
|
||||
- project-local Studio session state remains normative and is owned by `StudioProjectSession`;
|
||||
- any future external-editor backend or replacement language-service architecture requires a new accepted decision before new Studio specs are introduced.
|
||||
- the Studio backend is exposed through neutral API contracts shared by the JavaFX adapter and future non-visual adapters;
|
||||
- Spring Boot is a non-web composition root, while Spring Modulith verifies the JavaFX-free `p.studio.core` boundary;
|
||||
- `p.studio.Container`, `AppContainer`, and the mixed `prometeu-studio` module are not valid final architecture.
|
||||
|
||||
@@ -8,6 +8,8 @@ junit-jupiter = "5.12.1"
|
||||
archunit = "1.4.2"
|
||||
slf4j = "2.0.7"
|
||||
lsp4j = "1.0.0"
|
||||
spring-boot = "3.5.16"
|
||||
spring-modulith = "1.4.13"
|
||||
|
||||
[libraries]
|
||||
javafx-controls = { group = "org.openjfx", name = "javafx-controls", version.ref = "javafx" }
|
||||
@@ -24,6 +26,9 @@ archunit-junit5 = { group = "com.tngtech.archunit", name = "archunit-junit5", ve
|
||||
slf4j-api = { group = "org.slf4j", name = "slf4j-api", version.ref = "slf4j" }
|
||||
slf4j-simple = { group = "org.slf4j", name = "slf4j-simple", version.ref = "slf4j" }
|
||||
lsp4j = { group = "org.eclipse.lsp4j", name = "org.eclipse.lsp4j", version.ref = "lsp4j" }
|
||||
spring-boot = { group = "org.springframework.boot", name = "spring-boot", version.ref = "spring-boot" }
|
||||
spring-modulith-core = { group = "org.springframework.modulith", name = "spring-modulith-core", version.ref = "spring-modulith" }
|
||||
spring-modulith-docs = { group = "org.springframework.modulith", name = "spring-modulith-docs", version.ref = "spring-modulith" }
|
||||
|
||||
[plugins]
|
||||
javafx = { id = "org.openjfx.javafxplugin", version = "0.1.0" }
|
||||
|
||||
@@ -7,16 +7,21 @@ dependencies {
|
||||
implementation(project(":prometeu-infra"))
|
||||
implementation(project(":prometeu-lsp:prometeu-lsp-api"))
|
||||
implementation(project(":prometeu-lsp:prometeu-lsp-v1"))
|
||||
implementation(project(":prometeu-compiler:prometeu-compiler-core"))
|
||||
implementation(project(":prometeu-compiler:prometeu-build-pipeline"))
|
||||
implementation(project(":prometeu-compiler:prometeu-frontend-registry"))
|
||||
implementation(project(":prometeu-packer:prometeu-packer-api"))
|
||||
implementation(project(":prometeu-packer:prometeu-packer-v1"))
|
||||
implementation(project(":prometeu-studio"))
|
||||
implementation(project(":prometeu-studio-api"))
|
||||
implementation(project(":prometeu-studio-core"))
|
||||
implementation(project(":prometeu-studio-ui-javafx"))
|
||||
implementation(libs.spring.boot)
|
||||
implementation(libs.javafx.controls)
|
||||
implementation(libs.javafx.fxml)
|
||||
}
|
||||
|
||||
application {
|
||||
mainClass = "p.studio.App"
|
||||
mainClass = "p.studio.app.StudioLauncher"
|
||||
}
|
||||
|
||||
javafx {
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
package p.studio;
|
||||
|
||||
import javafx.application.Application;
|
||||
import javafx.stage.Stage;
|
||||
import p.studio.window.StudioWindowCoordinator;
|
||||
|
||||
public class App extends Application {
|
||||
|
||||
@Override
|
||||
public void init() throws Exception {
|
||||
super.init();
|
||||
Container.install(new AppContainer());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void start(Stage stage) {
|
||||
new StudioWindowCoordinator(stage).showLauncher();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stop() throws Exception {
|
||||
Container.shutdown();
|
||||
super.stop();
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
launch();
|
||||
}
|
||||
}
|
||||
@@ -1,91 +0,0 @@
|
||||
package p.studio;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import p.packer.Packer;
|
||||
import p.studio.compiler.FrontendRegistryService;
|
||||
import p.studio.lsp.api.LspServerLifecycle;
|
||||
import p.studio.lsp.events.StudioEventBus;
|
||||
import p.studio.lsp.events.StudioPackerEventAdapter;
|
||||
import p.studio.lsp.services.LspServerLifecycleImpl;
|
||||
import p.studio.utilities.ThemeService;
|
||||
import p.studio.utilities.i18n.I18nService;
|
||||
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.ThreadFactory;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
public final class AppContainer implements Container {
|
||||
private final I18nService i18nService;
|
||||
private final ThemeService themeService;
|
||||
private final StudioEventBus studioEventBus;
|
||||
private final ObjectMapper mapper;
|
||||
private final EmbeddedPacker embeddedPacker;
|
||||
private final StudioBackgroundTasks backgroundTasks;
|
||||
private final LspServerLifecycle lspServerLifecycle;
|
||||
|
||||
public AppContainer() {
|
||||
FrontendRegistryService.bootstrapDefaults();
|
||||
this.i18nService = new I18nService();
|
||||
this.themeService = new ThemeService();
|
||||
this.studioEventBus = new StudioEventBus();
|
||||
this.mapper = new ObjectMapper();
|
||||
final ExecutorService backgroundExecutor = Executors.newFixedThreadPool(2, new StudioWorkerThreadFactory());
|
||||
this.backgroundTasks = new StudioBackgroundTasks(backgroundExecutor);
|
||||
final Packer packer = Packer.bootstrap(this.mapper, new StudioPackerEventAdapter(studioEventBus));
|
||||
this.embeddedPacker = new EmbeddedPacker(packer.workspaceService(), packer::close);
|
||||
this.lspServerLifecycle = new LspServerLifecycleImpl();
|
||||
}
|
||||
|
||||
@Override
|
||||
public I18nService getI18n() {
|
||||
return i18nService;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ThemeService getTheme() {
|
||||
return themeService;
|
||||
}
|
||||
|
||||
@Override
|
||||
public StudioEventBus getEventBus() {
|
||||
return studioEventBus;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ObjectMapper getMapper() {
|
||||
return mapper;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EmbeddedPacker getPacker() {
|
||||
return embeddedPacker;
|
||||
}
|
||||
|
||||
@Override
|
||||
public StudioBackgroundTasks getBackgroundTasks() {
|
||||
return backgroundTasks;
|
||||
}
|
||||
|
||||
@Override
|
||||
public p.studio.lsp.api.LspServerLifecycle getLspServerLifecycle() {
|
||||
return lspServerLifecycle;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void shutdownContainer() {
|
||||
embeddedPacker.shutdown();
|
||||
backgroundTasks.shutdown();
|
||||
}
|
||||
|
||||
private static final class StudioWorkerThreadFactory implements ThreadFactory {
|
||||
private final AtomicInteger nextId = new AtomicInteger(1);
|
||||
|
||||
@Override
|
||||
public Thread newThread(Runnable runnable) {
|
||||
final Thread thread = new Thread(runnable, "studio-worker-" + nextId.getAndIncrement());
|
||||
thread.setDaemon(true);
|
||||
return thread;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package p.studio.app;
|
||||
|
||||
import javafx.application.Application;
|
||||
import javafx.stage.Stage;
|
||||
import org.springframework.boot.WebApplicationType;
|
||||
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||
import org.springframework.context.ConfigurableApplicationContext;
|
||||
import p.studio.ui.javafx.window.StudioWindowCoordinator;
|
||||
|
||||
public class App extends Application {
|
||||
private ConfigurableApplicationContext applicationContext;
|
||||
private StudioWindowCoordinator studioWindowCoordinator;
|
||||
|
||||
@Override
|
||||
public void init() throws Exception {
|
||||
super.init();
|
||||
applicationContext = new SpringApplicationBuilder(StudioApplicationConfiguration.class)
|
||||
.web(WebApplicationType.NONE)
|
||||
.headless(false)
|
||||
.run();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void start(Stage stage) {
|
||||
studioWindowCoordinator = applicationContext.getBean(StudioUiFactory.class).create(stage);
|
||||
studioWindowCoordinator.showLauncher();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stop() throws Exception {
|
||||
Exception failure = null;
|
||||
try {
|
||||
if (studioWindowCoordinator != null) {
|
||||
studioWindowCoordinator.close();
|
||||
}
|
||||
} catch (RuntimeException exception) {
|
||||
failure = exception;
|
||||
}
|
||||
try {
|
||||
if (applicationContext != null) {
|
||||
applicationContext.close();
|
||||
}
|
||||
} catch (RuntimeException exception) {
|
||||
failure = append(failure, exception);
|
||||
}
|
||||
try {
|
||||
super.stop();
|
||||
} catch (Exception exception) {
|
||||
failure = append(failure, exception);
|
||||
}
|
||||
if (failure != null) {
|
||||
throw failure;
|
||||
}
|
||||
}
|
||||
|
||||
private static Exception append(Exception prior, Exception failure) {
|
||||
if (prior == null) {
|
||||
return failure;
|
||||
}
|
||||
prior.addSuppressed(failure);
|
||||
return prior;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,308 @@
|
||||
package p.studio.app;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import p.packer.PackerWorkspaceService;
|
||||
import p.studio.api.project.KnownProjects;
|
||||
import p.studio.api.assets.AssetCatalog;
|
||||
import p.studio.api.assets.AssetCommands;
|
||||
import p.studio.api.assets.AssetPacking;
|
||||
import p.studio.api.assets.AssetDetails;
|
||||
import p.studio.api.assets.AssetCreationCatalog;
|
||||
import p.studio.api.assets.AssetWorkspaceStorage;
|
||||
import p.studio.api.assets.AssetCapacityPolicy;
|
||||
import p.studio.api.assets.schema.AssetColorSchemaFactory;
|
||||
import p.studio.api.assets.bank.AssetBankCompositionSessionFactory;
|
||||
import p.studio.api.assets.metadata.AssetMetadataService;
|
||||
import p.studio.core.assets.PackerAssetCatalog;
|
||||
import p.studio.core.assets.PackerAssetCommands;
|
||||
import p.studio.core.assets.PackerAssetPacking;
|
||||
import p.studio.core.assets.PackerAssetDetails;
|
||||
import p.studio.core.assets.PackerAssetCreationCatalog;
|
||||
import p.studio.core.assets.FileSystemAssetWorkspaceStorage;
|
||||
import p.studio.core.assets.DefaultAssetCapacityPolicy;
|
||||
import p.studio.core.assets.schema.DefaultAssetColorSchemaFactory;
|
||||
import p.studio.core.assets.bank.DefaultAssetBankCompositionSessionFactory;
|
||||
import p.studio.core.assets.metadata.AssetStudioMetadataService;
|
||||
import p.studio.api.assets.scene.SceneBankWorkflow;
|
||||
import p.studio.api.assets.tiled.TiledAssetService;
|
||||
import p.studio.core.assets.scene.SceneBankWorkflowService;
|
||||
import p.studio.core.assets.tiled.TiledAssetGenerationService;
|
||||
import p.studio.api.project.ProjectCatalog;
|
||||
import p.studio.api.project.ProjectLanguageCatalog;
|
||||
import p.studio.app.compiler.CompilerProjectLanguageCatalog;
|
||||
import p.studio.app.compiler.CompilerBuildGatewayAdapter;
|
||||
import p.studio.api.shipper.Shipper;
|
||||
import p.studio.core.shipper.CompilerBuildGateway;
|
||||
import p.studio.core.shipper.StudioShipperService;
|
||||
import p.studio.core.project.KnownProjectsService;
|
||||
import p.studio.core.project.ProjectCatalogService;
|
||||
import p.studio.core.project.ProjectLocalStudioSetupStore;
|
||||
import p.studio.core.project.ProjectLocalStudioStateStore;
|
||||
import p.studio.api.project.ProjectWorkspaceInitializer;
|
||||
import p.studio.core.project.PackerProjectWorkspaceInitializer;
|
||||
import p.studio.api.session.ProjectSessionFactory;
|
||||
import p.studio.app.lsp.LspLifecycleAdapter;
|
||||
import p.studio.core.session.DefaultProjectSessionFactory;
|
||||
import p.studio.core.session.LspLifecyclePort;
|
||||
import p.studio.lsp.api.LspServerLifecycle;
|
||||
import p.studio.lsp.services.LspServerLifecycleImpl;
|
||||
import p.studio.ui.javafx.events.StudioEventBus;
|
||||
import p.studio.ui.javafx.utilities.ThemeService;
|
||||
import p.studio.ui.javafx.utilities.i18n.I18nService;
|
||||
import p.packer.Packer;
|
||||
import p.studio.compiler.FrontendRegistryService;
|
||||
import p.studio.api.execution.ExecutionControllerFactory;
|
||||
import p.studio.app.runtime.ExternalRuntimeGateway;
|
||||
import p.studio.core.execution.DefaultExecutionControllerFactory;
|
||||
import p.studio.core.runtime.RuntimeGateway;
|
||||
import p.studio.api.preferences.WindowStateStore;
|
||||
import p.studio.core.project.preferences.JsonWindowStateStore;
|
||||
import p.studio.api.preferences.ProjectActivityHistoryStore;
|
||||
import p.studio.core.project.preferences.JsonProjectActivityHistoryStore;
|
||||
import p.studio.api.operation.OperationExecutor;
|
||||
import p.studio.app.operation.ExecutorOperationExecutor;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
public class StudioApplicationConfiguration {
|
||||
@Bean
|
||||
ObjectMapper objectMapper() {
|
||||
return new ObjectMapper();
|
||||
}
|
||||
|
||||
@Bean
|
||||
I18nService i18nService() {
|
||||
return new I18nService();
|
||||
}
|
||||
|
||||
@Bean
|
||||
ThemeService themeService() {
|
||||
return new ThemeService();
|
||||
}
|
||||
|
||||
@Bean
|
||||
StudioEventBus studioEventBus() {
|
||||
return new StudioEventBus();
|
||||
}
|
||||
|
||||
@Bean(destroyMethod = "close")
|
||||
Packer packer(ObjectMapper mapper, StudioEventBus events) {
|
||||
return Packer.bootstrap(mapper, new StudioPackerEventAdapter(events));
|
||||
}
|
||||
|
||||
@Bean
|
||||
PackerWorkspaceService packerWorkspaceService(Packer packer) {
|
||||
return packer.workspaceService();
|
||||
}
|
||||
|
||||
@Bean
|
||||
AssetCatalog assetCatalog(PackerWorkspaceService packer) {
|
||||
return new PackerAssetCatalog(packer);
|
||||
}
|
||||
|
||||
@Bean
|
||||
AssetCommands assetCommands(PackerWorkspaceService packer) {
|
||||
return new PackerAssetCommands(packer);
|
||||
}
|
||||
|
||||
@Bean
|
||||
AssetPacking assetPacking(PackerWorkspaceService packer, OperationExecutor operations) {
|
||||
return new PackerAssetPacking(packer, operations);
|
||||
}
|
||||
|
||||
@Bean
|
||||
AssetDetails assetDetails(PackerWorkspaceService packer) {
|
||||
return new PackerAssetDetails(packer);
|
||||
}
|
||||
|
||||
@Bean
|
||||
AssetCreationCatalog assetCreationCatalog() {
|
||||
return new PackerAssetCreationCatalog();
|
||||
}
|
||||
|
||||
@Bean
|
||||
AssetWorkspaceStorage assetWorkspaceStorage() {
|
||||
return new FileSystemAssetWorkspaceStorage();
|
||||
}
|
||||
|
||||
@Bean
|
||||
AssetCapacityPolicy assetCapacityPolicy() {
|
||||
return new DefaultAssetCapacityPolicy();
|
||||
}
|
||||
|
||||
@Bean
|
||||
AssetColorSchemaFactory assetColorSchemaFactory() {
|
||||
return new DefaultAssetColorSchemaFactory();
|
||||
}
|
||||
|
||||
@Bean
|
||||
AssetBankCompositionSessionFactory assetBankCompositionSessionFactory(AssetCapacityPolicy capacityPolicy) {
|
||||
return new DefaultAssetBankCompositionSessionFactory(capacityPolicy);
|
||||
}
|
||||
|
||||
@Bean
|
||||
AssetMetadataService assetMetadataService(ObjectMapper mapper) {
|
||||
return new AssetStudioMetadataService(mapper);
|
||||
}
|
||||
|
||||
@Bean
|
||||
SceneBankWorkflow sceneBankWorkflow(AssetCatalog assetCatalog, ObjectMapper mapper) {
|
||||
return new SceneBankWorkflowService(assetCatalog, mapper);
|
||||
}
|
||||
|
||||
@Bean
|
||||
TiledAssetService tiledAssetService(AssetMetadataService metadataService) {
|
||||
return new TiledAssetGenerationService(metadataService);
|
||||
}
|
||||
|
||||
@Bean
|
||||
WindowStateStore windowStateStore(ObjectMapper mapper) {
|
||||
return new JsonWindowStateStore(resolveWindowStateStorage(), mapper);
|
||||
}
|
||||
|
||||
@Bean
|
||||
ProjectActivityHistoryStore projectActivityHistoryStore(ObjectMapper mapper) {
|
||||
return new JsonProjectActivityHistoryStore(mapper);
|
||||
}
|
||||
|
||||
@Bean
|
||||
CompilerBuildGateway compilerBuildGateway() {
|
||||
return new CompilerBuildGatewayAdapter();
|
||||
}
|
||||
|
||||
@Bean
|
||||
Shipper shipper(CompilerBuildGateway compiler, PackerWorkspaceService packer, ObjectMapper mapper,
|
||||
OperationExecutor operations) {
|
||||
return new StudioShipperService(compiler, packer, mapper, operations);
|
||||
}
|
||||
|
||||
@Bean(destroyMethod = "shutdown")
|
||||
ExecutorService studioExecutor() {
|
||||
return Executors.newFixedThreadPool(4, Thread.ofPlatform().daemon().name("studio-worker-", 1).factory());
|
||||
}
|
||||
|
||||
@Bean
|
||||
OperationExecutor operationExecutor(ExecutorService studioExecutor) {
|
||||
return new ExecutorOperationExecutor(studioExecutor);
|
||||
}
|
||||
|
||||
@Bean
|
||||
RuntimeGateway runtimeGateway(ObjectMapper mapper, ExecutorService studioExecutor) {
|
||||
return new ExternalRuntimeGateway(mapper, studioExecutor);
|
||||
}
|
||||
|
||||
@Bean
|
||||
ExecutionControllerFactory executionControllerFactory(Shipper shipper, RuntimeGateway runtime,
|
||||
OperationExecutor operations) {
|
||||
return new DefaultExecutionControllerFactory(shipper, runtime, operations);
|
||||
}
|
||||
|
||||
@Bean
|
||||
ProjectLocalStudioSetupStore projectLocalStudioSetupStore(ObjectMapper mapper) {
|
||||
return new ProjectLocalStudioSetupStore(mapper);
|
||||
}
|
||||
|
||||
@Bean
|
||||
ProjectLocalStudioStateStore projectLocalStudioStateStore(ObjectMapper mapper) {
|
||||
return new ProjectLocalStudioStateStore(mapper);
|
||||
}
|
||||
|
||||
@Bean
|
||||
LspServerLifecycle lspServerLifecycle() {
|
||||
return new LspServerLifecycleImpl();
|
||||
}
|
||||
|
||||
@Bean
|
||||
LspLifecyclePort lspLifecyclePort(LspServerLifecycle lifecycle) {
|
||||
return new LspLifecycleAdapter(lifecycle);
|
||||
}
|
||||
|
||||
@Bean
|
||||
ProjectSessionFactory projectSessionFactory(ProjectLocalStudioStateStore stateStore,
|
||||
ProjectLocalStudioSetupStore setupStore, LspLifecyclePort lsp) {
|
||||
return new DefaultProjectSessionFactory(stateStore, setupStore, lsp);
|
||||
}
|
||||
|
||||
@Bean
|
||||
ProjectCatalog projectCatalog(ObjectMapper mapper, ProjectLocalStudioSetupStore setupStore) {
|
||||
return new ProjectCatalogService(resolveDefaultProjectsRoot(), mapper, setupStore);
|
||||
}
|
||||
|
||||
@Bean
|
||||
KnownProjects knownProjects(ProjectCatalog projectCatalog) {
|
||||
return new KnownProjectsService(resolveKnownProjectsStorage(), projectCatalog);
|
||||
}
|
||||
|
||||
@Bean
|
||||
ProjectWorkspaceInitializer projectWorkspaceInitializer(PackerWorkspaceService packer) {
|
||||
return new PackerProjectWorkspaceInitializer(packer);
|
||||
}
|
||||
|
||||
@Bean
|
||||
ProjectLanguageCatalog projectLanguageCatalog() {
|
||||
FrontendRegistryService.bootstrapDefaults();
|
||||
return new CompilerProjectLanguageCatalog();
|
||||
}
|
||||
|
||||
@Bean
|
||||
StudioUiFactory studioUiFactory(
|
||||
ProjectCatalog projectCatalog,
|
||||
KnownProjects knownProjects,
|
||||
ProjectLanguageCatalog languageCatalog,
|
||||
ProjectSessionFactory projectSessionFactory,
|
||||
ExecutionControllerFactory executionControllerFactory,
|
||||
ProjectWorkspaceInitializer projectWorkspaceInitializer,
|
||||
ExecutorService studioExecutor,
|
||||
I18nService i18n,
|
||||
ThemeService theme,
|
||||
StudioEventBus eventBus,
|
||||
Shipper shipper,
|
||||
AssetCatalog assetCatalog,
|
||||
AssetCommands assetCommands,
|
||||
AssetPacking assetPacking,
|
||||
AssetDetails assetDetails,
|
||||
AssetCreationCatalog assetCreationCatalog,
|
||||
AssetMetadataService assetMetadataService,
|
||||
AssetWorkspaceStorage assetWorkspaceStorage,
|
||||
AssetCapacityPolicy assetCapacityPolicy,
|
||||
AssetBankCompositionSessionFactory bankCompositionSessionFactory,
|
||||
AssetColorSchemaFactory assetColorSchemaFactory,
|
||||
TiledAssetService tiledAssetService,
|
||||
SceneBankWorkflow sceneBankWorkflow,
|
||||
WindowStateStore windowStateStore,
|
||||
ProjectActivityHistoryStore activityHistoryStore) {
|
||||
return new StudioUiFactory(projectCatalog, knownProjects, languageCatalog, projectSessionFactory,
|
||||
executionControllerFactory, projectWorkspaceInitializer, studioExecutor, i18n, theme, eventBus, shipper,
|
||||
assetCatalog, assetCommands, assetPacking, assetDetails, assetCreationCatalog, assetMetadataService,
|
||||
assetWorkspaceStorage, assetCapacityPolicy, bankCompositionSessionFactory, assetColorSchemaFactory,
|
||||
tiledAssetService, sceneBankWorkflow, windowStateStore,
|
||||
activityHistoryStore);
|
||||
}
|
||||
|
||||
private static Path resolveDefaultProjectsRoot() {
|
||||
Path cursor = Path.of(System.getProperty("user.dir")).toAbsolutePath().normalize();
|
||||
while (cursor != null) {
|
||||
if (cursor.resolve("settings.gradle.kts").toFile().exists()
|
||||
&& cursor.resolve("test-projects").toFile().exists()) {
|
||||
return cursor.resolve("test-projects");
|
||||
}
|
||||
cursor = cursor.getParent();
|
||||
}
|
||||
return Path.of("test-projects").toAbsolutePath().normalize();
|
||||
}
|
||||
|
||||
private static Path resolveKnownProjectsStorage() {
|
||||
return Path.of(System.getProperty("user.home"), ".prometeu-studio", "known-projects.txt")
|
||||
.toAbsolutePath().normalize();
|
||||
}
|
||||
|
||||
private static Path resolveWindowStateStorage() {
|
||||
return Path.of(System.getProperty("user.home"), ".prometeu-studio", "window-state.json")
|
||||
.toAbsolutePath().normalize();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package p.studio.app;
|
||||
|
||||
import javafx.application.Application;
|
||||
|
||||
public final class StudioLauncher {
|
||||
private StudioLauncher() {
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
Application.launch(App.class, args);
|
||||
}
|
||||
}
|
||||
+7
-4
@@ -1,14 +1,17 @@
|
||||
package p.studio.lsp.events;
|
||||
package p.studio.app;
|
||||
|
||||
import p.packer.events.PackerEvent;
|
||||
import p.packer.events.PackerEventSink;
|
||||
import p.studio.ui.javafx.events.StudioEventBus;
|
||||
import p.studio.ui.javafx.events.StudioPackerOperationEvent;
|
||||
import p.studio.ui.javafx.events.StudioPackerOperationKind;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public final class StudioPackerEventAdapter implements PackerEventSink {
|
||||
final class StudioPackerEventAdapter implements PackerEventSink {
|
||||
private final StudioEventBus eventBus;
|
||||
|
||||
public StudioPackerEventAdapter(StudioEventBus eventBus) {
|
||||
StudioPackerEventAdapter(StudioEventBus eventBus) {
|
||||
this.eventBus = Objects.requireNonNull(eventBus, "eventBus");
|
||||
}
|
||||
|
||||
@@ -17,7 +20,7 @@ public final class StudioPackerEventAdapter implements PackerEventSink {
|
||||
final PackerEvent packerEvent = Objects.requireNonNull(event, "event");
|
||||
eventBus.publish(new StudioPackerOperationEvent(
|
||||
packerEvent.operationId(),
|
||||
packerEvent.kind(),
|
||||
StudioPackerOperationKind.valueOf(packerEvent.kind().name()),
|
||||
packerEvent.summary(),
|
||||
packerEvent.progress() == null ? null : packerEvent.progress().value(),
|
||||
packerEvent.progress() == null || packerEvent.progress().indeterminate()));
|
||||
@@ -0,0 +1,121 @@
|
||||
package p.studio.app;
|
||||
|
||||
import javafx.stage.Stage;
|
||||
import p.studio.api.assets.AssetCatalog;
|
||||
import p.studio.api.assets.AssetCommands;
|
||||
import p.studio.api.assets.AssetPacking;
|
||||
import p.studio.api.assets.AssetDetails;
|
||||
import p.studio.api.assets.AssetCreationCatalog;
|
||||
import p.studio.api.assets.AssetWorkspaceStorage;
|
||||
import p.studio.api.assets.AssetCapacityPolicy;
|
||||
import p.studio.api.assets.schema.AssetColorSchemaFactory;
|
||||
import p.studio.api.assets.bank.AssetBankCompositionSessionFactory;
|
||||
import p.studio.api.assets.metadata.AssetMetadataService;
|
||||
import p.studio.api.assets.scene.SceneBankWorkflow;
|
||||
import p.studio.api.assets.tiled.TiledAssetService;
|
||||
import p.studio.api.project.KnownProjects;
|
||||
import p.studio.api.project.ProjectCatalog;
|
||||
import p.studio.api.project.ProjectLanguageCatalog;
|
||||
import p.studio.api.shipper.Shipper;
|
||||
import p.studio.api.session.ProjectSessionFactory;
|
||||
import p.studio.api.execution.ExecutionControllerFactory;
|
||||
import p.studio.api.project.ProjectWorkspaceInitializer;
|
||||
import p.studio.api.preferences.WindowStateStore;
|
||||
import p.studio.api.preferences.ProjectActivityHistoryStore;
|
||||
import p.studio.ui.javafx.window.StudioWindowCoordinator;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.Executor;
|
||||
import p.studio.ui.javafx.utilities.ThemeService;
|
||||
import p.studio.ui.javafx.utilities.i18n.I18nService;
|
||||
import p.studio.ui.javafx.events.StudioEventBus;
|
||||
|
||||
public final class StudioUiFactory {
|
||||
private final ProjectCatalog projectCatalog;
|
||||
private final KnownProjects knownProjects;
|
||||
private final ProjectLanguageCatalog languageCatalog;
|
||||
private final ProjectSessionFactory projectSessionFactory;
|
||||
private final ExecutionControllerFactory executionControllerFactory;
|
||||
private final ProjectWorkspaceInitializer projectWorkspaceInitializer;
|
||||
private final Executor executor;
|
||||
private final I18nService i18n;
|
||||
private final ThemeService theme;
|
||||
private final StudioEventBus eventBus;
|
||||
private final Shipper shipper;
|
||||
private final AssetCatalog assetCatalog;
|
||||
private final AssetCommands assetCommands;
|
||||
private final AssetPacking assetPacking;
|
||||
private final AssetDetails assetDetails;
|
||||
private final AssetCreationCatalog assetCreationCatalog;
|
||||
private final AssetMetadataService assetMetadataService;
|
||||
private final AssetWorkspaceStorage assetWorkspaceStorage;
|
||||
private final AssetCapacityPolicy assetCapacityPolicy;
|
||||
private final AssetBankCompositionSessionFactory bankCompositionSessionFactory;
|
||||
private final AssetColorSchemaFactory assetColorSchemaFactory;
|
||||
private final TiledAssetService tiledAssetService;
|
||||
private final SceneBankWorkflow sceneBankWorkflow;
|
||||
private final WindowStateStore windowStateStore;
|
||||
private final ProjectActivityHistoryStore activityHistoryStore;
|
||||
|
||||
public StudioUiFactory(
|
||||
ProjectCatalog projectCatalog,
|
||||
KnownProjects knownProjects,
|
||||
ProjectLanguageCatalog languageCatalog,
|
||||
ProjectSessionFactory projectSessionFactory,
|
||||
ExecutionControllerFactory executionControllerFactory,
|
||||
ProjectWorkspaceInitializer projectWorkspaceInitializer,
|
||||
Executor executor,
|
||||
I18nService i18n,
|
||||
ThemeService theme,
|
||||
StudioEventBus eventBus,
|
||||
Shipper shipper,
|
||||
AssetCatalog assetCatalog,
|
||||
AssetCommands assetCommands,
|
||||
AssetPacking assetPacking,
|
||||
AssetDetails assetDetails,
|
||||
AssetCreationCatalog assetCreationCatalog,
|
||||
AssetMetadataService assetMetadataService,
|
||||
AssetWorkspaceStorage assetWorkspaceStorage,
|
||||
AssetCapacityPolicy assetCapacityPolicy,
|
||||
AssetBankCompositionSessionFactory bankCompositionSessionFactory,
|
||||
AssetColorSchemaFactory assetColorSchemaFactory,
|
||||
TiledAssetService tiledAssetService,
|
||||
SceneBankWorkflow sceneBankWorkflow,
|
||||
WindowStateStore windowStateStore,
|
||||
ProjectActivityHistoryStore activityHistoryStore) {
|
||||
this.projectCatalog = Objects.requireNonNull(projectCatalog, "projectCatalog");
|
||||
this.knownProjects = Objects.requireNonNull(knownProjects, "knownProjects");
|
||||
this.languageCatalog = Objects.requireNonNull(languageCatalog, "languageCatalog");
|
||||
this.projectSessionFactory = Objects.requireNonNull(projectSessionFactory, "projectSessionFactory");
|
||||
this.executionControllerFactory = Objects.requireNonNull(executionControllerFactory, "executionControllerFactory");
|
||||
this.projectWorkspaceInitializer = Objects.requireNonNull(projectWorkspaceInitializer, "projectWorkspaceInitializer");
|
||||
this.executor = Objects.requireNonNull(executor, "executor");
|
||||
this.i18n = Objects.requireNonNull(i18n, "i18n");
|
||||
this.theme = Objects.requireNonNull(theme, "theme");
|
||||
this.eventBus = Objects.requireNonNull(eventBus, "eventBus");
|
||||
this.shipper = Objects.requireNonNull(shipper, "shipper");
|
||||
this.assetCatalog = Objects.requireNonNull(assetCatalog, "assetCatalog");
|
||||
this.assetCommands = Objects.requireNonNull(assetCommands, "assetCommands");
|
||||
this.assetPacking = Objects.requireNonNull(assetPacking, "assetPacking");
|
||||
this.assetDetails = Objects.requireNonNull(assetDetails, "assetDetails");
|
||||
this.assetCreationCatalog = Objects.requireNonNull(assetCreationCatalog, "assetCreationCatalog");
|
||||
this.assetMetadataService = Objects.requireNonNull(assetMetadataService, "assetMetadataService");
|
||||
this.assetWorkspaceStorage = Objects.requireNonNull(assetWorkspaceStorage, "assetWorkspaceStorage");
|
||||
this.assetCapacityPolicy = Objects.requireNonNull(assetCapacityPolicy, "assetCapacityPolicy");
|
||||
this.bankCompositionSessionFactory = Objects.requireNonNull(bankCompositionSessionFactory, "bankCompositionSessionFactory");
|
||||
this.assetColorSchemaFactory = Objects.requireNonNull(assetColorSchemaFactory, "assetColorSchemaFactory");
|
||||
this.tiledAssetService = Objects.requireNonNull(tiledAssetService, "tiledAssetService");
|
||||
this.sceneBankWorkflow = Objects.requireNonNull(sceneBankWorkflow, "sceneBankWorkflow");
|
||||
this.windowStateStore = Objects.requireNonNull(windowStateStore, "windowStateStore");
|
||||
this.activityHistoryStore = Objects.requireNonNull(activityHistoryStore, "activityHistoryStore");
|
||||
}
|
||||
|
||||
public StudioWindowCoordinator create(Stage stage) {
|
||||
return new StudioWindowCoordinator(stage, projectCatalog, knownProjects, languageCatalog, projectSessionFactory,
|
||||
executionControllerFactory, projectWorkspaceInitializer, executor, i18n, theme, eventBus, shipper,
|
||||
assetCatalog, assetCommands, assetPacking, assetDetails, assetCreationCatalog, assetMetadataService,
|
||||
assetWorkspaceStorage, assetCapacityPolicy, bankCompositionSessionFactory, assetColorSchemaFactory,
|
||||
tiledAssetService, sceneBankWorkflow, windowStateStore,
|
||||
activityHistoryStore);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package p.studio.app.compiler;
|
||||
|
||||
import p.studio.api.project.ProjectReference;
|
||||
import p.studio.compiler.messages.BuilderPipelineConfig;
|
||||
import p.studio.compiler.models.BuilderPipelineContext;
|
||||
import p.studio.compiler.workspaces.BuilderPipelineService;
|
||||
import p.studio.core.shipper.CompilerBuildGateway;
|
||||
import p.studio.utilities.logs.LogAggregator;
|
||||
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
public final class CompilerBuildGatewayAdapter implements CompilerBuildGateway {
|
||||
@Override
|
||||
public CompilerBuildOutput compile(ProjectReference project, Consumer<String> logSink) {
|
||||
final var config = new BuilderPipelineConfig(false, project.rootPath().toString());
|
||||
final var result = BuilderPipelineService.INSTANCE.build(
|
||||
BuilderPipelineContext.fromConfig(config),
|
||||
LogAggregator.with(logSink));
|
||||
final var capabilities = new LinkedHashSet<>(
|
||||
result.compileResult().analysisSnapshot().irBackend()
|
||||
.getReservedMetadata().requiredCapabilities().asList());
|
||||
return new CompilerBuildOutput(result.bytecodeArtifactPath(), capabilities.stream().toList());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package p.studio.app.compiler;
|
||||
|
||||
import p.studio.api.project.ProjectLanguageCatalog;
|
||||
import p.studio.api.project.ProjectLanguageTemplate;
|
||||
import p.studio.compiler.FrontendRegistryService;
|
||||
import p.studio.compiler.models.FrontendSpec;
|
||||
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
|
||||
public final class CompilerProjectLanguageCatalog implements ProjectLanguageCatalog {
|
||||
@Override
|
||||
public List<ProjectLanguageTemplate> listLanguageTemplates() {
|
||||
return FrontendRegistryService.listProviders().stream()
|
||||
.map(provider -> toTemplate(provider.specification()))
|
||||
.sorted(Comparator.comparing(ProjectLanguageTemplate::languageId, String.CASE_INSENSITIVE_ORDER))
|
||||
.toList();
|
||||
}
|
||||
|
||||
private ProjectLanguageTemplate toTemplate(FrontendSpec spec) {
|
||||
final List<String> roots = spec.getSourceRoots().stream().sorted(String.CASE_INSENSITIVE_ORDER).toList();
|
||||
final List<ProjectLanguageTemplate.StdlibOption> options = spec.getStdlibVersions().stream()
|
||||
.map(value -> new ProjectLanguageTemplate.StdlibOption(
|
||||
value.version(), ProjectLanguageTemplate.Stability.valueOf(value.type().name())))
|
||||
.sorted(Comparator.comparingInt(ProjectLanguageTemplate.StdlibOption::version))
|
||||
.toList();
|
||||
final ProjectLanguageTemplate.StdlibOption defaultOption = options.stream()
|
||||
.filter(value -> value.stability() == ProjectLanguageTemplate.Stability.DEFAULT)
|
||||
.findFirst().orElseGet(() -> options.isEmpty()
|
||||
? new ProjectLanguageTemplate.StdlibOption(1, ProjectLanguageTemplate.Stability.DEFAULT)
|
||||
: options.getFirst());
|
||||
return new ProjectLanguageTemplate(
|
||||
spec.getLanguageId(), options, defaultOption, roots,
|
||||
roots.isEmpty() ? "src" : roots.getFirst());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package p.studio.app.lsp;
|
||||
|
||||
import p.studio.api.project.ProjectReference;
|
||||
import p.studio.core.session.LspLifecyclePort;
|
||||
import p.studio.lsp.api.LspServerLifecycle;
|
||||
import p.studio.lsp.messages.LspProjectContext;
|
||||
import p.studio.lsp.messages.LspServerConfiguration;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public final class LspLifecycleAdapter implements LspLifecyclePort {
|
||||
private final LspServerLifecycle lifecycle;
|
||||
|
||||
public LspLifecycleAdapter(LspServerLifecycle lifecycle) {
|
||||
this.lifecycle = Objects.requireNonNull(lifecycle, "lifecycle");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void boot(ProjectReference project) {
|
||||
lifecycle.bootServer(LspServerConfiguration.defaults(), context(project));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void shutdown(ProjectReference project) {
|
||||
lifecycle.shutdownServer(context(project));
|
||||
}
|
||||
|
||||
private static LspProjectContext context(ProjectReference project) {
|
||||
final var safeProject = Objects.requireNonNull(project, "project");
|
||||
return new LspProjectContext(
|
||||
safeProject.rootPath().toAbsolutePath().normalize().toString(),
|
||||
safeProject.languageId(),
|
||||
safeProject.rootPath());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,161 @@
|
||||
package p.studio.app.operation;
|
||||
|
||||
import p.studio.api.operation.OperationExecutor;
|
||||
import p.studio.api.operation.OperationHandle;
|
||||
import p.studio.api.operation.OperationId;
|
||||
import p.studio.api.operation.OperationSnapshot;
|
||||
import p.studio.api.operation.OperationState;
|
||||
import p.studio.api.operation.OperationSubscription;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.util.Objects;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.Callable;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.CompletionStage;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Future;
|
||||
import java.util.concurrent.FutureTask;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
public final class ExecutorOperationExecutor implements OperationExecutor {
|
||||
private final ExecutorService executor;
|
||||
|
||||
public ExecutorOperationExecutor(ExecutorService executor) {
|
||||
this.executor = Objects.requireNonNull(executor, "executor");
|
||||
}
|
||||
|
||||
@Override
|
||||
public <R> OperationHandle<R> submit(String summary, Callable<R> operation) {
|
||||
final ExecutorOperationHandle<R> handle = new ExecutorOperationHandle<>(summary, operation);
|
||||
handle.start(executor);
|
||||
return handle;
|
||||
}
|
||||
|
||||
private static final class ExecutorOperationHandle<R> implements OperationHandle<R> {
|
||||
private final OperationId id = new OperationId(UUID.randomUUID().toString());
|
||||
private final String summary;
|
||||
private final Callable<R> operation;
|
||||
private final CompletableFuture<R> completion = new CompletableFuture<>();
|
||||
private final CopyOnWriteArrayList<Consumer<OperationSnapshot>> subscribers = new CopyOnWriteArrayList<>();
|
||||
private final AtomicReference<OperationSnapshot> snapshot;
|
||||
private volatile Future<?> task;
|
||||
|
||||
private ExecutorOperationHandle(String summary, Callable<R> operation) {
|
||||
this.summary = Objects.requireNonNullElse(summary, "");
|
||||
this.operation = Objects.requireNonNull(operation, "operation");
|
||||
this.snapshot = new AtomicReference<>(new OperationSnapshot(id, OperationState.PENDING, Instant.now(), this.summary));
|
||||
}
|
||||
|
||||
private void start(ExecutorService executor) {
|
||||
final FutureTask<Void> submitted = new FutureTask<>(() -> {
|
||||
try {
|
||||
final R result = operation.call();
|
||||
if (transitionTerminal(OperationState.SUCCEEDED, summary)) {
|
||||
completion.complete(result);
|
||||
}
|
||||
} catch (Throwable failure) {
|
||||
if (transitionTerminal(OperationState.FAILED, failureSummary(failure))) {
|
||||
completion.completeExceptionally(failure);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
});
|
||||
task = submitted;
|
||||
try {
|
||||
transition(OperationState.RUNNING, summary);
|
||||
executor.execute(submitted);
|
||||
} catch (RuntimeException failure) {
|
||||
if (transitionTerminal(OperationState.FAILED, failureSummary(failure))) {
|
||||
completion.completeExceptionally(failure);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public OperationId id() {
|
||||
return id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public OperationSnapshot snapshot() {
|
||||
return snapshot.get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletionStage<R> completion() {
|
||||
return completion;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean cancel() {
|
||||
while (true) {
|
||||
final OperationSnapshot current = snapshot.get();
|
||||
if (terminal(current.state())) {
|
||||
return false;
|
||||
}
|
||||
final OperationSnapshot cancelled = new OperationSnapshot(id, OperationState.CANCELLED, Instant.now(), summary);
|
||||
if (snapshot.compareAndSet(current, cancelled)) {
|
||||
final Future<?> submitted = task;
|
||||
if (submitted != null) {
|
||||
submitted.cancel(true);
|
||||
}
|
||||
completion.cancel(false);
|
||||
publish(cancelled);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public OperationSubscription subscribe(Consumer<OperationSnapshot> subscriber) {
|
||||
final Consumer<OperationSnapshot> listener = Objects.requireNonNull(subscriber, "subscriber");
|
||||
subscribers.add(listener);
|
||||
notifySubscriber(listener, snapshot.get());
|
||||
return () -> subscribers.remove(listener);
|
||||
}
|
||||
|
||||
private void transition(OperationState state, String message) {
|
||||
final OperationSnapshot next = new OperationSnapshot(id, state, Instant.now(), message);
|
||||
snapshot.set(next);
|
||||
publish(next);
|
||||
}
|
||||
|
||||
private boolean transitionTerminal(OperationState state, String message) {
|
||||
while (true) {
|
||||
final OperationSnapshot current = snapshot.get();
|
||||
if (terminal(current.state())) {
|
||||
return false;
|
||||
}
|
||||
final OperationSnapshot next = new OperationSnapshot(id, state, Instant.now(), message);
|
||||
if (snapshot.compareAndSet(current, next)) {
|
||||
publish(next);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void publish(OperationSnapshot value) {
|
||||
subscribers.forEach(subscriber -> notifySubscriber(subscriber, value));
|
||||
}
|
||||
|
||||
private static void notifySubscriber(Consumer<OperationSnapshot> subscriber, OperationSnapshot value) {
|
||||
try {
|
||||
subscriber.accept(value);
|
||||
} catch (RuntimeException ignored) {
|
||||
// Observation must not change operation completion.
|
||||
}
|
||||
}
|
||||
|
||||
private static boolean terminal(OperationState state) {
|
||||
return state == OperationState.SUCCEEDED || state == OperationState.FAILED || state == OperationState.CANCELLED;
|
||||
}
|
||||
|
||||
private String failureSummary(Throwable failure) {
|
||||
final String message = failure.getMessage();
|
||||
return message == null || message.isBlank() ? summary : message;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,159 @@
|
||||
package p.studio.app.runtime;
|
||||
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import p.studio.api.project.ProjectLocalStudioSetup;
|
||||
import p.studio.api.project.ProjectReference;
|
||||
import p.studio.api.runtime.RuntimeLogEntry;
|
||||
import p.studio.core.runtime.RuntimeConnection;
|
||||
import p.studio.core.runtime.RuntimeGateway;
|
||||
|
||||
import java.io.*;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.net.Socket;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.Executor;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
public final class ExternalRuntimeGateway implements RuntimeGateway {
|
||||
private static final int DEBUG_PORT = 7777;
|
||||
private final ObjectMapper mapper;
|
||||
private final Executor executor;
|
||||
|
||||
public ExternalRuntimeGateway(ObjectMapper mapper, Executor executor) {
|
||||
this.mapper = Objects.requireNonNull(mapper, "mapper");
|
||||
this.executor = Objects.requireNonNull(executor, "executor");
|
||||
}
|
||||
|
||||
@Override
|
||||
public RuntimeConnection start(ProjectReference project, ProjectLocalStudioSetup setup,
|
||||
Consumer<RuntimeLogEntry> logs) throws Exception {
|
||||
final Consumer<RuntimeLogEntry> sink = Objects.requireNonNull(logs, "logs");
|
||||
final Path executable = resolveExecutable(setup);
|
||||
final Process process = new ProcessBuilder(executable.toString(), "debug", "build")
|
||||
.directory(project.rootPath().toFile()).start();
|
||||
stream(process.getInputStream(), false, sink);
|
||||
stream(process.getErrorStream(), true, sink);
|
||||
try {
|
||||
final Socket socket = connectWithRetry();
|
||||
final BufferedReader reader = new BufferedReader(new InputStreamReader(socket.getInputStream(), StandardCharsets.UTF_8));
|
||||
final BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(socket.getOutputStream(), StandardCharsets.UTF_8));
|
||||
final JsonNode handshake = mapper.readTree(requireLine(reader, "connection closed during handshake"));
|
||||
if (handshake == null || !"handshake".equals(handshake.path("type").asText())) {
|
||||
throw new IOException("invalid runtime handshake");
|
||||
}
|
||||
writer.write("{\"type\":\"start\"}");
|
||||
writer.newLine();
|
||||
writer.flush();
|
||||
sink.accept(RuntimeLogEntry.info("Runtime protocol %d (%s)".formatted(
|
||||
handshake.path("protocol_version").asInt(), handshake.path("runtime_version").asText("unknown"))));
|
||||
final var connection = new ProcessRuntimeConnection(process, socket, reader, writer);
|
||||
executor.execute(() -> receive(reader, sink, connection));
|
||||
return connection;
|
||||
} catch (Exception failure) {
|
||||
process.descendants().forEach(ProcessHandle::destroyForcibly);
|
||||
process.destroyForcibly();
|
||||
throw failure;
|
||||
}
|
||||
}
|
||||
|
||||
private static Path resolveExecutable(ProjectLocalStudioSetup setup) throws IOException {
|
||||
if (setup.prometeuRuntimePath() == null) throw new IOException("prometeuRuntimePath is missing");
|
||||
final Path executable = Path.of(setup.prometeuRuntimePath()).resolve("prometeu").toAbsolutePath().normalize();
|
||||
if (!Files.isRegularFile(executable)) throw new IOException("runtime not found at " + executable);
|
||||
if (!Files.isExecutable(executable)) throw new IOException("runtime is not executable at " + executable);
|
||||
return executable;
|
||||
}
|
||||
|
||||
private Socket connectWithRetry() throws IOException {
|
||||
IOException failure = null;
|
||||
for (int attempt = 0; attempt < 20; attempt++) {
|
||||
final Socket socket = new Socket();
|
||||
try {
|
||||
socket.connect(new InetSocketAddress("127.0.0.1", DEBUG_PORT), 500);
|
||||
socket.setSoTimeout(5_000);
|
||||
return socket;
|
||||
} catch (IOException exception) {
|
||||
failure = exception;
|
||||
closeQuietly(socket);
|
||||
try { Thread.sleep(100L); } catch (InterruptedException interrupted) {
|
||||
Thread.currentThread().interrupt();
|
||||
throw new IOException("runtime connection interrupted", interrupted);
|
||||
}
|
||||
}
|
||||
}
|
||||
throw failure == null ? new IOException("runtime connection failed") : failure;
|
||||
}
|
||||
|
||||
private void stream(InputStream stream, boolean error, Consumer<RuntimeLogEntry> sink) {
|
||||
executor.execute(() -> {
|
||||
try (var reader = new BufferedReader(new InputStreamReader(stream, StandardCharsets.UTF_8))) {
|
||||
String line;
|
||||
while ((line = reader.readLine()) != null) sink.accept(error ? RuntimeLogEntry.error(line) : RuntimeLogEntry.info(line));
|
||||
} catch (IOException ignored) { }
|
||||
});
|
||||
}
|
||||
|
||||
private void receive(BufferedReader reader, Consumer<RuntimeLogEntry> sink, ProcessRuntimeConnection connection) {
|
||||
try {
|
||||
String line;
|
||||
while ((line = reader.readLine()) != null) {
|
||||
final JsonNode event = mapper.readTree(line);
|
||||
if (event != null && "log".equals(event.path("event").asText())) {
|
||||
final String source = event.path("source").asText("");
|
||||
final String message = event.path("msg").asText("");
|
||||
final String rendered = source.isBlank() ? message : "[" + source + "] " + message;
|
||||
final boolean error = switch (event.path("level").asText("").toUpperCase()) {
|
||||
case "ERROR", "FATAL" -> true;
|
||||
default -> false;
|
||||
};
|
||||
sink.accept(error ? RuntimeLogEntry.error(rendered) : RuntimeLogEntry.info(rendered));
|
||||
}
|
||||
}
|
||||
} catch (IOException failure) {
|
||||
if (!connection.closed) sink.accept(RuntimeLogEntry.error("Runtime debug connection lost: " + failure.getMessage()));
|
||||
}
|
||||
}
|
||||
|
||||
private static String requireLine(BufferedReader reader, String message) throws IOException {
|
||||
final String line = reader.readLine();
|
||||
if (line == null) throw new IOException(message);
|
||||
return line;
|
||||
}
|
||||
|
||||
private static void closeQuietly(Closeable closeable) {
|
||||
if (closeable == null) return;
|
||||
try { closeable.close(); } catch (IOException ignored) { }
|
||||
}
|
||||
|
||||
private static final class ProcessRuntimeConnection implements RuntimeConnection {
|
||||
private final Process process;
|
||||
private final Socket socket;
|
||||
private final Reader reader;
|
||||
private final Writer writer;
|
||||
private volatile boolean closed;
|
||||
|
||||
private ProcessRuntimeConnection(Process process, Socket socket, Reader reader, Writer writer) {
|
||||
this.process = process;
|
||||
this.socket = socket;
|
||||
this.reader = reader;
|
||||
this.writer = writer;
|
||||
}
|
||||
|
||||
@Override public CompletableFuture<Integer> completion() { return process.onExit().thenApply(Process::exitValue); }
|
||||
|
||||
@Override public void close() {
|
||||
if (closed) return;
|
||||
closed = true;
|
||||
closeQuietly(reader);
|
||||
closeQuietly(writer);
|
||||
closeQuietly(socket);
|
||||
process.descendants().forEach(ProcessHandle::destroyForcibly);
|
||||
process.destroyForcibly();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package p.studio.app;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.boot.WebApplicationType;
|
||||
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||
import org.springframework.context.ConfigurableApplicationContext;
|
||||
import p.packer.PackerWorkspaceService;
|
||||
import p.studio.api.operation.OperationExecutor;
|
||||
|
||||
import java.util.concurrent.ExecutorService;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
class StudioApplicationConfigurationTest {
|
||||
@Test
|
||||
void bootsAndClosesWithoutAWebApplicationContext() {
|
||||
final ConfigurableApplicationContext context = new SpringApplicationBuilder(StudioApplicationConfiguration.class)
|
||||
.web(WebApplicationType.NONE)
|
||||
.headless(true)
|
||||
.run();
|
||||
final ExecutorService executor = context.getBean(ExecutorService.class);
|
||||
try (context) {
|
||||
assertNotNull(context.getBean(StudioUiFactory.class));
|
||||
assertNotNull(context.getBean(PackerWorkspaceService.class));
|
||||
assertNotNull(context.getBean(OperationExecutor.class));
|
||||
assertFalse(context.getClass().getName().contains("WebServer"));
|
||||
assertFalse(executor.isShutdown());
|
||||
}
|
||||
assertTrue(executor.isShutdown());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package p.studio.app;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import p.packer.events.PackerEvent;
|
||||
import p.packer.events.PackerEventKind;
|
||||
import p.packer.events.PackerProgress;
|
||||
import p.studio.ui.javafx.events.StudioEventBus;
|
||||
import p.studio.ui.javafx.events.StudioPackerOperationEvent;
|
||||
import p.studio.ui.javafx.events.StudioPackerOperationKind;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
final class StudioPackerEventAdapterTest {
|
||||
@Test
|
||||
void translatesProviderEventsIntoStudioEvents() {
|
||||
final StudioEventBus globalBus = new StudioEventBus();
|
||||
final List<StudioPackerOperationEvent> events = new ArrayList<>();
|
||||
globalBus.subscribe(StudioPackerOperationEvent.class, events::add);
|
||||
|
||||
new StudioPackerEventAdapter(globalBus).publish(new PackerEvent(
|
||||
"main", "op-1", 0L, PackerEventKind.ASSET_DISCOVERED, Instant.now(),
|
||||
"Discovered asset.", new PackerProgress(0.25d, false), List.of("ui_atlas")));
|
||||
|
||||
assertEquals(1, events.size());
|
||||
assertEquals(StudioPackerOperationKind.ASSET_DISCOVERED, events.getFirst().kind());
|
||||
assertEquals(0.25d, events.getFirst().progress());
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
package p.studio.app.compiler;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import p.studio.compiler.FrontendRegistryService;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
class CompilerProjectLanguageCatalogTest {
|
||||
@Test
|
||||
void listsLanguagesFromRegisteredProviders() {
|
||||
FrontendRegistryService.bootstrapDefaults();
|
||||
|
||||
final var templates = new CompilerProjectLanguageCatalog().listLanguageTemplates();
|
||||
|
||||
assertEquals(1, templates.size());
|
||||
assertEquals("pbs", templates.getFirst().languageId());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package p.studio.app.operation;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import p.studio.api.operation.OperationState;
|
||||
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
final class ExecutorOperationExecutorTest {
|
||||
@Test
|
||||
void completesWithTypedResultAndTerminalSnapshot() throws Exception {
|
||||
final var executor = Executors.newSingleThreadExecutor();
|
||||
try {
|
||||
final var handle = new ExecutorOperationExecutor(executor).submit("test operation", () -> 42);
|
||||
|
||||
assertEquals(42, handle.completion().toCompletableFuture().get(2, TimeUnit.SECONDS));
|
||||
assertEquals(OperationState.SUCCEEDED, handle.snapshot().state());
|
||||
assertEquals("test operation", handle.snapshot().summary());
|
||||
} finally {
|
||||
executor.shutdownNow();
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
void cancellationInterruptsWorkAndCancelsCompletion() throws Exception {
|
||||
final var executor = Executors.newSingleThreadExecutor();
|
||||
final var started = new CountDownLatch(1);
|
||||
try {
|
||||
final var handle = new ExecutorOperationExecutor(executor).submit("cancel operation", () -> {
|
||||
started.countDown();
|
||||
new CountDownLatch(1).await();
|
||||
return 42;
|
||||
});
|
||||
assertTrue(started.await(2, TimeUnit.SECONDS));
|
||||
|
||||
assertTrue(handle.cancel());
|
||||
assertEquals(OperationState.CANCELLED, handle.snapshot().state());
|
||||
assertThrows(java.util.concurrent.CancellationException.class,
|
||||
() -> handle.completion().toCompletableFuture().join());
|
||||
} finally {
|
||||
executor.shutdownNow();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,11 @@ dependencies {
|
||||
testImplementation(project(":prometeu-infra"))
|
||||
testImplementation(project(":prometeu-lsp:prometeu-lsp-api"))
|
||||
testImplementation(project(":prometeu-lsp:prometeu-lsp-v1"))
|
||||
testImplementation(project(":prometeu-studio"))
|
||||
testImplementation(project(":prometeu-packer:prometeu-packer-api"))
|
||||
testImplementation(project(":prometeu-packer:prometeu-packer-v1"))
|
||||
testImplementation(project(":prometeu-studio-api"))
|
||||
testImplementation(project(":prometeu-studio-core"))
|
||||
testImplementation(project(":prometeu-studio-ui-javafx"))
|
||||
testImplementation(project(":prometeu-app"))
|
||||
}
|
||||
|
||||
|
||||
+90
@@ -0,0 +1,90 @@
|
||||
package p.studio.architecture;
|
||||
|
||||
import com.tngtech.archunit.core.importer.ImportOption;
|
||||
import com.tngtech.archunit.junit.AnalyzeClasses;
|
||||
import com.tngtech.archunit.junit.ArchTest;
|
||||
import com.tngtech.archunit.lang.ArchRule;
|
||||
|
||||
import static com.tngtech.archunit.lang.syntax.ArchRuleDefinition.noClasses;
|
||||
|
||||
@AnalyzeClasses(packages = {"p.studio", "p.packer"}, importOptions = ImportOption.DoNotIncludeTests.class)
|
||||
class StudioBoundaryArchTest {
|
||||
@ArchTest
|
||||
static final ArchRule staticContainerCannotReturn = noClasses()
|
||||
.that().resideInAnyPackage("p.studio..")
|
||||
.should().haveSimpleName("Container")
|
||||
.because("DEC-0059 requires the static service locator to be physically absent");
|
||||
|
||||
@ArchTest
|
||||
static final ArchRule appContainerCompatibilityBridgeCannotReturn = noClasses()
|
||||
.that().resideInAnyPackage("p.studio..")
|
||||
.should().haveSimpleName("AppContainer")
|
||||
.because("DEC-0059 requires Spring composition without a legacy service bag");
|
||||
|
||||
@ArchTest
|
||||
static final ArchRule studioApiIsFrameworkAndProviderNeutral = noClasses()
|
||||
.that().resideInAPackage("p.studio.api..")
|
||||
.should().dependOnClassesThat().resideInAnyPackage(
|
||||
"javafx..",
|
||||
"org.springframework..",
|
||||
"org.springframework.modulith..",
|
||||
"p.packer..",
|
||||
"p.studio.compiler..",
|
||||
"p.studio.lsp..",
|
||||
"p.studio.utilities..",
|
||||
"p.studio.core..",
|
||||
"p.studio.ui..")
|
||||
.because("DEC-0059 requires a toolkit and provider neutral public Studio API");
|
||||
|
||||
@ArchTest
|
||||
static final ArchRule studioCoreDoesNotDependOnJavaFx = noClasses()
|
||||
.that().resideInAPackage("p.studio.core..")
|
||||
.should().dependOnClassesThat().resideInAPackage("javafx..")
|
||||
.because("DEC-0059 requires the Studio Core to compile without JavaFX");
|
||||
|
||||
@ArchTest
|
||||
static final ArchRule studioCoreDoesNotDependOnSpring = noClasses()
|
||||
.that().resideInAPackage("p.studio.core..")
|
||||
.should().dependOnClassesThat().resideInAPackage("org.springframework..")
|
||||
.because("DEC-0059 confines Spring to application composition and keeps core as constructor-injected POJOs");
|
||||
|
||||
@ArchTest
|
||||
static final ArchRule studioCoreDoesNotDependOnLegacySharedInfrastructure = noClasses()
|
||||
.that().resideInAPackage("p.studio.core..")
|
||||
.should().dependOnClassesThat().resideInAPackage("p.studio.utilities..")
|
||||
.because("DEC-0059 requires the extracted core to own explicit contracts instead of inheriting the mixed Studio utility classpath");
|
||||
|
||||
@ArchTest
|
||||
static final ArchRule javaFxAdapterDoesNotDependOnCoreOrProviderImplementations = noClasses()
|
||||
.that().resideInAPackage("p.studio.ui.javafx..")
|
||||
.should().dependOnClassesThat().resideInAnyPackage(
|
||||
"p.studio.core..",
|
||||
"p.packer..",
|
||||
"p.studio.compiler..",
|
||||
"p.studio.lsp..",
|
||||
"p.studio.utilities..")
|
||||
.because("DEC-0059 requires JavaFX to consume Studio API contracts only");
|
||||
|
||||
@ArchTest
|
||||
static final ArchRule javaFxAdapterDoesNotOrchestrateTheFileSystem = noClasses()
|
||||
.that().resideInAPackage("p.studio.ui.javafx..")
|
||||
.should().dependOnClassesThat().haveFullyQualifiedName("java.nio.file.Files")
|
||||
.because("DEC-0059 keeps filesystem orchestration behind neutral Studio services");
|
||||
|
||||
@ArchTest
|
||||
static final ArchRule javaFxAdapterDoesNotOwnSerialization = noClasses()
|
||||
.that().resideInAPackage("p.studio.ui.javafx..")
|
||||
.should().dependOnClassesThat().resideInAPackage("com.fasterxml.jackson..")
|
||||
.because("DEC-0059 keeps serialization in core or application adapters, not visual controls");
|
||||
|
||||
@ArchTest
|
||||
static final ArchRule packerDoesNotDependOnStudio = noClasses()
|
||||
.that().resideInAPackage("p.packer..")
|
||||
.should().dependOnClassesThat().resideInAnyPackage(
|
||||
"p.studio.api..",
|
||||
"p.studio.core..",
|
||||
"p.studio.ui..",
|
||||
"p.studio.ui.javafx.window..",
|
||||
"p.studio.ui.javafx.workspaces..")
|
||||
.because("DEC-0059 keeps p.packer autonomous and dependency direction Studio to Packer");
|
||||
}
|
||||
+267
-1
@@ -13,10 +13,24 @@ import p.studio.compiler.pbs.semantics.PbsEditorialSignatureHelp;
|
||||
import p.studio.compiler.pbs.semantics.PbsEditorialSymbolKind;
|
||||
import p.studio.compiler.pbs.semantics.PbsEditorialSupportService;
|
||||
import p.studio.compiler.pbs.semantics.PbsEditorialSupportService.EditorialDocument;
|
||||
import p.studio.compiler.models.SourceKind;
|
||||
import p.studio.compiler.pbs.semantics.PbsEditorialRename;
|
||||
import p.studio.compiler.pbs.semantics.PbsEditorialWorkspaceSymbol;
|
||||
import p.studio.compiler.pbs.PbsCallHierarchy;
|
||||
import p.studio.compiler.pbs.PbsDocumentFormatter;
|
||||
import p.studio.compiler.pbs.PbsSemanticTokenOverlay;
|
||||
import p.studio.compiler.pbs.PbsStructureRanges;
|
||||
import p.studio.compiler.pbs.semantics.PbsQuickFix;
|
||||
import p.studio.compiler.pbs.semantics.PbsQuickFixCollector;
|
||||
import p.studio.compiler.services.PBSFrontendPhaseService.PbsSemanticReadSurface;
|
||||
import p.studio.compiler.services.FrontendCallHierarchyItem;
|
||||
import p.studio.compiler.services.FrontendCallSite;
|
||||
import p.studio.compiler.services.FrontendCodeAction;
|
||||
import p.studio.compiler.services.FrontendCompletionCandidate;
|
||||
import p.studio.compiler.services.FrontendSymbolKind;
|
||||
import p.studio.compiler.services.FrontendDocumentLink;
|
||||
import p.studio.compiler.services.FrontendFoldingRange;
|
||||
import p.studio.compiler.services.FrontendSelectionRange;
|
||||
import p.studio.compiler.services.FrontendDefinitionLocation;
|
||||
import p.studio.compiler.services.FrontendDocumentRequest;
|
||||
import p.studio.compiler.services.FrontendDocumentSymbol;
|
||||
@@ -36,6 +50,7 @@ import p.studio.compiler.source.Span;
|
||||
import p.studio.compiler.source.diagnostics.DiagnosticSink;
|
||||
import p.studio.compiler.source.identifiers.FileId;
|
||||
import p.studio.compiler.source.tables.FileTableReader;
|
||||
import p.studio.compiler.source.tables.ModuleReference;
|
||||
import p.studio.utilities.structures.ReadOnlyList;
|
||||
|
||||
import java.nio.file.Files;
|
||||
@@ -124,6 +139,10 @@ public final class PBSFrontendLanguageService implements FrontendLanguageService
|
||||
return List.of();
|
||||
}
|
||||
|
||||
if (insideModuleRef(ast, offset)
|
||||
&& editorialContext.projectSurface() instanceof PbsSemanticReadSurface surface) {
|
||||
return moduleCompletions(surface.moduleCompletionLabels());
|
||||
}
|
||||
@SuppressWarnings("unchecked")
|
||||
final ReadOnlyList<PbsAst.TopDecl> typedSupplementalTopDecls =
|
||||
(ReadOnlyList<PbsAst.TopDecl>) supplementalTopDecls;
|
||||
@@ -397,6 +416,193 @@ public final class PBSFrontendLanguageService implements FrontendLanguageService
|
||||
return FrontendRenameResult.applied(List.copyOf(edits.values()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean documentLinksSupported() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FrontendDocumentLink> documentLinks(
|
||||
final FrontendDocumentRequest request,
|
||||
final FrontendEditorialContext editorialContext) {
|
||||
if (request == null
|
||||
|| editorialContext == null
|
||||
|| !(editorialContext.syntaxTree() instanceof PbsAst.File ast)
|
||||
|| !(editorialContext.projectSurface() instanceof PbsSemanticReadSurface surface)
|
||||
|| surface.physicalModuleFileByReference() == null
|
||||
|| ast.imports() == null) {
|
||||
return List.of();
|
||||
}
|
||||
final ArrayList<FrontendDocumentLink> links = new ArrayList<>();
|
||||
for (final PbsAst.ImportDecl importDecl : ast.imports()) {
|
||||
if (importDecl == null || importDecl.moduleRef() == null) {
|
||||
continue;
|
||||
}
|
||||
final PbsAst.ModuleRef moduleRef = importDecl.moduleRef();
|
||||
final Span span = moduleRef.span();
|
||||
if (span == null || span.isNone() || moduleRef.project() == null || moduleRef.project().isBlank()) {
|
||||
continue;
|
||||
}
|
||||
final Path target = surface.physicalModuleFileByReference().get(
|
||||
new ModuleReference(moduleRef.project(), moduleRef.pathSegments()));
|
||||
if (target == null) {
|
||||
continue;
|
||||
}
|
||||
links.add(new FrontendDocumentLink(
|
||||
target,
|
||||
toOffset(span.getStart()),
|
||||
toOffset(span.getEnd())));
|
||||
}
|
||||
return List.copyOf(links);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean foldingRangesSupported() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FrontendFoldingRange> foldingRanges(
|
||||
final FrontendDocumentRequest request,
|
||||
final FrontendEditorialContext editorialContext) {
|
||||
return PbsStructureRanges.foldingRanges(request == null || request.documentText() == null
|
||||
? ""
|
||||
: request.documentText());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean selectionRangesSupported() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FrontendSelectionRange> selectionRanges(
|
||||
final FrontendDocumentRequest request,
|
||||
final FrontendEditorialContext editorialContext,
|
||||
final List<Integer> offsets) {
|
||||
return PbsStructureRanges.selectionRanges(
|
||||
request == null || request.documentText() == null ? "" : request.documentText(),
|
||||
offsets);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean callHierarchySupported() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FrontendCallHierarchyItem> prepareCallHierarchy(
|
||||
final FrontendDocumentRequest request,
|
||||
final FrontendEditorialContext editorialContext,
|
||||
final int offset) {
|
||||
final PbsAst.File ast = callHierarchyAst(editorialContext);
|
||||
if (ast == null) {
|
||||
return List.of();
|
||||
}
|
||||
return PbsCallHierarchy.prepare(ast, offset).stream().map(this::toCallItem).toList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FrontendCallSite> incomingCalls(
|
||||
final FrontendDocumentRequest request,
|
||||
final FrontendEditorialContext editorialContext,
|
||||
final FrontendCallHierarchyItem target) {
|
||||
return callSites(callHierarchyAst(editorialContext), target, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FrontendCallSite> outgoingCalls(
|
||||
final FrontendDocumentRequest request,
|
||||
final FrontendEditorialContext editorialContext,
|
||||
final FrontendCallHierarchyItem target) {
|
||||
return callSites(callHierarchyAst(editorialContext), target, false);
|
||||
}
|
||||
|
||||
private List<FrontendCallSite> callSites(
|
||||
final PbsAst.File ast,
|
||||
final FrontendCallHierarchyItem target,
|
||||
final boolean incoming) {
|
||||
if (ast == null || target == null) {
|
||||
return List.of();
|
||||
}
|
||||
final PbsCallHierarchy.Callable callable = new PbsCallHierarchy.Callable(
|
||||
target.name(),
|
||||
target.method(),
|
||||
target.startOffset(),
|
||||
target.endOffset());
|
||||
final var calls = incoming
|
||||
? PbsCallHierarchy.incomingCalls(ast, callable)
|
||||
: PbsCallHierarchy.outgoingCalls(ast, callable);
|
||||
return calls.stream()
|
||||
.map(call -> new FrontendCallSite(
|
||||
toCallItem(incoming ? call.caller() : call.callee()),
|
||||
call.startOffset(),
|
||||
call.endOffset()))
|
||||
.toList();
|
||||
}
|
||||
|
||||
private static PbsAst.File callHierarchyAst(final FrontendEditorialContext editorialContext) {
|
||||
if (editorialContext == null || !(editorialContext.syntaxTree() instanceof PbsAst.File ast)) {
|
||||
return null;
|
||||
}
|
||||
return ast;
|
||||
}
|
||||
|
||||
private FrontendCallHierarchyItem toCallItem(final PbsCallHierarchy.Callable callable) {
|
||||
return new FrontendCallHierarchyItem(
|
||||
callable.name(),
|
||||
callable.method(),
|
||||
callable.startOffset(),
|
||||
callable.endOffset());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean formattingSupported() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Optional<String> formatDocument(final FrontendDocumentRequest request) {
|
||||
return Optional.of(PbsDocumentFormatter.format(
|
||||
request == null || request.documentText() == null ? "" : request.documentText()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean codeActionsSupported() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FrontendCodeAction> codeActions(
|
||||
final FrontendDocumentRequest request,
|
||||
final FrontendEditorialContext editorialContext) {
|
||||
if (request == null
|
||||
|| editorialContext == null
|
||||
|| !(editorialContext.syntaxTree() instanceof PbsAst.File ast)
|
||||
|| !(editorialContext.sourceFiles() instanceof FileTableReader fileTable)) {
|
||||
return List.of();
|
||||
}
|
||||
final FileId fileId = ast.span() == null ? null : ast.span().getFileId();
|
||||
final Path path = pathForRegularSource(fileId, fileTable);
|
||||
if (path == null || !path.equals(request.documentPath().toAbsolutePath().normalize())) {
|
||||
return List.of();
|
||||
}
|
||||
final boolean interfaceModule = editorialContext.projectSurface() instanceof PbsSemanticReadSurface surface
|
||||
&& surface.sourceKindByFile() != null
|
||||
&& surface.sourceKindByFile().get(fileId) == SourceKind.SDK_INTERFACE;
|
||||
final ArrayList<FrontendCodeAction> actions = new ArrayList<>();
|
||||
for (final PbsQuickFix repair : PbsQuickFixCollector.collect(ast, interfaceModule)) {
|
||||
actions.add(new FrontendCodeAction(
|
||||
repair.title(),
|
||||
repair.diagnosticCode(),
|
||||
path,
|
||||
repair.startOffset(),
|
||||
repair.endOffset(),
|
||||
repair.newText()));
|
||||
}
|
||||
return List.copyOf(actions);
|
||||
}
|
||||
|
||||
private PbsEditorialRename editorialRename(
|
||||
final FrontendDocumentRequest request,
|
||||
final FrontendEditorialContext editorialContext,
|
||||
@@ -437,13 +643,73 @@ public final class PBSFrontendLanguageService implements FrontendLanguageService
|
||||
|
||||
@Override
|
||||
public List<FrontendSemanticToken> semanticTokens(final FrontendDocumentRequest request) {
|
||||
return semanticTokens(request == null ? "" : request.documentText());
|
||||
return semanticTokens(request, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FrontendSemanticToken> semanticTokens(
|
||||
final FrontendDocumentRequest request,
|
||||
final FrontendEditorialContext editorialContext) {
|
||||
final String text = request == null || request.documentText() == null ? "" : request.documentText();
|
||||
final List<FrontendSemanticToken> baseline = semanticTokenProvider.tokenize(text);
|
||||
if (editorialContext == null
|
||||
|| !(editorialContext.syntaxTree() instanceof PbsAst.File ast)
|
||||
|| !(editorialContext.supplementalDeclarations() instanceof ReadOnlyList<?> supplementalTopDecls)
|
||||
|| !(editorialContext.semanticContext() instanceof FESurfaceContext feSurfaceContext)) {
|
||||
return baseline;
|
||||
}
|
||||
@SuppressWarnings("unchecked")
|
||||
final ReadOnlyList<PbsAst.TopDecl> typedSupplementalTopDecls =
|
||||
(ReadOnlyList<PbsAst.TopDecl>) supplementalTopDecls;
|
||||
return PbsSemanticTokenOverlay.apply(
|
||||
baseline,
|
||||
text,
|
||||
ast,
|
||||
typedSupplementalTopDecls,
|
||||
feSurfaceContext,
|
||||
editorialSupportService);
|
||||
}
|
||||
|
||||
public List<FrontendSemanticToken> semanticTokens(final String documentText) {
|
||||
return semanticTokenProvider.tokenize(documentText == null ? "" : documentText);
|
||||
}
|
||||
|
||||
private static boolean insideModuleRef(final PbsAst.File ast, final int offset) {
|
||||
if (ast == null || ast.imports() == null || offset < 0) {
|
||||
return false;
|
||||
}
|
||||
for (final PbsAst.ImportDecl importDecl : ast.imports()) {
|
||||
if (importDecl == null || importDecl.moduleRef() == null || importDecl.moduleRef().span() == null) {
|
||||
continue;
|
||||
}
|
||||
final long start = importDecl.moduleRef().span().getStart();
|
||||
final long end = importDecl.moduleRef().span().getEnd();
|
||||
if (end > start && start <= offset && offset <= end) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private static List<FrontendCompletionCandidate> moduleCompletions(final List<String> labels) {
|
||||
if (labels == null || labels.isEmpty()) {
|
||||
return List.of();
|
||||
}
|
||||
final ArrayList<FrontendCompletionCandidate> candidates = new ArrayList<>();
|
||||
for (final String label : labels) {
|
||||
if (label == null || label.isBlank()) {
|
||||
continue;
|
||||
}
|
||||
candidates.add(new FrontendCompletionCandidate(
|
||||
label,
|
||||
FrontendSymbolKind.MODULE,
|
||||
"module",
|
||||
"",
|
||||
""));
|
||||
}
|
||||
return List.copyOf(candidates);
|
||||
}
|
||||
|
||||
private FrontendCompletionCandidate toFrontendCompletionCandidate(final PbsEditorialCompletionCandidate candidate) {
|
||||
return new FrontendCompletionCandidate(
|
||||
candidate.label(),
|
||||
|
||||
+335
@@ -0,0 +1,335 @@
|
||||
package p.studio.compiler.pbs;
|
||||
|
||||
import p.studio.compiler.pbs.ast.PbsAst;
|
||||
import p.studio.compiler.source.Span;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public final class PbsCallHierarchy {
|
||||
private PbsCallHierarchy() {
|
||||
}
|
||||
|
||||
public record Callable(
|
||||
String name,
|
||||
boolean method,
|
||||
int startOffset,
|
||||
int endOffset) {
|
||||
}
|
||||
|
||||
public record CallSite(
|
||||
Callable caller,
|
||||
Callable callee,
|
||||
int startOffset,
|
||||
int endOffset) {
|
||||
}
|
||||
|
||||
public static List<Callable> prepare(final PbsAst.File ast, final int offset) {
|
||||
Callable best = null;
|
||||
for (final Callable callable : callables(ast)) {
|
||||
if (callable.startOffset() > offset || offset >= callable.endOffset()) {
|
||||
continue;
|
||||
}
|
||||
if (best == null || callable.endOffset() - callable.startOffset() < best.endOffset() - best.startOffset()) {
|
||||
best = callable;
|
||||
}
|
||||
}
|
||||
return best == null ? List.of() : List.of(best);
|
||||
}
|
||||
|
||||
public static List<CallSite> incomingCalls(final PbsAst.File ast, final Callable target) {
|
||||
if (target == null) {
|
||||
return List.of();
|
||||
}
|
||||
final ArrayList<CallSite> calls = new ArrayList<>();
|
||||
for (final CallSite call : calls(ast)) {
|
||||
if (sameCallable(call.callee(), target)) {
|
||||
calls.add(call);
|
||||
}
|
||||
}
|
||||
return List.copyOf(calls);
|
||||
}
|
||||
|
||||
public static List<CallSite> outgoingCalls(final PbsAst.File ast, final Callable target) {
|
||||
if (target == null) {
|
||||
return List.of();
|
||||
}
|
||||
final ArrayList<CallSite> calls = new ArrayList<>();
|
||||
for (final CallSite call : calls(ast)) {
|
||||
if (sameCallable(call.caller(), target)) {
|
||||
calls.add(call);
|
||||
}
|
||||
}
|
||||
return List.copyOf(calls);
|
||||
}
|
||||
|
||||
private static boolean sameCallable(final Callable left, final Callable right) {
|
||||
return left != null
|
||||
&& right != null
|
||||
&& left.method() == right.method()
|
||||
&& left.name().equals(right.name())
|
||||
&& left.startOffset() == right.startOffset()
|
||||
&& left.endOffset() == right.endOffset();
|
||||
}
|
||||
|
||||
private static List<Callable> callables(final PbsAst.File ast) {
|
||||
final ArrayList<Callable> callables = new ArrayList<>();
|
||||
if (ast == null || ast.topDecls() == null) {
|
||||
return callables;
|
||||
}
|
||||
for (final PbsAst.TopDecl topDecl : ast.topDecls()) {
|
||||
collectCallables(topDecl, callables);
|
||||
}
|
||||
return callables;
|
||||
}
|
||||
|
||||
private static void collectCallables(final PbsAst.TopDecl topDecl, final List<Callable> callables) {
|
||||
switch (topDecl) {
|
||||
case null -> {
|
||||
}
|
||||
case PbsAst.FunctionDecl functionDecl -> callables.add(callable(functionDecl.name(), false, functionDecl.span()));
|
||||
case PbsAst.StructDecl structDecl -> {
|
||||
if (structDecl.methods() != null) {
|
||||
for (final PbsAst.FunctionDecl method : structDecl.methods()) {
|
||||
if (method != null) {
|
||||
callables.add(callable(method.name(), true, method.span()));
|
||||
}
|
||||
}
|
||||
}
|
||||
if (structDecl.ctors() != null) {
|
||||
for (final PbsAst.CtorDecl ctor : structDecl.ctors()) {
|
||||
if (ctor != null) {
|
||||
callables.add(callable(ctor.name(), true, ctor.span()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
case PbsAst.ServiceDecl serviceDecl -> {
|
||||
if (serviceDecl.methods() != null) {
|
||||
for (final PbsAst.FunctionDecl method : serviceDecl.methods()) {
|
||||
if (method != null) {
|
||||
callables.add(callable(method.name(), true, method.span()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
default -> {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static List<CallSite> calls(final PbsAst.File ast) {
|
||||
final List<Callable> callables = callables(ast);
|
||||
final ArrayList<CallSite> calls = new ArrayList<>();
|
||||
for (final Callable caller : callables) {
|
||||
final PbsAst.Block body = body(ast, caller);
|
||||
if (body == null) {
|
||||
continue;
|
||||
}
|
||||
final ArrayList<PbsAst.CallExpr> found = new ArrayList<>();
|
||||
collectCalls(body, found);
|
||||
for (final PbsAst.CallExpr call : found) {
|
||||
final Callable callee = resolveCallee(call, callables);
|
||||
final int[] span = offsets(call.span());
|
||||
if (callee == null || span == null) {
|
||||
continue;
|
||||
}
|
||||
calls.add(new CallSite(caller, callee, span[0], span[1]));
|
||||
}
|
||||
}
|
||||
return calls;
|
||||
}
|
||||
|
||||
private static Callable resolveCallee(final PbsAst.CallExpr call, final List<Callable> callables) {
|
||||
if (call == null || call.callee() == null) {
|
||||
return null;
|
||||
}
|
||||
final boolean method = call.callee() instanceof PbsAst.MemberExpr;
|
||||
final String name = switch (call.callee()) {
|
||||
case PbsAst.IdentifierExpr identifier -> identifier.name();
|
||||
case PbsAst.MemberExpr member -> member.memberName();
|
||||
default -> null;
|
||||
};
|
||||
if (name == null) {
|
||||
return null;
|
||||
}
|
||||
for (final Callable callable : callables) {
|
||||
if (callable.method() == method && callable.name().equals(name)) {
|
||||
return callable;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private static PbsAst.Block body(final PbsAst.File ast, final Callable caller) {
|
||||
for (final Callable callable : callables(ast)) {
|
||||
if (!sameCallable(callable, caller)) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
return findBody(ast, caller);
|
||||
}
|
||||
|
||||
private static PbsAst.Block findBody(final PbsAst.File ast, final Callable caller) {
|
||||
if (ast.topDecls() == null) {
|
||||
return null;
|
||||
}
|
||||
for (final PbsAst.TopDecl topDecl : ast.topDecls()) {
|
||||
final PbsAst.Block body = findBody(topDecl, caller);
|
||||
if (body != null) {
|
||||
return body;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private static PbsAst.Block findBody(final PbsAst.TopDecl topDecl, final Callable caller) {
|
||||
switch (topDecl) {
|
||||
case null -> {
|
||||
return null;
|
||||
}
|
||||
case PbsAst.FunctionDecl functionDecl -> {
|
||||
if (matches(functionDecl.name(), false, functionDecl.span(), caller)) {
|
||||
return functionDecl.body();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
case PbsAst.StructDecl structDecl -> {
|
||||
if (structDecl.methods() != null) {
|
||||
for (final PbsAst.FunctionDecl method : structDecl.methods()) {
|
||||
if (method != null && matches(method.name(), true, method.span(), caller)) {
|
||||
return method.body();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (structDecl.ctors() != null) {
|
||||
for (final PbsAst.CtorDecl ctor : structDecl.ctors()) {
|
||||
if (ctor != null && matches(ctor.name(), true, ctor.span(), caller)) {
|
||||
return ctor.body();
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
case PbsAst.ServiceDecl serviceDecl -> {
|
||||
if (serviceDecl.methods() == null) {
|
||||
return null;
|
||||
}
|
||||
for (final PbsAst.FunctionDecl method : serviceDecl.methods()) {
|
||||
if (method != null && matches(method.name(), true, method.span(), caller)) {
|
||||
return method.body();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
default -> {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void collectCalls(final PbsAst.Block block, final List<PbsAst.CallExpr> calls) {
|
||||
if (block == null || block.statements() == null) {
|
||||
return;
|
||||
}
|
||||
for (final PbsAst.Statement statement : block.statements()) {
|
||||
collectCalls(statement, calls);
|
||||
}
|
||||
collectCalls(block.tailExpression(), calls);
|
||||
}
|
||||
|
||||
private static void collectCalls(final PbsAst.Statement statement, final List<PbsAst.CallExpr> calls) {
|
||||
switch (statement) {
|
||||
case null -> {
|
||||
}
|
||||
case PbsAst.LetStatement letStatement -> collectCalls(letStatement.initializer(), calls);
|
||||
case PbsAst.ReturnStatement returnStatement -> collectCalls(returnStatement.value(), calls);
|
||||
case PbsAst.AssignStatement assignStatement -> collectCalls(assignStatement.value(), calls);
|
||||
case PbsAst.ExpressionStatement expressionStatement -> collectCalls(expressionStatement.expression(), calls);
|
||||
case PbsAst.IfStatement ifStatement -> {
|
||||
collectCalls(ifStatement.condition(), calls);
|
||||
collectCalls(ifStatement.thenBlock(), calls);
|
||||
collectCalls(ifStatement.elseBlock(), calls);
|
||||
collectCalls(ifStatement.elseIf(), calls);
|
||||
}
|
||||
case PbsAst.ForStatement forStatement -> {
|
||||
collectCalls(forStatement.fromExpression(), calls);
|
||||
collectCalls(forStatement.untilExpression(), calls);
|
||||
collectCalls(forStatement.stepExpression(), calls);
|
||||
collectCalls(forStatement.body(), calls);
|
||||
}
|
||||
case PbsAst.WhileStatement whileStatement -> {
|
||||
collectCalls(whileStatement.condition(), calls);
|
||||
collectCalls(whileStatement.body(), calls);
|
||||
}
|
||||
default -> {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void collectCalls(final PbsAst.Expression expression, final List<PbsAst.CallExpr> calls) {
|
||||
switch (expression) {
|
||||
case null -> {
|
||||
}
|
||||
case PbsAst.CallExpr callExpr -> {
|
||||
calls.add(callExpr);
|
||||
collectCalls(callExpr.callee(), calls);
|
||||
if (callExpr.arguments() != null) {
|
||||
for (final PbsAst.Expression argument : callExpr.arguments()) {
|
||||
collectCalls(argument, calls);
|
||||
}
|
||||
}
|
||||
}
|
||||
case PbsAst.MemberExpr memberExpr -> collectCalls(memberExpr.receiver(), calls);
|
||||
case PbsAst.BinaryExpr binaryExpr -> {
|
||||
collectCalls(binaryExpr.left(), calls);
|
||||
collectCalls(binaryExpr.right(), calls);
|
||||
}
|
||||
case PbsAst.UnaryExpr unaryExpr -> collectCalls(unaryExpr.expression(), calls);
|
||||
case PbsAst.GroupExpr groupExpr -> collectCalls(groupExpr.expression(), calls);
|
||||
case PbsAst.IfExpr ifExpr -> {
|
||||
collectCalls(ifExpr.condition(), calls);
|
||||
collectCalls(ifExpr.thenBlock(), calls);
|
||||
collectCalls(ifExpr.elseExpression(), calls);
|
||||
}
|
||||
case PbsAst.BlockExpr blockExpr -> collectCalls(blockExpr.block(), calls);
|
||||
case PbsAst.ApplyExpr applyExpr -> {
|
||||
collectCalls(applyExpr.callee(), calls);
|
||||
collectCalls(applyExpr.argument(), calls);
|
||||
}
|
||||
default -> {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static boolean matches(
|
||||
final String name,
|
||||
final boolean method,
|
||||
final Span span,
|
||||
final Callable caller) {
|
||||
final Callable callable = callable(name, method, span);
|
||||
return callable != null && sameCallable(callable, caller);
|
||||
}
|
||||
|
||||
private static Callable callable(final String name, final boolean method, final Span span) {
|
||||
final int[] offsets = offsets(span);
|
||||
if (name == null || name.isBlank() || offsets == null) {
|
||||
return null;
|
||||
}
|
||||
return new Callable(name, method, offsets[0], offsets[1]);
|
||||
}
|
||||
|
||||
private static int[] offsets(final Span span) {
|
||||
if (span == null || span.getEnd() <= span.getStart()) {
|
||||
return null;
|
||||
}
|
||||
return new int[] {toOffset(span.getStart()), toOffset(span.getEnd())};
|
||||
}
|
||||
|
||||
private static int toOffset(final long value) {
|
||||
if (value <= 0L) {
|
||||
return 0;
|
||||
}
|
||||
return (int) Math.min(Integer.MAX_VALUE, value);
|
||||
}
|
||||
}
|
||||
+179
@@ -0,0 +1,179 @@
|
||||
package p.studio.compiler.pbs;
|
||||
|
||||
import p.studio.compiler.pbs.lexer.PbsLexer;
|
||||
import p.studio.compiler.pbs.lexer.PbsToken;
|
||||
import p.studio.compiler.pbs.lexer.PbsTokenKind;
|
||||
import p.studio.compiler.source.diagnostics.DiagnosticSink;
|
||||
import p.studio.compiler.source.identifiers.FileId;
|
||||
import p.studio.utilities.structures.ReadOnlyList;
|
||||
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.ArrayList;
|
||||
|
||||
public final class PbsDocumentFormatter {
|
||||
private static final int INDENT_SPACES = 4;
|
||||
|
||||
private PbsDocumentFormatter() {
|
||||
}
|
||||
|
||||
public static String format(final String documentText) {
|
||||
final String text = documentText == null ? "" : documentText;
|
||||
if (text.isEmpty()) {
|
||||
return text;
|
||||
}
|
||||
final ReadOnlyList<PbsToken> tokens = PbsLexer.lex(text, FileId.none(), DiagnosticSink.empty());
|
||||
final ArrayList<SourceLine> lines = splitLines(text);
|
||||
final StringBuilder formatted = new StringBuilder(text.length());
|
||||
int depth = 0;
|
||||
for (final SourceLine line : lines) {
|
||||
if (isDocInterior(line, tokens)) {
|
||||
formatted.append(line.content()).append(line.ending());
|
||||
continue;
|
||||
}
|
||||
final int leadingClosers = leadingClosers(line, tokens);
|
||||
final int indent = Math.max(0, depth - leadingClosers);
|
||||
formatted.append(reindent(line.content(), indent)).append(line.ending());
|
||||
depth = depthAfter(line, tokens, depth);
|
||||
}
|
||||
return formatted.toString();
|
||||
}
|
||||
|
||||
private static boolean isDocInterior(final SourceLine line, final ReadOnlyList<PbsToken> tokens) {
|
||||
for (final PbsToken token : tokens) {
|
||||
if (token.kind() != PbsTokenKind.DOC_TEXT_BLOCK) {
|
||||
continue;
|
||||
}
|
||||
if (line.startByte() > token.start() && line.endByte() <= token.end()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private static int leadingClosers(final SourceLine line, final ReadOnlyList<PbsToken> tokens) {
|
||||
int closers = 0;
|
||||
boolean seenCode = false;
|
||||
for (final PbsToken token : tokens) {
|
||||
if (token.start() < line.startByte() || token.start() >= line.endByte()) {
|
||||
continue;
|
||||
}
|
||||
if (token.kind() == PbsTokenKind.COMMENT) {
|
||||
continue;
|
||||
}
|
||||
if (!seenCode && isCloser(token.kind())) {
|
||||
closers += 1;
|
||||
continue;
|
||||
}
|
||||
seenCode = true;
|
||||
}
|
||||
return closers;
|
||||
}
|
||||
|
||||
private static int depthAfter(
|
||||
final SourceLine line,
|
||||
final ReadOnlyList<PbsToken> tokens,
|
||||
final int depth) {
|
||||
int next = depth;
|
||||
for (final PbsToken token : tokens) {
|
||||
if (token.start() < line.startByte() || token.start() >= line.endByte()) {
|
||||
continue;
|
||||
}
|
||||
if (isOpener(token.kind())) {
|
||||
next += 1;
|
||||
} else if (isCloser(token.kind())) {
|
||||
next = Math.max(0, next - 1);
|
||||
}
|
||||
}
|
||||
return next;
|
||||
}
|
||||
|
||||
private static boolean isOpener(final PbsTokenKind kind) {
|
||||
return kind == PbsTokenKind.LEFT_BRACE || kind == PbsTokenKind.LEFT_PAREN;
|
||||
}
|
||||
|
||||
private static boolean isCloser(final PbsTokenKind kind) {
|
||||
return kind == PbsTokenKind.RIGHT_BRACE || kind == PbsTokenKind.RIGHT_PAREN;
|
||||
}
|
||||
|
||||
private static String reindent(final String content, final int indent) {
|
||||
int index = 0;
|
||||
while (index < content.length()) {
|
||||
final char character = content.charAt(index);
|
||||
if (character != ' ' && character != '\t') {
|
||||
break;
|
||||
}
|
||||
index += 1;
|
||||
}
|
||||
if (index == content.length()) {
|
||||
return content;
|
||||
}
|
||||
return " ".repeat(indent * INDENT_SPACES) + content.substring(index);
|
||||
}
|
||||
|
||||
private static ArrayList<SourceLine> splitLines(final String text) {
|
||||
final ArrayList<SourceLine> lines = new ArrayList<>();
|
||||
final byte[] bytes = text.getBytes(StandardCharsets.UTF_8);
|
||||
int charIndex = 0;
|
||||
int byteIndex = 0;
|
||||
int lineCharStart = 0;
|
||||
int lineByteStart = 0;
|
||||
while (charIndex < text.length()) {
|
||||
final int codePoint = text.codePointAt(charIndex);
|
||||
final int charWidth = Character.charCount(codePoint);
|
||||
final int byteWidth = utf8Length(codePoint);
|
||||
if (codePoint == '\n') {
|
||||
lines.add(new SourceLine(
|
||||
text.substring(lineCharStart, charIndex),
|
||||
"\n",
|
||||
lineByteStart,
|
||||
byteIndex));
|
||||
charIndex += charWidth;
|
||||
byteIndex += byteWidth;
|
||||
lineCharStart = charIndex;
|
||||
lineByteStart = byteIndex;
|
||||
continue;
|
||||
}
|
||||
if (codePoint == '\r' && charIndex + charWidth < text.length() && text.codePointAt(charIndex + charWidth) == '\n') {
|
||||
lines.add(new SourceLine(
|
||||
text.substring(lineCharStart, charIndex),
|
||||
"\r\n",
|
||||
lineByteStart,
|
||||
byteIndex));
|
||||
charIndex += charWidth + 1;
|
||||
byteIndex += byteWidth + 1;
|
||||
lineCharStart = charIndex;
|
||||
lineByteStart = byteIndex;
|
||||
continue;
|
||||
}
|
||||
charIndex += charWidth;
|
||||
byteIndex += byteWidth;
|
||||
}
|
||||
if (lineCharStart < text.length()) {
|
||||
lines.add(new SourceLine(
|
||||
text.substring(lineCharStart),
|
||||
"",
|
||||
lineByteStart,
|
||||
bytes.length));
|
||||
}
|
||||
if (lines.isEmpty()) {
|
||||
lines.add(new SourceLine(text, "", 0, bytes.length));
|
||||
}
|
||||
return lines;
|
||||
}
|
||||
|
||||
private static int utf8Length(final int codePoint) {
|
||||
if (codePoint <= 0x7F) {
|
||||
return 1;
|
||||
}
|
||||
if (codePoint <= 0x7FF) {
|
||||
return 2;
|
||||
}
|
||||
if (codePoint <= 0xFFFF) {
|
||||
return 3;
|
||||
}
|
||||
return 4;
|
||||
}
|
||||
|
||||
private record SourceLine(String content, String ending, int startByte, int endByte) {
|
||||
}
|
||||
}
|
||||
+100
@@ -0,0 +1,100 @@
|
||||
package p.studio.compiler.pbs;
|
||||
|
||||
import p.studio.compiler.messages.FESurfaceContext;
|
||||
import p.studio.compiler.models.FrontendSemanticToken;
|
||||
import p.studio.compiler.pbs.ast.PbsAst;
|
||||
import p.studio.compiler.pbs.semantics.PbsEditorialResolvedSymbol;
|
||||
import p.studio.compiler.pbs.semantics.PbsEditorialSupportService;
|
||||
import p.studio.compiler.pbs.semantics.PbsEditorialSymbolKind;
|
||||
import p.studio.utilities.structures.ReadOnlyList;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
public final class PbsSemanticTokenOverlay {
|
||||
private static final Set<String> LEXICAL_KEYS = Set.of(
|
||||
PbsSemanticKind.COMMENT.semanticKey(),
|
||||
PbsSemanticKind.STRING.semanticKey(),
|
||||
PbsSemanticKind.NUMBER.semanticKey(),
|
||||
PbsSemanticKind.LITERAL.semanticKey(),
|
||||
PbsSemanticKind.KEYWORD.semanticKey(),
|
||||
PbsSemanticKind.OPERATOR.semanticKey(),
|
||||
PbsSemanticKind.PUNCTUATION.semanticKey());
|
||||
|
||||
private PbsSemanticTokenOverlay() {
|
||||
}
|
||||
|
||||
public static List<FrontendSemanticToken> apply(
|
||||
final List<FrontendSemanticToken> baseline,
|
||||
final String documentText,
|
||||
final PbsAst.File ast,
|
||||
final ReadOnlyList<PbsAst.TopDecl> supplementalTopDecls,
|
||||
final FESurfaceContext feSurfaceContext,
|
||||
final PbsEditorialSupportService editorialSupportService) {
|
||||
if (baseline == null || baseline.isEmpty() || ast == null || editorialSupportService == null) {
|
||||
return baseline == null ? List.of() : List.copyOf(baseline);
|
||||
}
|
||||
final String text = documentText == null ? "" : documentText;
|
||||
final ReadOnlyList<PbsAst.TopDecl> supplementals = supplementalTopDecls == null
|
||||
? ReadOnlyList.empty()
|
||||
: supplementalTopDecls;
|
||||
final FESurfaceContext surface = feSurfaceContext == null ? FESurfaceContext.empty() : feSurfaceContext;
|
||||
final ArrayList<FrontendSemanticToken> overlaid = new ArrayList<>(baseline.size());
|
||||
for (final FrontendSemanticToken token : baseline) {
|
||||
overlaid.add(overlay(token, text, ast, supplementals, surface, editorialSupportService));
|
||||
}
|
||||
return List.copyOf(overlaid);
|
||||
}
|
||||
|
||||
private static FrontendSemanticToken overlay(
|
||||
final FrontendSemanticToken token,
|
||||
final String text,
|
||||
final PbsAst.File ast,
|
||||
final ReadOnlyList<PbsAst.TopDecl> supplementals,
|
||||
final FESurfaceContext surface,
|
||||
final PbsEditorialSupportService editorialSupportService) {
|
||||
if (token == null || LEXICAL_KEYS.contains(token.semanticKey())) {
|
||||
return token;
|
||||
}
|
||||
try {
|
||||
final String resolvedKey = editorialSupportService.hover(
|
||||
text,
|
||||
ast,
|
||||
supplementals,
|
||||
surface,
|
||||
token.startOffset())
|
||||
.map(PbsSemanticTokenOverlay::semanticKey)
|
||||
.orElse(null);
|
||||
if (resolvedKey == null || resolvedKey.equals(token.semanticKey())) {
|
||||
return token;
|
||||
}
|
||||
return new FrontendSemanticToken(token.startOffset(), token.endOffset(), resolvedKey);
|
||||
} catch (final RuntimeException ignored) {
|
||||
return token;
|
||||
}
|
||||
}
|
||||
|
||||
private static String semanticKey(final PbsEditorialResolvedSymbol symbol) {
|
||||
if (symbol == null || symbol.kind() == null) {
|
||||
return null;
|
||||
}
|
||||
final PbsSemanticKind kind = switch (symbol.kind()) {
|
||||
case FUNCTION -> PbsSemanticKind.FUNCTION;
|
||||
case METHOD -> PbsSemanticKind.METHOD;
|
||||
case CONSTRUCTOR -> PbsSemanticKind.CONSTRUCTOR;
|
||||
case STRUCT -> PbsSemanticKind.STRUCT;
|
||||
case BUILTIN_TYPE -> PbsSemanticKind.BUILTIN_TYPE;
|
||||
case SERVICE -> PbsSemanticKind.SERVICE;
|
||||
case HOST -> PbsSemanticKind.HOST;
|
||||
case CONTRACT -> PbsSemanticKind.CONTRACT;
|
||||
case CALLBACK -> PbsSemanticKind.CALLBACK;
|
||||
case ENUM -> PbsSemanticKind.ENUM;
|
||||
case ERROR -> PbsSemanticKind.ERROR;
|
||||
case GLOBAL -> PbsSemanticKind.GLOBAL;
|
||||
case CONST -> PbsSemanticKind.CONST;
|
||||
case KEYWORD, LOCAL, PARAMETER, FIELD -> null;
|
||||
};
|
||||
return kind == null ? null : kind.semanticKey();
|
||||
}
|
||||
}
|
||||
+380
@@ -0,0 +1,380 @@
|
||||
package p.studio.compiler.pbs;
|
||||
|
||||
import p.studio.compiler.pbs.ast.PbsAst;
|
||||
import p.studio.compiler.pbs.lexer.PbsLexer;
|
||||
import p.studio.compiler.pbs.lexer.PbsToken;
|
||||
import p.studio.compiler.pbs.lexer.PbsTokenKind;
|
||||
import p.studio.compiler.pbs.parser.PbsParser;
|
||||
import p.studio.compiler.services.FrontendFoldingRange;
|
||||
import p.studio.compiler.services.FrontendSelectionRange;
|
||||
import p.studio.compiler.source.Span;
|
||||
import p.studio.compiler.source.diagnostics.DiagnosticSink;
|
||||
import p.studio.compiler.source.identifiers.FileId;
|
||||
import p.studio.utilities.structures.ReadOnlyList;
|
||||
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
|
||||
public final class PbsStructureRanges {
|
||||
private PbsStructureRanges() {
|
||||
}
|
||||
|
||||
public static List<FrontendFoldingRange> foldingRanges(final String documentText) {
|
||||
final String text = documentText == null ? "" : documentText;
|
||||
final ReadOnlyList<PbsToken> tokens = PbsLexer.lex(text, FileId.none(), DiagnosticSink.empty());
|
||||
final PbsAst.File ast = PbsParser.parse(tokens, FileId.none(), DiagnosticSink.empty());
|
||||
return foldingRanges(text, ast, tokens);
|
||||
}
|
||||
|
||||
public static List<FrontendSelectionRange> selectionRanges(
|
||||
final String documentText,
|
||||
final List<Integer> offsets) {
|
||||
final String text = documentText == null ? "" : documentText;
|
||||
final ReadOnlyList<PbsToken> tokens = PbsLexer.lex(text, FileId.none(), DiagnosticSink.empty());
|
||||
final PbsAst.File ast = PbsParser.parse(tokens, FileId.none(), DiagnosticSink.empty());
|
||||
if (offsets == null || offsets.isEmpty()) {
|
||||
return List.of();
|
||||
}
|
||||
final Collected collected = collect(ast);
|
||||
final List<SpanPair> delimiters = delimiters(tokens, textEnd(text));
|
||||
final ArrayList<FrontendSelectionRange> ranges = new ArrayList<>();
|
||||
for (final Integer offset : offsets) {
|
||||
if (offset == null || offset < 0) {
|
||||
continue;
|
||||
}
|
||||
final FrontendSelectionRange range = selectionAt(offset, tokens, collected, delimiters);
|
||||
if (range != null) {
|
||||
ranges.add(range);
|
||||
}
|
||||
}
|
||||
return List.copyOf(ranges);
|
||||
}
|
||||
|
||||
private static List<FrontendFoldingRange> foldingRanges(
|
||||
final String text,
|
||||
final PbsAst.File ast,
|
||||
final ReadOnlyList<PbsToken> tokens) {
|
||||
final Collected collected = collect(ast);
|
||||
final LinkedHashSet<String> emitted = new LinkedHashSet<>();
|
||||
final ArrayList<SpanPair> ranges = new ArrayList<>();
|
||||
for (final SpanPair span : collected.folding()) {
|
||||
addRange(ranges, emitted, span);
|
||||
}
|
||||
for (final SpanPair delimiter : delimiters(tokens, textEnd(text))) {
|
||||
if (collected.coveredKeys().contains(delimiter.key())) {
|
||||
continue;
|
||||
}
|
||||
addRange(ranges, emitted, delimiter);
|
||||
}
|
||||
ranges.sort(Comparator.comparingInt(SpanPair::start).thenComparingInt(SpanPair::end));
|
||||
return ranges.stream()
|
||||
.map(span -> new FrontendFoldingRange(span.start(), span.end()))
|
||||
.toList();
|
||||
}
|
||||
|
||||
private static FrontendSelectionRange selectionAt(
|
||||
final int offset,
|
||||
final ReadOnlyList<PbsToken> tokens,
|
||||
final Collected collected,
|
||||
final List<SpanPair> delimiters) {
|
||||
final SpanPair identifier = smallest(identifierSpans(tokens), offset);
|
||||
final SpanPair parameters = smallest(delimiters, offset);
|
||||
final SpanPair block = smallest(collected.blocks(), offset);
|
||||
final SpanPair declaration = smallest(collected.declarations(), offset);
|
||||
FrontendSelectionRange node = null;
|
||||
SpanPair previous = null;
|
||||
for (final SpanPair layer : new SpanPair[] {declaration, block, parameters, identifier}) {
|
||||
if (layer == null) {
|
||||
continue;
|
||||
}
|
||||
if (previous != null && previous.start() == layer.start() && previous.end() == layer.end()) {
|
||||
continue;
|
||||
}
|
||||
node = new FrontendSelectionRange(layer.start(), layer.end(), node);
|
||||
previous = layer;
|
||||
}
|
||||
return node;
|
||||
}
|
||||
|
||||
private static Collected collect(final PbsAst.File ast) {
|
||||
final Collected collected = new Collected();
|
||||
if (ast == null || ast.topDecls() == null) {
|
||||
return collected;
|
||||
}
|
||||
for (final PbsAst.TopDecl topDecl : ast.topDecls()) {
|
||||
visitTop(topDecl, true, collected);
|
||||
}
|
||||
return collected;
|
||||
}
|
||||
|
||||
private static void visitTop(
|
||||
final PbsAst.TopDecl topDecl,
|
||||
final boolean topLevel,
|
||||
final Collected collected) {
|
||||
if (topDecl == null) {
|
||||
return;
|
||||
}
|
||||
if (topLevel && isListedDeclaration(topDecl)) {
|
||||
addSpan(collected.folding(), topDecl.span());
|
||||
}
|
||||
if (isListedDeclaration(topDecl) || topDecl instanceof PbsAst.FunctionDecl) {
|
||||
addSpan(collected.declarations(), topDecl.span());
|
||||
}
|
||||
switch (topDecl) {
|
||||
case PbsAst.FunctionDecl functionDecl -> visitFunction(functionDecl, collected);
|
||||
case PbsAst.StructDecl structDecl -> {
|
||||
visitAttributes(structDecl.attributes(), collected);
|
||||
if (structDecl.methods() != null) {
|
||||
for (final PbsAst.FunctionDecl method : structDecl.methods()) {
|
||||
visitTop(method, false, collected);
|
||||
}
|
||||
}
|
||||
if (structDecl.ctors() != null) {
|
||||
for (final PbsAst.CtorDecl ctor : structDecl.ctors()) {
|
||||
visitCtor(ctor, collected);
|
||||
}
|
||||
}
|
||||
}
|
||||
case PbsAst.ServiceDecl serviceDecl -> {
|
||||
visitAttributes(serviceDecl.attributes(), collected);
|
||||
if (serviceDecl.methods() != null) {
|
||||
for (final PbsAst.FunctionDecl method : serviceDecl.methods()) {
|
||||
visitTop(method, false, collected);
|
||||
}
|
||||
}
|
||||
}
|
||||
case PbsAst.ContractDecl contractDecl -> visitAttributes(contractDecl.attributes(), collected);
|
||||
case PbsAst.HostDecl hostDecl -> visitAttributes(hostDecl.attributes(), collected);
|
||||
case PbsAst.EnumDecl enumDecl -> visitAttributes(enumDecl.attributes(), collected);
|
||||
case PbsAst.ErrorDecl errorDecl -> visitAttributes(errorDecl.attributes(), collected);
|
||||
case PbsAst.CallbackDecl callbackDecl -> visitAttributes(callbackDecl.attributes(), collected);
|
||||
default -> {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void visitFunction(
|
||||
final PbsAst.FunctionDecl functionDecl,
|
||||
final Collected collected) {
|
||||
visitAttributes(functionDecl.attributes(), collected);
|
||||
coverBlock(functionDecl.body(), true, collected);
|
||||
}
|
||||
|
||||
private static void visitCtor(
|
||||
final PbsAst.CtorDecl ctor,
|
||||
final Collected collected) {
|
||||
if (ctor == null) {
|
||||
return;
|
||||
}
|
||||
addSpan(collected.declarations(), ctor.span());
|
||||
coverBlock(ctor.body(), true, collected);
|
||||
}
|
||||
|
||||
private static void visitAttributes(
|
||||
final ReadOnlyList<PbsAst.Attribute> attributes,
|
||||
final Collected collected) {
|
||||
if (attributes == null) {
|
||||
return;
|
||||
}
|
||||
for (final PbsAst.Attribute attribute : attributes) {
|
||||
if (attribute == null || attribute.arguments() == null) {
|
||||
continue;
|
||||
}
|
||||
for (final PbsAst.AttributeArgument argument : attribute.arguments()) {
|
||||
if (argument != null && argument.value() instanceof PbsAst.AttributeDocTextBlockValue doc) {
|
||||
addSpan(collected.folding(), doc.span());
|
||||
addSpan(collected.blocks(), doc.span());
|
||||
collected.cover(doc.span());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void coverBlock(
|
||||
final PbsAst.Block block,
|
||||
final boolean emit,
|
||||
final Collected collected) {
|
||||
if (block == null) {
|
||||
return;
|
||||
}
|
||||
if (emit) {
|
||||
addSpan(collected.folding(), block.span());
|
||||
}
|
||||
addSpan(collected.blocks(), block.span());
|
||||
collected.cover(block.span());
|
||||
if (block.statements() == null) {
|
||||
return;
|
||||
}
|
||||
for (final PbsAst.Statement statement : block.statements()) {
|
||||
coverStatement(statement, collected);
|
||||
}
|
||||
}
|
||||
|
||||
private static void coverStatement(
|
||||
final PbsAst.Statement statement,
|
||||
final Collected collected) {
|
||||
switch (statement) {
|
||||
case null -> {
|
||||
}
|
||||
case PbsAst.IfStatement ifStatement -> {
|
||||
coverBlock(ifStatement.thenBlock(), false, collected);
|
||||
coverBlock(ifStatement.elseBlock(), false, collected);
|
||||
coverStatement(ifStatement.elseIf(), collected);
|
||||
}
|
||||
case PbsAst.ForStatement forStatement -> coverBlock(forStatement.body(), false, collected);
|
||||
case PbsAst.WhileStatement whileStatement -> coverBlock(whileStatement.body(), false, collected);
|
||||
default -> {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static boolean isListedDeclaration(final PbsAst.TopDecl topDecl) {
|
||||
return topDecl instanceof PbsAst.FunctionDecl
|
||||
|| topDecl instanceof PbsAst.StructDecl
|
||||
|| topDecl instanceof PbsAst.ServiceDecl
|
||||
|| topDecl instanceof PbsAst.ContractDecl
|
||||
|| topDecl instanceof PbsAst.HostDecl
|
||||
|| topDecl instanceof PbsAst.EnumDecl
|
||||
|| topDecl instanceof PbsAst.ErrorDecl
|
||||
|| topDecl instanceof PbsAst.CallbackDecl;
|
||||
}
|
||||
|
||||
private static List<SpanPair> delimiters(
|
||||
final ReadOnlyList<PbsToken> tokens,
|
||||
final int textEnd) {
|
||||
final ArrayList<PbsToken> stack = new ArrayList<>();
|
||||
final ArrayList<SpanPair> pairs = new ArrayList<>();
|
||||
if (tokens == null) {
|
||||
return pairs;
|
||||
}
|
||||
for (final PbsToken token : tokens) {
|
||||
if (token == null) {
|
||||
continue;
|
||||
}
|
||||
if (token.kind() == PbsTokenKind.LEFT_BRACE || token.kind() == PbsTokenKind.LEFT_PAREN) {
|
||||
stack.add(token);
|
||||
continue;
|
||||
}
|
||||
if (token.kind() == PbsTokenKind.DOC_TEXT_BLOCK) {
|
||||
addPair(pairs, token.start(), token.end());
|
||||
continue;
|
||||
}
|
||||
if (token.kind() == PbsTokenKind.RIGHT_BRACE || token.kind() == PbsTokenKind.RIGHT_PAREN) {
|
||||
final PbsTokenKind openKind = token.kind() == PbsTokenKind.RIGHT_BRACE
|
||||
? PbsTokenKind.LEFT_BRACE
|
||||
: PbsTokenKind.LEFT_PAREN;
|
||||
if (!stack.isEmpty() && stack.getLast().kind() == openKind) {
|
||||
final PbsToken open = stack.removeLast();
|
||||
addPair(pairs, open.start(), token.end());
|
||||
}
|
||||
}
|
||||
}
|
||||
for (final PbsToken open : stack) {
|
||||
addPair(pairs, open.start(), textEnd);
|
||||
}
|
||||
return pairs;
|
||||
}
|
||||
|
||||
private static List<SpanPair> identifierSpans(final ReadOnlyList<PbsToken> tokens) {
|
||||
final ArrayList<SpanPair> spans = new ArrayList<>();
|
||||
if (tokens == null) {
|
||||
return spans;
|
||||
}
|
||||
for (final PbsToken token : tokens) {
|
||||
if (token != null && token.kind() == PbsTokenKind.IDENTIFIER) {
|
||||
addPair(spans, token.start(), token.end());
|
||||
}
|
||||
}
|
||||
return spans;
|
||||
}
|
||||
|
||||
private static SpanPair smallest(final List<SpanPair> spans, final int offset) {
|
||||
SpanPair best = null;
|
||||
for (final SpanPair span : spans) {
|
||||
if (span.start() > offset || offset >= span.end()) {
|
||||
continue;
|
||||
}
|
||||
if (best == null
|
||||
|| span.end() - span.start() < best.end() - best.start()
|
||||
|| (span.end() - span.start() == best.end() - best.start() && span.start() > best.start())) {
|
||||
best = span;
|
||||
}
|
||||
}
|
||||
return best;
|
||||
}
|
||||
|
||||
private static void addSpan(final List<SpanPair> spans, final Span span) {
|
||||
if (span == null) {
|
||||
return;
|
||||
}
|
||||
addPair(spans, toOffset(span.getStart()), toOffset(span.getEnd()));
|
||||
}
|
||||
|
||||
private static void addPair(final List<SpanPair> spans, final int start, final int end) {
|
||||
if (start < 0 || end <= start) {
|
||||
return;
|
||||
}
|
||||
spans.add(new SpanPair(start, end));
|
||||
}
|
||||
|
||||
private static void addRange(
|
||||
final List<SpanPair> ranges,
|
||||
final LinkedHashSet<String> emitted,
|
||||
final SpanPair span) {
|
||||
if (span == null || !emitted.add(span.key())) {
|
||||
return;
|
||||
}
|
||||
ranges.add(span);
|
||||
}
|
||||
|
||||
private static int textEnd(final String text) {
|
||||
return text.getBytes(StandardCharsets.UTF_8).length;
|
||||
}
|
||||
|
||||
private static int toOffset(final long value) {
|
||||
if (value <= 0L) {
|
||||
return 0;
|
||||
}
|
||||
return (int) Math.min(Integer.MAX_VALUE, value);
|
||||
}
|
||||
|
||||
private record SpanPair(int start, int end) {
|
||||
private String key() {
|
||||
return start + ":" + end;
|
||||
}
|
||||
}
|
||||
|
||||
private static final class Collected {
|
||||
private final ArrayList<SpanPair> folding = new ArrayList<>();
|
||||
private final ArrayList<SpanPair> covered = new ArrayList<>();
|
||||
private final ArrayList<SpanPair> blocks = new ArrayList<>();
|
||||
private final ArrayList<SpanPair> declarations = new ArrayList<>();
|
||||
|
||||
private List<SpanPair> folding() {
|
||||
return folding;
|
||||
}
|
||||
|
||||
private void cover(final Span span) {
|
||||
addSpan(covered, span);
|
||||
}
|
||||
|
||||
private LinkedHashSet<String> coveredKeys() {
|
||||
final LinkedHashSet<String> keys = new LinkedHashSet<>();
|
||||
for (final SpanPair span : covered) {
|
||||
keys.add(span.key());
|
||||
}
|
||||
return keys;
|
||||
}
|
||||
|
||||
private List<SpanPair> blocks() {
|
||||
return blocks;
|
||||
}
|
||||
|
||||
private List<SpanPair> declarations() {
|
||||
return declarations;
|
||||
}
|
||||
}
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
package p.studio.compiler.pbs.semantics;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public record PbsQuickFix(
|
||||
String diagnosticCode,
|
||||
int startOffset,
|
||||
int endOffset,
|
||||
String newText,
|
||||
String title) {
|
||||
|
||||
public PbsQuickFix {
|
||||
diagnosticCode = requireText(diagnosticCode, "diagnosticCode");
|
||||
title = requireText(title, "title");
|
||||
if (startOffset < 0) {
|
||||
throw new IllegalArgumentException("startOffset must not be negative");
|
||||
}
|
||||
if (endOffset < startOffset) {
|
||||
throw new IllegalArgumentException("endOffset must not be before startOffset");
|
||||
}
|
||||
newText = Objects.requireNonNull(newText, "newText");
|
||||
}
|
||||
|
||||
private static String requireText(
|
||||
final String value,
|
||||
final String field) {
|
||||
final String candidate = Objects.requireNonNull(value, field).trim();
|
||||
if (candidate.isEmpty()) {
|
||||
throw new IllegalArgumentException(field + " must not be blank");
|
||||
}
|
||||
return candidate;
|
||||
}
|
||||
}
|
||||
+148
@@ -0,0 +1,148 @@
|
||||
package p.studio.compiler.pbs.semantics;
|
||||
|
||||
import p.studio.compiler.pbs.ast.PbsAst;
|
||||
import p.studio.compiler.source.Span;
|
||||
import p.studio.utilities.structures.ReadOnlyList;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
|
||||
public final class PbsQuickFixCollector {
|
||||
static final String REMOVE_DUPLICATE_TITLE = "Remove duplicate reserved attribute";
|
||||
static final String REMOVE_INIT_ALLOWED_ARGUMENTS_TITLE = "Remove InitAllowed arguments";
|
||||
private static final String INIT_ALLOWED_REPLACEMENT = "[InitAllowed]";
|
||||
|
||||
private PbsQuickFixCollector() {
|
||||
}
|
||||
|
||||
public static List<PbsQuickFix> collect(
|
||||
final PbsAst.File ast,
|
||||
final boolean interfaceModule) {
|
||||
if (ast == null) {
|
||||
return List.of();
|
||||
}
|
||||
final ArrayList<PbsQuickFix> repairs = new ArrayList<>();
|
||||
for (final PbsAst.TopDecl topDecl : ast.topDecls()) {
|
||||
switch (topDecl) {
|
||||
case PbsAst.FunctionDecl functionDecl -> duplicateDoc(functionDecl.attributes(), repairs);
|
||||
case PbsAst.StructDecl structDecl -> {
|
||||
duplicateDoc(structDecl.attributes(), repairs);
|
||||
for (final PbsAst.FunctionDecl method : structDecl.methods()) {
|
||||
duplicateDoc(method.attributes(), repairs);
|
||||
}
|
||||
}
|
||||
case PbsAst.ServiceDecl serviceDecl -> {
|
||||
duplicateDoc(serviceDecl.attributes(), repairs);
|
||||
for (final PbsAst.FunctionDecl method : serviceDecl.methods()) {
|
||||
duplicateDoc(method.attributes(), repairs);
|
||||
}
|
||||
}
|
||||
case PbsAst.ContractDecl contractDecl -> {
|
||||
duplicateDoc(contractDecl.attributes(), repairs);
|
||||
if (interfaceModule) {
|
||||
for (final PbsAst.FunctionSignature signature : contractDecl.signatures()) {
|
||||
duplicateDoc(signature.attributes(), repairs);
|
||||
}
|
||||
}
|
||||
}
|
||||
case PbsAst.HostDecl hostDecl -> {
|
||||
duplicateDoc(hostDecl.attributes(), repairs);
|
||||
if (interfaceModule) {
|
||||
for (final PbsAst.FunctionSignature signature : hostDecl.signatures()) {
|
||||
collectHostSignature(signature, repairs);
|
||||
}
|
||||
}
|
||||
}
|
||||
case PbsAst.BuiltinTypeDecl builtinTypeDecl -> {
|
||||
if (interfaceModule) {
|
||||
duplicateDoc(builtinTypeDecl.attributes(), repairs);
|
||||
duplicateNamed(builtinTypeDecl.attributes(), "BuiltinType", repairs);
|
||||
for (final PbsAst.FunctionSignature signature : builtinTypeDecl.signatures()) {
|
||||
duplicateDoc(signature.attributes(), repairs);
|
||||
duplicateNamed(signature.attributes(), "IntrinsicCall", repairs);
|
||||
}
|
||||
}
|
||||
}
|
||||
case PbsAst.ErrorDecl errorDecl -> duplicateDoc(errorDecl.attributes(), repairs);
|
||||
case PbsAst.EnumDecl enumDecl -> duplicateDoc(enumDecl.attributes(), repairs);
|
||||
case PbsAst.CallbackDecl callbackDecl -> duplicateDoc(callbackDecl.attributes(), repairs);
|
||||
case PbsAst.ConstDecl constDecl -> {
|
||||
duplicateDoc(constDecl.attributes(), repairs);
|
||||
duplicateNamed(constDecl.attributes(), "BuiltinConst", repairs);
|
||||
}
|
||||
default -> {
|
||||
}
|
||||
}
|
||||
}
|
||||
repairs.sort(Comparator
|
||||
.comparingInt(PbsQuickFix::startOffset)
|
||||
.thenComparingInt(PbsQuickFix::endOffset)
|
||||
.thenComparing(PbsQuickFix::diagnosticCode));
|
||||
return List.copyOf(repairs);
|
||||
}
|
||||
|
||||
private static void collectHostSignature(
|
||||
final PbsAst.FunctionSignature signature,
|
||||
final List<PbsQuickFix> repairs) {
|
||||
duplicateDoc(signature.attributes(), repairs);
|
||||
duplicateNamed(signature.attributes(), "Host", repairs);
|
||||
duplicateNamed(signature.attributes(), "InitAllowed", repairs);
|
||||
duplicateNamed(signature.attributes(), "AssetLowering", repairs);
|
||||
final List<PbsAst.Attribute> initAllowed = named(signature.attributes(), "InitAllowed");
|
||||
if (!initAllowed.isEmpty() && !initAllowed.getFirst().arguments().isEmpty()) {
|
||||
add(repairs, initAllowed.getFirst(), PbsSemanticsErrors.E_SEM_MALFORMED_RESERVED_ATTRIBUTE.name(),
|
||||
INIT_ALLOWED_REPLACEMENT, REMOVE_INIT_ALLOWED_ARGUMENTS_TITLE);
|
||||
}
|
||||
}
|
||||
|
||||
private static void duplicateDoc(
|
||||
final ReadOnlyList<PbsAst.Attribute> attributes,
|
||||
final List<PbsQuickFix> repairs) {
|
||||
duplicateNamed(attributes, "Doc", repairs);
|
||||
}
|
||||
|
||||
private static void duplicateNamed(
|
||||
final ReadOnlyList<PbsAst.Attribute> attributes,
|
||||
final String name,
|
||||
final List<PbsQuickFix> repairs) {
|
||||
final List<PbsAst.Attribute> matches = named(attributes, name);
|
||||
for (int index = 1; index < matches.size(); index++) {
|
||||
add(repairs, matches.get(index), PbsSemanticsErrors.E_SEM_DUPLICATE_RESERVED_ATTRIBUTE.name(),
|
||||
"", REMOVE_DUPLICATE_TITLE);
|
||||
}
|
||||
}
|
||||
|
||||
private static List<PbsAst.Attribute> named(
|
||||
final ReadOnlyList<PbsAst.Attribute> attributes,
|
||||
final String name) {
|
||||
final ArrayList<PbsAst.Attribute> matches = new ArrayList<>();
|
||||
if (attributes == null) {
|
||||
return matches;
|
||||
}
|
||||
for (final PbsAst.Attribute attribute : attributes) {
|
||||
if (name.equals(attribute.name())) {
|
||||
matches.add(attribute);
|
||||
}
|
||||
}
|
||||
return matches;
|
||||
}
|
||||
|
||||
private static void add(
|
||||
final List<PbsQuickFix> repairs,
|
||||
final PbsAst.Attribute attribute,
|
||||
final String code,
|
||||
final String newText,
|
||||
final String title) {
|
||||
if (attribute == null || attribute.span() == null || attribute.span().isNone()) {
|
||||
return;
|
||||
}
|
||||
final Span span = attribute.span();
|
||||
final long start = span.getStart();
|
||||
final long end = span.getEnd();
|
||||
if (start < 0 || end < start || end > Integer.MAX_VALUE) {
|
||||
return;
|
||||
}
|
||||
repairs.add(new PbsQuickFix(code, (int) start, (int) end, newText, title));
|
||||
}
|
||||
}
|
||||
+73
@@ -5,9 +5,15 @@ import p.studio.utilities.structures.ReadOnlyList;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.JarURLConnection;
|
||||
import java.net.URL;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.jar.JarEntry;
|
||||
|
||||
public final class ResourceStdlibEnvironmentResolver implements StdlibEnvironmentResolver {
|
||||
private static final String STDLIB_ROOT = "stdlib";
|
||||
@@ -37,6 +43,73 @@ public final class ResourceStdlibEnvironmentResolver implements StdlibEnvironmen
|
||||
barrelSource.get()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public ReadOnlyList<StdlibModuleSource> modules() {
|
||||
final String root = target.exportReferenceName().toLowerCase()
|
||||
+ "/" + STDLIB_ROOT + "/" + stdlibVersion;
|
||||
final ClassLoader classLoader = ResourceStdlibEnvironmentResolver.class.getClassLoader();
|
||||
if (classLoader == null) {
|
||||
return ReadOnlyList.empty();
|
||||
}
|
||||
final URL url = classLoader.getResource(root);
|
||||
if (url == null) {
|
||||
return ReadOnlyList.empty();
|
||||
}
|
||||
try {
|
||||
final List<List<String>> modulePaths = "jar".equals(url.getProtocol())
|
||||
? jarModulePaths(url, root)
|
||||
: fileModulePaths(url);
|
||||
final ArrayList<StdlibModuleSource> modules = new ArrayList<>();
|
||||
for (final List<String> modulePath : modulePaths) {
|
||||
if (modulePath.isEmpty()) {
|
||||
continue;
|
||||
}
|
||||
final String project = modulePath.getFirst();
|
||||
final ReadOnlyList<String> segments = ReadOnlyList.wrap(modulePath.subList(1, modulePath.size()));
|
||||
resolveModule(project, segments).ifPresent(modules::add);
|
||||
}
|
||||
return ReadOnlyList.wrap(modules);
|
||||
} catch (final Exception ignored) {
|
||||
return ReadOnlyList.empty();
|
||||
}
|
||||
}
|
||||
|
||||
private List<List<String>> fileModulePaths(final URL url) throws Exception {
|
||||
final Path rootPath = Path.of(url.toURI());
|
||||
final ArrayList<List<String>> modulePaths = new ArrayList<>();
|
||||
try (var walk = Files.walk(rootPath)) {
|
||||
walk.filter(path -> "main.pbs".equals(String.valueOf(path.getFileName()))
|
||||
&& Files.isRegularFile(path.getParent().resolve("mod.barrel")))
|
||||
.forEach(path -> modulePaths.add(segments(rootPath.relativize(path.getParent()))));
|
||||
}
|
||||
return modulePaths;
|
||||
}
|
||||
|
||||
private List<List<String>> jarModulePaths(final URL url, final String root) throws IOException {
|
||||
final JarURLConnection connection = (JarURLConnection) url.openConnection();
|
||||
final var jarFile = connection.getJarFile();
|
||||
final String prefix = root + "/";
|
||||
final ArrayList<List<String>> modulePaths = new ArrayList<>();
|
||||
jarFile.stream()
|
||||
.map(JarEntry::getName)
|
||||
.filter(name -> name.startsWith(prefix) && name.endsWith("/main.pbs"))
|
||||
.forEach(name -> {
|
||||
final String directory = name.substring(prefix.length(), name.length() - "/main.pbs".length());
|
||||
if (!directory.isBlank() && jarFile.getEntry(prefix + directory + "/mod.barrel") != null) {
|
||||
modulePaths.add(List.of(directory.split("/")));
|
||||
}
|
||||
});
|
||||
return modulePaths;
|
||||
}
|
||||
|
||||
private static List<String> segments(final Path relative) {
|
||||
final ArrayList<String> segments = new ArrayList<>();
|
||||
for (final Path segment : relative) {
|
||||
segments.add(segment.toString());
|
||||
}
|
||||
return segments;
|
||||
}
|
||||
|
||||
private String moduleBasePath(
|
||||
final String project,
|
||||
final ReadOnlyList<String> pathSegments) {
|
||||
|
||||
+4
@@ -6,5 +6,9 @@ import java.util.Optional;
|
||||
|
||||
public interface StdlibEnvironment {
|
||||
Optional<StdlibModuleSource> resolveModule(String project, ReadOnlyList<String> pathSegments);
|
||||
|
||||
default ReadOnlyList<StdlibModuleSource> modules() {
|
||||
return ReadOnlyList.empty();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+75
-2
@@ -5,6 +5,7 @@ import p.studio.compiler.messages.BuildingIssueSink;
|
||||
import p.studio.compiler.messages.FESurfaceContext;
|
||||
import p.studio.compiler.messages.FrontendPhaseContext;
|
||||
import p.studio.compiler.models.IRBackend;
|
||||
import p.studio.compiler.models.SourceKind;
|
||||
import p.studio.compiler.pbs.PbsFrontendCompiler;
|
||||
import p.studio.compiler.pbs.PbsReservedMetadataExtractor;
|
||||
import p.studio.compiler.pbs.semantics.PbsFlowSemanticsValidator;
|
||||
@@ -14,9 +15,12 @@ import p.studio.compiler.pbs.stdlib.StdlibEnvironmentResolver;
|
||||
import p.studio.compiler.source.diagnostics.DiagnosticSink;
|
||||
import p.studio.compiler.source.identifiers.FileId;
|
||||
import p.studio.compiler.source.identifiers.ModuleId;
|
||||
import p.studio.compiler.source.tables.ModuleReference;
|
||||
import p.studio.utilities.logs.LogAggregator;
|
||||
import p.studio.utilities.structures.ReadOnlyList;
|
||||
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.util.*;
|
||||
|
||||
@Slf4j
|
||||
@@ -127,11 +131,15 @@ public class PBSFrontendPhaseService implements FrontendPhaseService {
|
||||
final Map<FileId, p.studio.compiler.pbs.ast.PbsAst.File> astByFile = new LinkedHashMap<>();
|
||||
final Map<FileId, ReadOnlyList<p.studio.compiler.pbs.ast.PbsAst.TopDecl>> supplementalTopDeclsByFile = new LinkedHashMap<>();
|
||||
final Map<FileId, ReadOnlyList<PbsInlineHintSurface>> inlineHintsByFile = new LinkedHashMap<>();
|
||||
final Map<FileId, SourceKind> sourceKindByFile = new LinkedHashMap<>();
|
||||
for (final var entry : importedSemanticContexts.entrySet()) {
|
||||
supplementalTopDeclsByFile.put(entry.getKey(), entry.getValue().supplementalTopDecls());
|
||||
}
|
||||
for (final var parsedSourceFile : assembly.parsedSourceFiles()) {
|
||||
astByFile.put(parsedSourceFile.fileId(), parsedSourceFile.ast());
|
||||
sourceKindByFile.put(
|
||||
parsedSourceFile.fileId(),
|
||||
parsedSourceFile.sourceKind() == null ? SourceKind.PROJECT : parsedSourceFile.sourceKind());
|
||||
final var importedSemanticContext = importedSemanticContexts.getOrDefault(
|
||||
parsedSourceFile.fileId(),
|
||||
PbsImportedSemanticContext.empty());
|
||||
@@ -144,16 +152,81 @@ public class PBSFrontendPhaseService implements FrontendPhaseService {
|
||||
inlineHintsByFile.put(parsedSourceFile.fileId(), inlineHints);
|
||||
}
|
||||
}
|
||||
final Map<ModuleReference, Path> physicalModuleFiles = physicalModuleFiles(ctx, assembly);
|
||||
return new PbsSemanticReadSurface(
|
||||
Map.copyOf(astByFile),
|
||||
Map.copyOf(supplementalTopDeclsByFile),
|
||||
Map.copyOf(inlineHintsByFile));
|
||||
Map.copyOf(inlineHintsByFile),
|
||||
Map.copyOf(sourceKindByFile),
|
||||
physicalModuleFiles,
|
||||
moduleCompletionLabels(ctx, physicalModuleFiles));
|
||||
}
|
||||
|
||||
private static Map<ModuleReference, Path> physicalModuleFiles(
|
||||
final FrontendPhaseContext ctx,
|
||||
final PbsModuleAssembly assembly) {
|
||||
final Map<ModuleReference, Path> files = new LinkedHashMap<>();
|
||||
if (ctx == null || ctx.fileTable == null || assembly == null || assembly.parsedSourceFiles() == null) {
|
||||
return Map.of();
|
||||
}
|
||||
for (final PbsParsedSourceFile parsed : assembly.parsedSourceFiles()) {
|
||||
if (parsed.fileId() == null || parsed.fileId().isNone()
|
||||
|| parsed.moduleId() == null || parsed.moduleId().isNone()) {
|
||||
continue;
|
||||
}
|
||||
final var handle = ctx.fileTable.get(parsed.fileId());
|
||||
if (handle == null || handle.getCanonPath() == null) {
|
||||
continue;
|
||||
}
|
||||
final Path path = handle.getCanonPath().toAbsolutePath().normalize();
|
||||
if (!Files.isRegularFile(path)) {
|
||||
continue;
|
||||
}
|
||||
final ModuleReference reference = assembly.moduleTable().get(parsed.moduleId());
|
||||
if (reference == null) {
|
||||
continue;
|
||||
}
|
||||
files.merge(reference, path, (left, right) ->
|
||||
left.toString().compareTo(right.toString()) <= 0 ? left : right);
|
||||
}
|
||||
return Map.copyOf(files);
|
||||
}
|
||||
|
||||
private static List<String> moduleCompletionLabels(
|
||||
final FrontendPhaseContext ctx,
|
||||
final Map<ModuleReference, Path> physicalModuleFiles) {
|
||||
final var labels = new java.util.TreeSet<String>();
|
||||
for (final ModuleReference reference : physicalModuleFiles.keySet()) {
|
||||
labels.add(moduleLabel(reference.project(), reference.pathSegments()));
|
||||
}
|
||||
if (ctx != null) {
|
||||
final var environment = new ResourceStdlibEnvironmentResolver().resolve(ctx.stdlibVersion(), ctx.target());
|
||||
for (final var module : environment.modules()) {
|
||||
labels.add(moduleLabel(module.project(), module.pathSegments()));
|
||||
}
|
||||
}
|
||||
return List.copyOf(labels);
|
||||
}
|
||||
|
||||
private static String moduleLabel(
|
||||
final String project,
|
||||
final ReadOnlyList<String> pathSegments) {
|
||||
if (project == null || project.isBlank()) {
|
||||
return "";
|
||||
}
|
||||
if (pathSegments == null || pathSegments.isEmpty()) {
|
||||
return "@" + project;
|
||||
}
|
||||
return "@" + project + ":" + String.join("/", pathSegments.asList());
|
||||
}
|
||||
|
||||
public record PbsSemanticReadSurface(
|
||||
Map<FileId, p.studio.compiler.pbs.ast.PbsAst.File> astByFile,
|
||||
Map<FileId, ReadOnlyList<p.studio.compiler.pbs.ast.PbsAst.TopDecl>> supplementalTopDeclsByFile,
|
||||
Map<FileId, ReadOnlyList<PbsInlineHintSurface>> inlineHintsByFile) {
|
||||
Map<FileId, ReadOnlyList<PbsInlineHintSurface>> inlineHintsByFile,
|
||||
Map<FileId, SourceKind> sourceKindByFile,
|
||||
Map<ModuleReference, Path> physicalModuleFileByReference,
|
||||
List<String> moduleCompletionLabels) {
|
||||
}
|
||||
|
||||
private IRBackend mergeCompiledSources(
|
||||
|
||||
+109
@@ -0,0 +1,109 @@
|
||||
package p.studio.compiler;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.io.TempDir;
|
||||
import p.studio.AppMode;
|
||||
import p.studio.compiler.messages.BuildingIssueSink;
|
||||
import p.studio.compiler.messages.FrontendPhaseContext;
|
||||
import p.studio.compiler.models.BuildStack;
|
||||
import p.studio.compiler.models.ProjectDescriptor;
|
||||
import p.studio.compiler.models.SourceHandle;
|
||||
import p.studio.compiler.services.FrontendDocumentRequest;
|
||||
import p.studio.compiler.source.diagnostics.DiagnosticSink;
|
||||
import p.studio.compiler.source.identifiers.FileId;
|
||||
import p.studio.compiler.source.tables.FileTable;
|
||||
import p.studio.compiler.source.tables.ProjectTable;
|
||||
import p.studio.compiler.utilities.SourceProviderFactory;
|
||||
import p.studio.utilities.structures.ReadOnlyList;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.attribute.BasicFileAttributes;
|
||||
import java.util.List;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
class PBSFrontendDocumentLinkTest {
|
||||
|
||||
@TempDir
|
||||
Path tempDir;
|
||||
|
||||
@Test
|
||||
void documentLinksUseTheAssembledPhysicalModuleFile() throws IOException {
|
||||
final Path projectRoot = tempDir.resolve("app");
|
||||
final Path sourceRoot = projectRoot.resolve("src");
|
||||
final Path sourceA = sourceRoot.resolve("a").resolve("source.pbs");
|
||||
final Path sourceB = sourceRoot.resolve("b").resolve("source.pbs");
|
||||
Files.createDirectories(sourceA.getParent());
|
||||
Files.createDirectories(sourceB.getParent());
|
||||
Files.writeString(sourceA, """
|
||||
fn target() -> int {
|
||||
return 1;
|
||||
}
|
||||
""");
|
||||
Files.writeString(sourceA.getParent().resolve("mod.barrel"), "pub fn target() -> int;\n");
|
||||
final String caller = """
|
||||
import { target } from @app:a;
|
||||
import { Log } from @sdk:log;
|
||||
import { Missing } from @app:missing;
|
||||
|
||||
fn caller() -> int {
|
||||
return target();
|
||||
}
|
||||
""";
|
||||
Files.writeString(sourceB, caller);
|
||||
Files.writeString(sourceB.getParent().resolve("mod.barrel"), "pub fn caller() -> int;\n");
|
||||
|
||||
final var projectTable = new ProjectTable();
|
||||
final var fileTable = new FileTable(1);
|
||||
final var projectId = projectTable.register(ProjectDescriptor.builder()
|
||||
.rootPath(projectRoot)
|
||||
.name("app")
|
||||
.version("1.0.0")
|
||||
.sourceRoots(ReadOnlyList.wrap(List.of(sourceRoot)))
|
||||
.build());
|
||||
register(projectId, projectRoot, sourceA, fileTable);
|
||||
register(projectId, projectRoot, sourceA.getParent().resolve("mod.barrel"), fileTable);
|
||||
final FileId callerId = register(projectId, projectRoot, sourceB, fileTable);
|
||||
register(projectId, projectRoot, sourceB.getParent().resolve("mod.barrel"), fileTable);
|
||||
|
||||
final var phaseContext = new FrontendPhaseContext(
|
||||
projectTable,
|
||||
fileTable,
|
||||
new BuildStack(ReadOnlyList.wrap(List.of(projectId))),
|
||||
AppMode.Game);
|
||||
final var service = new PBSFrontendLanguageService();
|
||||
final var editorialContext = service.prepareEditorialContext(phaseContext, callerId).orElseThrow();
|
||||
final var links = service.documentLinks(
|
||||
new FrontendDocumentRequest(projectRoot, sourceB, caller),
|
||||
editorialContext);
|
||||
|
||||
assertEquals(1, links.size());
|
||||
assertEquals(sourceA.toAbsolutePath().normalize(), links.getFirst().path());
|
||||
final byte[] bytes = caller.getBytes(StandardCharsets.UTF_8);
|
||||
assertEquals("@app:a", new String(
|
||||
bytes,
|
||||
links.getFirst().startOffset(),
|
||||
links.getFirst().endOffset() - links.getFirst().startOffset(),
|
||||
StandardCharsets.UTF_8));
|
||||
assertTrue(service.documentLinksSupported());
|
||||
}
|
||||
|
||||
private static FileId register(
|
||||
final p.studio.compiler.source.identifiers.ProjectId projectId,
|
||||
final Path projectRoot,
|
||||
final Path file,
|
||||
final FileTable fileTable) throws IOException {
|
||||
final BasicFileAttributes attributes = Files.readAttributes(file, BasicFileAttributes.class);
|
||||
return fileTable.register(new SourceHandle(
|
||||
projectId,
|
||||
projectRoot.relativize(file),
|
||||
file,
|
||||
attributes.size(),
|
||||
attributes.lastModifiedTime().toMillis(),
|
||||
SourceProviderFactory.filesystem()));
|
||||
}
|
||||
}
|
||||
+127
@@ -0,0 +1,127 @@
|
||||
package p.studio.compiler;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.io.TempDir;
|
||||
import p.studio.AppMode;
|
||||
import p.studio.compiler.messages.FrontendPhaseContext;
|
||||
import p.studio.compiler.models.BuildStack;
|
||||
import p.studio.compiler.models.ProjectDescriptor;
|
||||
import p.studio.compiler.models.SourceHandle;
|
||||
import p.studio.compiler.services.FrontendCompletionCandidate;
|
||||
import p.studio.compiler.services.FrontendDocumentRequest;
|
||||
import p.studio.compiler.services.FrontendSymbolKind;
|
||||
import p.studio.compiler.source.identifiers.FileId;
|
||||
import p.studio.compiler.source.identifiers.ProjectId;
|
||||
import p.studio.compiler.source.tables.FileTable;
|
||||
import p.studio.compiler.source.tables.ProjectTable;
|
||||
import p.studio.compiler.utilities.SourceProviderFactory;
|
||||
import p.studio.utilities.structures.ReadOnlyList;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.attribute.BasicFileAttributes;
|
||||
import java.util.List;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
class PBSFrontendModuleCompletionTest {
|
||||
|
||||
@TempDir
|
||||
Path tempDir;
|
||||
|
||||
@Test
|
||||
void moduleRefCompletionListsKnownModulesAndMemberCompletionStays() throws IOException {
|
||||
final Path projectRoot = tempDir.resolve("app");
|
||||
final Path sourceRoot = projectRoot.resolve("src");
|
||||
final Path moduleA = sourceRoot.resolve("a").resolve("source.pbs");
|
||||
final Path main = sourceRoot.resolve("main.pbs");
|
||||
Files.createDirectories(moduleA.getParent());
|
||||
Files.writeString(moduleA, """
|
||||
fn target() -> int {
|
||||
return 1;
|
||||
}
|
||||
""");
|
||||
Files.writeString(moduleA.getParent().resolve("mod.barrel"), "pub fn target() -> int;\n");
|
||||
final String caller = """
|
||||
import { Log } from @sdk:log;
|
||||
|
||||
declare struct Vec() {
|
||||
fn blend(dx: int, dy: int) -> int { return dx; }
|
||||
}
|
||||
|
||||
fn frame(vec: Vec) -> void {
|
||||
vec.blend(1, 2);
|
||||
}
|
||||
""";
|
||||
Files.writeString(main, caller);
|
||||
Files.writeString(sourceRoot.resolve("mod.barrel"), """
|
||||
pub struct Vec();
|
||||
pub fn frame(vec: Vec) -> void;
|
||||
""");
|
||||
|
||||
final var projectTable = new ProjectTable();
|
||||
final var fileTable = new FileTable(1);
|
||||
final ProjectId projectId = projectTable.register(ProjectDescriptor.builder()
|
||||
.rootPath(projectRoot)
|
||||
.name("app")
|
||||
.version("1.0.0")
|
||||
.sourceRoots(ReadOnlyList.wrap(List.of(sourceRoot)))
|
||||
.build());
|
||||
register(projectId, projectRoot, moduleA, fileTable);
|
||||
register(projectId, projectRoot, moduleA.getParent().resolve("mod.barrel"), fileTable);
|
||||
final FileId mainId = register(projectId, projectRoot, main, fileTable);
|
||||
register(projectId, projectRoot, sourceRoot.resolve("mod.barrel"), fileTable);
|
||||
|
||||
final var phaseContext = new FrontendPhaseContext(
|
||||
projectTable,
|
||||
fileTable,
|
||||
new BuildStack(ReadOnlyList.wrap(List.of(projectId))),
|
||||
AppMode.Game);
|
||||
final var service = new PBSFrontendLanguageService();
|
||||
final var editorialContext = service.prepareEditorialContext(phaseContext, mainId).orElseThrow();
|
||||
final var request = new FrontendDocumentRequest(projectRoot, main, caller);
|
||||
|
||||
final var moduleCompletion = service.completion(request, editorialContext, byteOffset(caller, "@sdk:log"));
|
||||
assertTrue(labels(moduleCompletion).contains("@sdk:log"));
|
||||
assertTrue(labels(moduleCompletion).contains("@app:a"));
|
||||
assertTrue(moduleCompletion.stream().allMatch(candidate -> candidate.kind() == FrontendSymbolKind.MODULE));
|
||||
|
||||
final int afterDot = caller.indexOf("vec.") + "vec.".length();
|
||||
final var memberCompletion = service.completion(
|
||||
request,
|
||||
editorialContext,
|
||||
caller.substring(0, afterDot).getBytes(StandardCharsets.UTF_8).length);
|
||||
assertTrue(labels(memberCompletion).contains("blend"), labels(memberCompletion).toString());
|
||||
assertFalse(labels(memberCompletion).contains("@sdk:log"));
|
||||
}
|
||||
|
||||
private static List<String> labels(final List<FrontendCompletionCandidate> candidates) {
|
||||
return candidates.stream().map(FrontendCompletionCandidate::label).toList();
|
||||
}
|
||||
|
||||
private static int byteOffset(final String source, final String marker) {
|
||||
final int index = source.indexOf(marker);
|
||||
if (index < 0) {
|
||||
throw new IllegalArgumentException(marker);
|
||||
}
|
||||
return source.substring(0, index + 1).getBytes(StandardCharsets.UTF_8).length;
|
||||
}
|
||||
|
||||
private static FileId register(
|
||||
final ProjectId projectId,
|
||||
final Path projectRoot,
|
||||
final Path file,
|
||||
final FileTable fileTable) throws IOException {
|
||||
final BasicFileAttributes attributes = Files.readAttributes(file, BasicFileAttributes.class);
|
||||
return fileTable.register(new SourceHandle(
|
||||
projectId,
|
||||
projectRoot.relativize(file),
|
||||
file,
|
||||
attributes.size(),
|
||||
attributes.lastModifiedTime().toMillis(),
|
||||
SourceProviderFactory.filesystem()));
|
||||
}
|
||||
}
|
||||
+73
@@ -0,0 +1,73 @@
|
||||
package p.studio.compiler.pbs;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import p.studio.compiler.pbs.ast.PbsAst;
|
||||
import p.studio.compiler.pbs.lexer.PbsLexer;
|
||||
import p.studio.compiler.pbs.parser.PbsParser;
|
||||
import p.studio.compiler.source.diagnostics.DiagnosticSink;
|
||||
import p.studio.compiler.source.identifiers.FileId;
|
||||
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
class PbsCallHierarchyTest {
|
||||
private static final String SOURCE = """
|
||||
fn helper() -> int {
|
||||
return 1;
|
||||
}
|
||||
|
||||
declare struct Box() {
|
||||
fn blend(dx: int) -> int {
|
||||
return dx;
|
||||
}
|
||||
}
|
||||
|
||||
fn main(box: Box) -> int {
|
||||
box.blend(1);
|
||||
return helper();
|
||||
}
|
||||
""";
|
||||
|
||||
@Test
|
||||
void functionAndMethodCallsComeFromTheAst() {
|
||||
final PbsAst.File ast = parse(SOURCE);
|
||||
final int mainOffset = byteOffset(SOURCE, "fn main");
|
||||
final var prepared = PbsCallHierarchy.prepare(ast, mainOffset);
|
||||
assertEquals(1, prepared.size());
|
||||
assertEquals("main", prepared.getFirst().name());
|
||||
assertEquals(false, prepared.getFirst().method());
|
||||
|
||||
final var outgoing = PbsCallHierarchy.outgoingCalls(ast, prepared.getFirst());
|
||||
assertTrue(outgoing.stream().anyMatch(call -> call.callee().name().equals("helper") && !call.callee().method()));
|
||||
assertTrue(outgoing.stream().anyMatch(call -> call.callee().name().equals("blend") && call.callee().method()));
|
||||
|
||||
final int helperOffset = byteOffset(SOURCE, "fn helper");
|
||||
final var helper = PbsCallHierarchy.prepare(ast, helperOffset).getFirst();
|
||||
final var incoming = PbsCallHierarchy.incomingCalls(ast, helper);
|
||||
assertEquals(1, incoming.size());
|
||||
assertEquals("main", incoming.getFirst().caller().name());
|
||||
}
|
||||
|
||||
@Test
|
||||
void aStructNameIsNotACallable() {
|
||||
final PbsAst.File ast = parse(SOURCE);
|
||||
assertTrue(PbsCallHierarchy.prepare(ast, byteOffset(SOURCE, "struct Box")).isEmpty());
|
||||
}
|
||||
|
||||
private static PbsAst.File parse(final String source) {
|
||||
return PbsParser.parse(
|
||||
PbsLexer.lex(source, FileId.none(), DiagnosticSink.empty()),
|
||||
FileId.none(),
|
||||
DiagnosticSink.empty());
|
||||
}
|
||||
|
||||
private static int byteOffset(final String source, final String marker) {
|
||||
final int index = source.indexOf(marker);
|
||||
if (index < 0) {
|
||||
throw new IllegalArgumentException(marker);
|
||||
}
|
||||
return source.substring(0, index + 1).getBytes(StandardCharsets.UTF_8).length;
|
||||
}
|
||||
}
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
package p.studio.compiler.pbs;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
class PbsDocumentFormatterTest {
|
||||
|
||||
@Test
|
||||
void indentsOnlyWhereBraceOrParenNestingChanges() {
|
||||
final String source = """
|
||||
fn length(value: int) -> int {
|
||||
return value;
|
||||
}
|
||||
fn other() -> int {
|
||||
return 1;
|
||||
}
|
||||
""";
|
||||
|
||||
final String formatted = PbsDocumentFormatter.format(source);
|
||||
|
||||
assertEquals("""
|
||||
fn length(value: int) -> int {
|
||||
return value;
|
||||
}
|
||||
fn other() -> int {
|
||||
return 1;
|
||||
}
|
||||
""", formatted);
|
||||
assertTrue(formatted.indexOf("fn length") < formatted.indexOf("fn other"));
|
||||
assertFalse(formatted.contains("\nreturn value;\nreturn 1;"));
|
||||
}
|
||||
|
||||
@Test
|
||||
void leavesDocTextBlockInteriorAndTrailingCommentUntouched() {
|
||||
final String source = """
|
||||
[Doc(markdown = \"\"\"
|
||||
hello
|
||||
\"\"\")]
|
||||
fn length() -> int { // keep
|
||||
return 1;
|
||||
}
|
||||
""";
|
||||
|
||||
final String formatted = PbsDocumentFormatter.format(source);
|
||||
|
||||
assertTrue(formatted.contains(" hello\n"));
|
||||
assertTrue(formatted.contains("fn length() -> int { // keep"));
|
||||
assertTrue(formatted.contains("\n return 1;\n"));
|
||||
}
|
||||
}
|
||||
+91
@@ -0,0 +1,91 @@
|
||||
package p.studio.compiler.pbs;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import p.studio.compiler.PBSFrontendLanguageService;
|
||||
import p.studio.compiler.PBSSemanticTokenProvider;
|
||||
import p.studio.compiler.messages.FESurfaceContext;
|
||||
import p.studio.compiler.models.FrontendSemanticToken;
|
||||
import p.studio.compiler.pbs.ast.PbsAst;
|
||||
import p.studio.compiler.pbs.lexer.PbsLexer;
|
||||
import p.studio.compiler.pbs.parser.PbsParser;
|
||||
import p.studio.compiler.services.FrontendDocumentRequest;
|
||||
import p.studio.compiler.services.FrontendEditorialContext;
|
||||
import p.studio.compiler.source.diagnostics.DiagnosticSink;
|
||||
import p.studio.compiler.source.identifiers.FileId;
|
||||
import p.studio.utilities.structures.ReadOnlyList;
|
||||
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Path;
|
||||
import java.util.List;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
class PbsSemanticTokenOverlayTest {
|
||||
|
||||
@Test
|
||||
void resolvedFunctionUseReplacesTheIdentifierBaseline() {
|
||||
final String source = """
|
||||
fn helper() -> int {
|
||||
return 1;
|
||||
}
|
||||
|
||||
fn main() -> int {
|
||||
return helper;
|
||||
}
|
||||
""";
|
||||
final PbsAst.File ast = PbsParser.parse(
|
||||
PbsLexer.lex(source, FileId.none(), DiagnosticSink.empty()),
|
||||
FileId.none(),
|
||||
DiagnosticSink.empty());
|
||||
final var service = new PBSFrontendLanguageService();
|
||||
final var tokens = service.semanticTokens(
|
||||
new FrontendDocumentRequest(Path.of("."), Path.of("demo.pbs"), source),
|
||||
new FrontendEditorialContext(ast, ReadOnlyList.empty(), FESurfaceContext.empty()));
|
||||
|
||||
assertEquals(PbsSemanticKind.FUNCTION.semanticKey(), keyAt(source, tokens, "return helper"));
|
||||
assertTrue(tokens.stream().anyMatch(token -> token.semanticKey().equals(PbsSemanticKind.KEYWORD.semanticKey())));
|
||||
}
|
||||
|
||||
@Test
|
||||
void localBindingAndBrokenTextKeepTheBaselineToken() {
|
||||
final String source = """
|
||||
fn main() -> int {
|
||||
let value: int = 1;
|
||||
return value;
|
||||
}
|
||||
""";
|
||||
final PbsAst.File ast = PbsParser.parse(
|
||||
PbsLexer.lex(source, FileId.none(), DiagnosticSink.empty()),
|
||||
FileId.none(),
|
||||
DiagnosticSink.empty());
|
||||
final var service = new PBSFrontendLanguageService();
|
||||
final var request = new FrontendDocumentRequest(Path.of("."), Path.of("demo.pbs"), source);
|
||||
final var overlaid = service.semanticTokens(
|
||||
request,
|
||||
new FrontendEditorialContext(ast, ReadOnlyList.empty(), FESurfaceContext.empty()));
|
||||
|
||||
assertEquals(PbsSemanticKind.IDENTIFIER.semanticKey(), keyAt(source, overlaid, "return value"));
|
||||
|
||||
final String broken = "fn main( {";
|
||||
final List<FrontendSemanticToken> baseline = new PBSSemanticTokenProvider().tokenize(broken);
|
||||
final List<FrontendSemanticToken> withoutContext = service.semanticTokens(
|
||||
new FrontendDocumentRequest(Path.of("."), Path.of("broken.pbs"), broken));
|
||||
assertEquals(baseline, withoutContext);
|
||||
assertTrue(withoutContext.stream().anyMatch(token ->
|
||||
token.semanticKey().equals(PbsSemanticKind.KEYWORD.semanticKey())));
|
||||
}
|
||||
|
||||
private static String keyAt(
|
||||
final String source,
|
||||
final List<FrontendSemanticToken> tokens,
|
||||
final String marker) {
|
||||
final int nameOffset = source.indexOf(marker) + marker.lastIndexOf(' ') + 1;
|
||||
final int byteOffset = source.substring(0, nameOffset).getBytes(StandardCharsets.UTF_8).length;
|
||||
return tokens.stream()
|
||||
.filter(token -> token.startOffset() == byteOffset)
|
||||
.map(FrontendSemanticToken::semanticKey)
|
||||
.findFirst()
|
||||
.orElseThrow();
|
||||
}
|
||||
}
|
||||
+73
@@ -0,0 +1,73 @@
|
||||
package p.studio.compiler.pbs;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import p.studio.compiler.services.FrontendFoldingRange;
|
||||
import p.studio.compiler.services.FrontendSelectionRange;
|
||||
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.List;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
class PbsStructureRangesTest {
|
||||
private static final String SOURCE = """
|
||||
[Doc(markdown = \"\"\"
|
||||
hello
|
||||
\"\"\")]
|
||||
fn length(value: int) -> int {
|
||||
return value;
|
||||
}
|
||||
""";
|
||||
|
||||
@Test
|
||||
void foldingUsesDeclarationBodyParameterListAndDocText() {
|
||||
final var ranges = PbsStructureRanges.foldingRanges(SOURCE);
|
||||
final var slices = ranges.stream().map(range -> slice(SOURCE, range)).toList();
|
||||
|
||||
assertTrue(slices.stream().anyMatch(slice -> slice.contains("hello")), slices.toString());
|
||||
assertTrue(slices.stream().anyMatch(slice -> slice.equals("(value: int)")), slices.toString());
|
||||
assertTrue(slices.stream().anyMatch(slice -> slice.startsWith("{")), slices.toString());
|
||||
assertTrue(slices.stream().anyMatch(slice -> slice.contains("fn length")), slices.toString());
|
||||
}
|
||||
|
||||
@Test
|
||||
void selectionGrowsFromIdentifierToBlockToDeclaration() {
|
||||
final int marker = SOURCE.indexOf("return value");
|
||||
assertTrue(marker >= 0, SOURCE);
|
||||
final int offset = marker + "return ".length();
|
||||
final var selections = PbsStructureRanges.selectionRanges(SOURCE, List.of(offset));
|
||||
assertEquals(1, selections.size(), "offset " + offset);
|
||||
final FrontendSelectionRange selection = selections.getFirst();
|
||||
|
||||
assertEquals("value", slice(SOURCE, selection.startOffset(), selection.endOffset()));
|
||||
assertNotNull(selection.parent());
|
||||
assertTrue(slice(SOURCE, selection.parent().startOffset(), selection.parent().endOffset()).startsWith("{"));
|
||||
assertNotNull(selection.parent().parent());
|
||||
assertTrue(slice(SOURCE, selection.parent().parent().startOffset(), selection.parent().parent().endOffset())
|
||||
.contains("fn length"));
|
||||
}
|
||||
|
||||
@Test
|
||||
void unmatchedBraceFoldsThroughTheEndOfTheText() {
|
||||
final String broken = """
|
||||
fn broken() -> void {
|
||||
let x: int = 1;
|
||||
""";
|
||||
final int textEnd = broken.getBytes(StandardCharsets.UTF_8).length;
|
||||
final var ranges = PbsStructureRanges.foldingRanges(broken);
|
||||
|
||||
assertTrue(ranges.stream().anyMatch(range ->
|
||||
range.endOffset() == textEnd && slice(broken, range).startsWith("{")));
|
||||
}
|
||||
|
||||
private static String slice(final String text, final FrontendFoldingRange range) {
|
||||
return slice(text, range.startOffset(), range.endOffset());
|
||||
}
|
||||
|
||||
private static String slice(final String text, final int start, final int end) {
|
||||
final byte[] bytes = text.getBytes(StandardCharsets.UTF_8);
|
||||
return new String(bytes, start, end - start, StandardCharsets.UTF_8);
|
||||
}
|
||||
}
|
||||
+234
@@ -0,0 +1,234 @@
|
||||
package p.studio.compiler.pbs.semantics;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import p.studio.compiler.models.SourceKind;
|
||||
import p.studio.compiler.pbs.ast.PbsAst;
|
||||
import p.studio.compiler.pbs.lexer.PbsLexer;
|
||||
import p.studio.compiler.pbs.parser.PbsParser;
|
||||
import p.studio.compiler.source.diagnostics.Diagnostic;
|
||||
import p.studio.compiler.source.diagnostics.DiagnosticSink;
|
||||
import p.studio.compiler.source.identifiers.FileId;
|
||||
import p.studio.compiler.source.tables.NameTable;
|
||||
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
class PbsQuickFixCollectorTest {
|
||||
|
||||
@Test
|
||||
void duplicateDocRepairsMatchValidatorSpansAndKeepTheFirstCopy() {
|
||||
final var parsed = parse("""
|
||||
[Doc(markdown = \"""
|
||||
First.
|
||||
\""")]
|
||||
[Doc(markdown = \"""
|
||||
Second.
|
||||
\""")]
|
||||
[Doc(markdown = \"""
|
||||
Third.
|
||||
\""")]
|
||||
fn duplicated() -> void { return; }
|
||||
|
||||
declare struct Player(x: int) {
|
||||
[Doc(markdown = \"""
|
||||
Kept.
|
||||
\""")]
|
||||
[Doc(markdown = \"""
|
||||
Extra method.
|
||||
\""")]
|
||||
fn update() -> void { return; }
|
||||
}
|
||||
""", SourceKind.PROJECT);
|
||||
|
||||
final var duplicates = diagnostics(parsed, PbsSemanticsErrors.E_SEM_DUPLICATE_RESERVED_ATTRIBUTE.name());
|
||||
assertEquals(3, duplicates.size(), parsed.diagnostics().stream().map(Diagnostic::getMessage).toList().toString());
|
||||
assertEquals(3, parsed.repairs().size());
|
||||
assertTrue(parsed.repairs().stream().allMatch(repair ->
|
||||
repair.newText().isEmpty()
|
||||
&& repair.title().equals(PbsQuickFixCollector.REMOVE_DUPLICATE_TITLE)
|
||||
&& repair.diagnosticCode().equals(PbsSemanticsErrors.E_SEM_DUPLICATE_RESERVED_ATTRIBUTE.name())));
|
||||
assertRepairsMatchDiagnostics(parsed);
|
||||
|
||||
final String edited = apply(parsed.source(), parsed.repairs());
|
||||
assertTrue(edited.contains("First."));
|
||||
assertTrue(edited.contains("Kept."));
|
||||
assertFalse(edited.contains("Second."));
|
||||
assertFalse(edited.contains("Third."));
|
||||
assertFalse(edited.contains("Extra method."));
|
||||
}
|
||||
|
||||
@Test
|
||||
void malformedAndEmptyDocProduceNoRepair() {
|
||||
final var parsed = parse("""
|
||||
[Doc(text = \"""
|
||||
Wrong argument.
|
||||
\""")]
|
||||
fn malformed() -> void { return; }
|
||||
|
||||
[Doc(markdown = \"""
|
||||
|
||||
\""")]
|
||||
fn empty() -> void { return; }
|
||||
|
||||
[InitAllowed(flag = 1)]
|
||||
fn frame() -> void { return; }
|
||||
""", SourceKind.PROJECT);
|
||||
|
||||
assertTrue(diagnostics(parsed, PbsSemanticsErrors.E_SEM_MALFORMED_RESERVED_ATTRIBUTE.name()).size() >= 2);
|
||||
assertTrue(parsed.repairs().isEmpty(), parsed.repairs().toString());
|
||||
}
|
||||
|
||||
@Test
|
||||
void initAllowedArgumentsAreRewrittenOnlyForInterfaceHostSignatures() {
|
||||
final var parsed = parse("""
|
||||
declare host Gfx {
|
||||
[Host(module = "gfx2d", name = "clear", version = 1)]
|
||||
[InitAllowed(flag = 1)]
|
||||
fn clear() -> void;
|
||||
|
||||
[Host(module = "gfx2d", name = "fill", version = 1)]
|
||||
[InitAllowed()]
|
||||
fn fill() -> void;
|
||||
|
||||
[Host(module = "gfx2d", name = "blit", version = 1)]
|
||||
[InitAllowed]
|
||||
fn blit() -> void;
|
||||
|
||||
[Host(module = "gfx2d")]
|
||||
fn broken() -> void;
|
||||
|
||||
[Host(module = "gfx2d", name = "copy", version = 1)]
|
||||
[Host(module = "gfx2d", name = "copy", version = 1)]
|
||||
fn copy() -> void;
|
||||
}
|
||||
""", SourceKind.SDK_INTERFACE);
|
||||
|
||||
final var argumentRepairs = parsed.repairs().stream()
|
||||
.filter(repair -> repair.newText().equals("[InitAllowed]"))
|
||||
.toList();
|
||||
assertEquals(1, argumentRepairs.size(), parsed.repairs().toString());
|
||||
assertEquals(PbsSemanticsErrors.E_SEM_MALFORMED_RESERVED_ATTRIBUTE.name(), argumentRepairs.getFirst().diagnosticCode());
|
||||
assertEquals(PbsQuickFixCollector.REMOVE_INIT_ALLOWED_ARGUMENTS_TITLE, argumentRepairs.getFirst().title());
|
||||
assertRepairsMatchDiagnostics(parsed);
|
||||
|
||||
final var duplicateRepairs = parsed.repairs().stream()
|
||||
.filter(repair -> repair.diagnosticCode().equals(PbsSemanticsErrors.E_SEM_DUPLICATE_RESERVED_ATTRIBUTE.name()))
|
||||
.toList();
|
||||
assertEquals(1, duplicateRepairs.size());
|
||||
assertTrue(duplicateRepairs.getFirst().newText().isEmpty());
|
||||
|
||||
final String edited = apply(parsed.source(), parsed.repairs());
|
||||
assertTrue(edited.contains("[InitAllowed]\n"));
|
||||
assertFalse(edited.contains("flag = 1"));
|
||||
assertTrue(edited.contains("[InitAllowed()]"));
|
||||
assertEquals(1, count(edited, "[Host(module = \"gfx2d\", name = \"copy\", version = 1)]"));
|
||||
|
||||
final var projectHost = parse("""
|
||||
declare host Gfx {
|
||||
[Host(module = "gfx2d", name = "clear", version = 1)]
|
||||
[InitAllowed(flag = 1)]
|
||||
fn clear() -> void;
|
||||
}
|
||||
""", SourceKind.PROJECT);
|
||||
assertTrue(projectHost.repairs().stream().noneMatch(repair -> repair.newText().equals("[InitAllowed]")));
|
||||
}
|
||||
|
||||
@Test
|
||||
void builtinConstTypeIntrinsicAndAssetLoweringDuplicatesAreDeleted() {
|
||||
final var parsed = parse("""
|
||||
[BuiltinType(name = "Color", version = 1)]
|
||||
[BuiltinType(name = "Color", version = 1)]
|
||||
declare builtin type Color(
|
||||
pub raw: int
|
||||
) {
|
||||
[IntrinsicCall(name = "width", version = 1)]
|
||||
[IntrinsicCall(name = "width", version = 1)]
|
||||
fn width() -> int;
|
||||
}
|
||||
[BuiltinConst(target = "Color", name = "white", version = 1)]
|
||||
[BuiltinConst(target = "Color", name = "white", version = 1)]
|
||||
declare const WHITE: Color;
|
||||
declare host LowAssets {
|
||||
[Host(module = "asset", name = "load", version = 1)]
|
||||
[AssetLowering(param = 0)]
|
||||
[AssetLowering(param = 0)]
|
||||
fn load(addressable: int) -> void;
|
||||
}
|
||||
""", SourceKind.SDK_INTERFACE);
|
||||
|
||||
assertEquals(4, parsed.repairs().size(), parsed.repairs().toString());
|
||||
assertTrue(parsed.repairs().stream().allMatch(repair ->
|
||||
repair.newText().isEmpty()
|
||||
&& repair.diagnosticCode().equals(PbsSemanticsErrors.E_SEM_DUPLICATE_RESERVED_ATTRIBUTE.name())));
|
||||
assertRepairsMatchDiagnostics(parsed);
|
||||
final String edited = apply(parsed.source(), parsed.repairs());
|
||||
assertEquals(1, count(edited, "[BuiltinType(name = \"Color\", version = 1)]"));
|
||||
assertEquals(1, count(edited, "[IntrinsicCall(name = \"width\", version = 1)]"));
|
||||
assertEquals(1, count(edited, "[BuiltinConst(target = \"Color\", name = \"white\", version = 1)]"));
|
||||
assertEquals(1, count(edited, "[AssetLowering(param = 0)]"));
|
||||
}
|
||||
|
||||
private static Parsed parse(final String source, final SourceKind sourceKind) {
|
||||
final var diagnostics = DiagnosticSink.empty();
|
||||
final var fileId = new FileId(0);
|
||||
final var tokens = PbsLexer.lex(source, fileId, diagnostics);
|
||||
final var parseMode = sourceKind == SourceKind.SDK_INTERFACE
|
||||
? PbsParser.ParseMode.INTERFACE_MODULE
|
||||
: PbsParser.ParseMode.ORDINARY;
|
||||
final PbsAst.File ast = PbsParser.parse(tokens, fileId, diagnostics, parseMode);
|
||||
new PbsDeclarationSemanticsValidator(new NameTable()).validate(ast, sourceKind, diagnostics);
|
||||
return new Parsed(
|
||||
source,
|
||||
diagnostics,
|
||||
PbsQuickFixCollector.collect(ast, sourceKind == SourceKind.SDK_INTERFACE));
|
||||
}
|
||||
|
||||
private static List<Diagnostic> diagnostics(final Parsed parsed, final String code) {
|
||||
return parsed.diagnostics().stream().filter(diagnostic -> diagnostic.getCode().equals(code)).toList();
|
||||
}
|
||||
|
||||
private static void assertRepairsMatchDiagnostics(final Parsed parsed) {
|
||||
for (final PbsQuickFix repair : parsed.repairs()) {
|
||||
assertTrue(parsed.diagnostics().stream().anyMatch(diagnostic ->
|
||||
diagnostic.getCode().equals(repair.diagnosticCode())
|
||||
&& diagnostic.getSpan().getStart() == repair.startOffset()
|
||||
&& diagnostic.getSpan().getEnd() == repair.endOffset()),
|
||||
repair + " missing from " + parsed.diagnostics());
|
||||
}
|
||||
}
|
||||
|
||||
private static String apply(final String source, final List<PbsQuickFix> repairs) {
|
||||
final var ordered = repairs.stream()
|
||||
.sorted(Comparator.comparingInt(PbsQuickFix::startOffset).reversed())
|
||||
.toList();
|
||||
String current = source;
|
||||
for (final PbsQuickFix repair : ordered) {
|
||||
current = current.substring(0, repair.startOffset()) + repair.newText() + current.substring(repair.endOffset());
|
||||
}
|
||||
return current;
|
||||
}
|
||||
|
||||
private static int count(final String source, final String needle) {
|
||||
int count = 0;
|
||||
int from = 0;
|
||||
while (from <= source.length()) {
|
||||
final int found = source.indexOf(needle, from);
|
||||
if (found < 0) {
|
||||
return count;
|
||||
}
|
||||
count += 1;
|
||||
from = found + needle.length();
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
private record Parsed(
|
||||
String source,
|
||||
DiagnosticSink diagnostics,
|
||||
List<PbsQuickFix> repairs) {
|
||||
}
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
package p.studio.compiler.services;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public record FrontendCallHierarchyItem(
|
||||
String name,
|
||||
boolean method,
|
||||
int startOffset,
|
||||
int endOffset) {
|
||||
|
||||
public FrontendCallHierarchyItem {
|
||||
name = Objects.requireNonNull(name, "name").trim();
|
||||
if (name.isEmpty()) {
|
||||
throw new IllegalArgumentException("name must not be blank");
|
||||
}
|
||||
if (startOffset < 0 || endOffset < startOffset) {
|
||||
throw new IllegalArgumentException("call hierarchy range is invalid");
|
||||
}
|
||||
}
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package p.studio.compiler.services;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public record FrontendCallSite(
|
||||
FrontendCallHierarchyItem item,
|
||||
int startOffset,
|
||||
int endOffset) {
|
||||
|
||||
public FrontendCallSite {
|
||||
item = Objects.requireNonNull(item, "item");
|
||||
if (startOffset < 0 || endOffset < startOffset) {
|
||||
throw new IllegalArgumentException("call site range is invalid");
|
||||
}
|
||||
}
|
||||
}
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
package p.studio.compiler.services;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.util.Objects;
|
||||
|
||||
public record FrontendCodeAction(
|
||||
String title,
|
||||
String diagnosticCode,
|
||||
Path path,
|
||||
int startOffset,
|
||||
int endOffset,
|
||||
String newText) {
|
||||
|
||||
public FrontendCodeAction {
|
||||
title = requireText(title, "title");
|
||||
diagnosticCode = requireText(diagnosticCode, "diagnosticCode");
|
||||
path = Objects.requireNonNull(path, "path").toAbsolutePath().normalize();
|
||||
if (startOffset < 0) {
|
||||
throw new IllegalArgumentException("startOffset must not be negative");
|
||||
}
|
||||
if (endOffset < startOffset) {
|
||||
throw new IllegalArgumentException("endOffset must not be before startOffset");
|
||||
}
|
||||
newText = Objects.requireNonNull(newText, "newText");
|
||||
}
|
||||
|
||||
private static String requireText(
|
||||
final String value,
|
||||
final String field) {
|
||||
final String candidate = Objects.requireNonNull(value, field).trim();
|
||||
if (candidate.isEmpty()) {
|
||||
throw new IllegalArgumentException(field + " must not be blank");
|
||||
}
|
||||
return candidate;
|
||||
}
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
package p.studio.compiler.services;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.util.Objects;
|
||||
|
||||
public record FrontendDocumentLink(
|
||||
Path path,
|
||||
int startOffset,
|
||||
int endOffset) {
|
||||
|
||||
public FrontendDocumentLink {
|
||||
path = Objects.requireNonNull(path, "path").toAbsolutePath().normalize();
|
||||
if (startOffset < 0) {
|
||||
throw new IllegalArgumentException("startOffset must not be negative");
|
||||
}
|
||||
if (endOffset < startOffset) {
|
||||
throw new IllegalArgumentException("endOffset must not be before startOffset");
|
||||
}
|
||||
}
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
package p.studio.compiler.services;
|
||||
|
||||
public record FrontendFoldingRange(
|
||||
int startOffset,
|
||||
int endOffset) {
|
||||
|
||||
public FrontendFoldingRange {
|
||||
if (startOffset < 0) {
|
||||
throw new IllegalArgumentException("startOffset must not be negative");
|
||||
}
|
||||
if (endOffset < startOffset) {
|
||||
throw new IllegalArgumentException("endOffset must not be before startOffset");
|
||||
}
|
||||
}
|
||||
}
|
||||
+98
@@ -26,6 +26,12 @@ public interface FrontendLanguageService {
|
||||
return List.of();
|
||||
}
|
||||
|
||||
default List<FrontendSemanticToken> semanticTokens(
|
||||
final FrontendDocumentRequest request,
|
||||
final FrontendEditorialContext editorialContext) {
|
||||
return semanticTokens(request);
|
||||
}
|
||||
|
||||
default List<FrontendCompletionCandidate> completion(
|
||||
final FrontendDocumentRequest request,
|
||||
final int offset) {
|
||||
@@ -138,4 +144,96 @@ public interface FrontendLanguageService {
|
||||
final String newName) {
|
||||
return rename(request, offset, newName);
|
||||
}
|
||||
|
||||
default boolean documentLinksSupported() {
|
||||
return false;
|
||||
}
|
||||
|
||||
default List<FrontendDocumentLink> documentLinks(final FrontendDocumentRequest request) {
|
||||
return List.of();
|
||||
}
|
||||
|
||||
default List<FrontendDocumentLink> documentLinks(
|
||||
final FrontendDocumentRequest request,
|
||||
final FrontendEditorialContext editorialContext) {
|
||||
return documentLinks(request);
|
||||
}
|
||||
|
||||
default boolean foldingRangesSupported() {
|
||||
return false;
|
||||
}
|
||||
|
||||
default List<FrontendFoldingRange> foldingRanges(final FrontendDocumentRequest request) {
|
||||
return List.of();
|
||||
}
|
||||
|
||||
default List<FrontendFoldingRange> foldingRanges(
|
||||
final FrontendDocumentRequest request,
|
||||
final FrontendEditorialContext editorialContext) {
|
||||
return foldingRanges(request);
|
||||
}
|
||||
|
||||
default boolean selectionRangesSupported() {
|
||||
return false;
|
||||
}
|
||||
|
||||
default List<FrontendSelectionRange> selectionRanges(
|
||||
final FrontendDocumentRequest request,
|
||||
final List<Integer> offsets) {
|
||||
return List.of();
|
||||
}
|
||||
|
||||
default List<FrontendSelectionRange> selectionRanges(
|
||||
final FrontendDocumentRequest request,
|
||||
final FrontendEditorialContext editorialContext,
|
||||
final List<Integer> offsets) {
|
||||
return selectionRanges(request, offsets);
|
||||
}
|
||||
|
||||
default boolean callHierarchySupported() {
|
||||
return false;
|
||||
}
|
||||
|
||||
default java.util.List<FrontendCallHierarchyItem> prepareCallHierarchy(
|
||||
final FrontendDocumentRequest request,
|
||||
final FrontendEditorialContext editorialContext,
|
||||
final int offset) {
|
||||
return java.util.List.of();
|
||||
}
|
||||
|
||||
default java.util.List<FrontendCallSite> incomingCalls(
|
||||
final FrontendDocumentRequest request,
|
||||
final FrontendEditorialContext editorialContext,
|
||||
final FrontendCallHierarchyItem target) {
|
||||
return java.util.List.of();
|
||||
}
|
||||
|
||||
default java.util.List<FrontendCallSite> outgoingCalls(
|
||||
final FrontendDocumentRequest request,
|
||||
final FrontendEditorialContext editorialContext,
|
||||
final FrontendCallHierarchyItem target) {
|
||||
return java.util.List.of();
|
||||
}
|
||||
|
||||
default boolean formattingSupported() {
|
||||
return false;
|
||||
}
|
||||
|
||||
default java.util.Optional<String> formatDocument(final FrontendDocumentRequest request) {
|
||||
return java.util.Optional.empty();
|
||||
}
|
||||
|
||||
default boolean codeActionsSupported() {
|
||||
return false;
|
||||
}
|
||||
|
||||
default List<FrontendCodeAction> codeActions(final FrontendDocumentRequest request) {
|
||||
return List.of();
|
||||
}
|
||||
|
||||
default List<FrontendCodeAction> codeActions(
|
||||
final FrontendDocumentRequest request,
|
||||
final FrontendEditorialContext editorialContext) {
|
||||
return codeActions(request);
|
||||
}
|
||||
}
|
||||
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package p.studio.compiler.services;
|
||||
|
||||
public record FrontendSelectionRange(
|
||||
int startOffset,
|
||||
int endOffset,
|
||||
FrontendSelectionRange parent) {
|
||||
|
||||
public FrontendSelectionRange {
|
||||
if (startOffset < 0) {
|
||||
throw new IllegalArgumentException("startOffset must not be negative");
|
||||
}
|
||||
if (endOffset < startOffset) {
|
||||
throw new IllegalArgumentException("endOffset must not be before startOffset");
|
||||
}
|
||||
}
|
||||
}
|
||||
+2
-1
@@ -17,5 +17,6 @@ public enum FrontendSymbolKind {
|
||||
ENUM,
|
||||
ERROR,
|
||||
GLOBAL,
|
||||
CONST
|
||||
CONST,
|
||||
MODULE
|
||||
}
|
||||
|
||||
+45
@@ -30,6 +30,51 @@ class FrontendLanguageServiceTest {
|
||||
assertTrue(service.prepareRename(request, 0).isEmpty());
|
||||
assertEquals(FrontendRenameResult.Status.UNSUPPORTED, service.rename(request, 0, "renamed").status());
|
||||
assertTrue(service.rename(request, 0, "renamed").edits().isEmpty());
|
||||
assertFalse(service.documentLinksSupported());
|
||||
assertTrue(service.documentLinks(request).isEmpty());
|
||||
assertTrue(service.documentLinks(request, null).isEmpty());
|
||||
assertFalse(service.foldingRangesSupported());
|
||||
assertTrue(service.foldingRanges(request).isEmpty());
|
||||
assertTrue(service.foldingRanges(request, null).isEmpty());
|
||||
assertFalse(service.callHierarchySupported());
|
||||
assertTrue(service.prepareCallHierarchy(request, null, 0).isEmpty());
|
||||
assertFalse(service.formattingSupported());
|
||||
assertTrue(service.formatDocument(request).isEmpty());
|
||||
assertFalse(service.selectionRangesSupported());
|
||||
assertTrue(service.selectionRanges(request, List.of(0)).isEmpty());
|
||||
assertTrue(service.selectionRanges(request, null, List.of(0)).isEmpty());
|
||||
assertFalse(service.codeActionsSupported());
|
||||
assertTrue(service.codeActions(request).isEmpty());
|
||||
assertTrue(service.codeActions(request, null).isEmpty());
|
||||
}
|
||||
|
||||
@Test
|
||||
void codeActionAllowsEmptyReplacementAndRejectsBlankIdentity() {
|
||||
final Path path = Path.of("src/main.pbs").toAbsolutePath();
|
||||
final var action = new FrontendCodeAction(
|
||||
" Remove duplicate reserved attribute ",
|
||||
" E_SEM_DUPLICATE_RESERVED_ATTRIBUTE ",
|
||||
path,
|
||||
4,
|
||||
12,
|
||||
"");
|
||||
assertEquals("Remove duplicate reserved attribute", action.title());
|
||||
assertEquals("E_SEM_DUPLICATE_RESERVED_ATTRIBUTE", action.diagnosticCode());
|
||||
assertEquals("", action.newText());
|
||||
assertThrows(IllegalArgumentException.class, () -> new FrontendCodeAction(
|
||||
" ",
|
||||
"E_SEM_DUPLICATE_RESERVED_ATTRIBUTE",
|
||||
path,
|
||||
0,
|
||||
1,
|
||||
""));
|
||||
assertThrows(NullPointerException.class, () -> new FrontendCodeAction(
|
||||
"Remove duplicate reserved attribute",
|
||||
"E_SEM_DUPLICATE_RESERVED_ATTRIBUTE",
|
||||
path,
|
||||
0,
|
||||
1,
|
||||
null));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
package p.studio.lsp.messages;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public record BaselineCallHierarchyItem(
|
||||
String name,
|
||||
boolean method,
|
||||
String uri,
|
||||
int startLine,
|
||||
int startCharacter,
|
||||
int endLine,
|
||||
int endCharacter) {
|
||||
|
||||
public BaselineCallHierarchyItem {
|
||||
name = Objects.requireNonNull(name, "name").trim();
|
||||
uri = Objects.requireNonNull(uri, "uri").trim();
|
||||
if (name.isEmpty() || uri.isEmpty()) {
|
||||
throw new IllegalArgumentException("call hierarchy item identity must not be blank");
|
||||
}
|
||||
if (startLine < 0 || startCharacter < 0 || endLine < 0 || endCharacter < 0) {
|
||||
throw new IllegalArgumentException("call hierarchy range coordinates must not be negative");
|
||||
}
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
package p.studio.lsp.messages;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public record BaselineCallSite(
|
||||
BaselineCallHierarchyItem item,
|
||||
int startLine,
|
||||
int startCharacter,
|
||||
int endLine,
|
||||
int endCharacter) {
|
||||
|
||||
public BaselineCallSite {
|
||||
item = Objects.requireNonNull(item, "item");
|
||||
if (startLine < 0 || startCharacter < 0 || endLine < 0 || endCharacter < 0) {
|
||||
throw new IllegalArgumentException("call site coordinates must not be negative");
|
||||
}
|
||||
}
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
package p.studio.lsp.messages;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public record BaselineCodeAction(
|
||||
String title,
|
||||
String diagnosticCode,
|
||||
String uri,
|
||||
int startLine,
|
||||
int startCharacter,
|
||||
int endLine,
|
||||
int endCharacter,
|
||||
String newText) {
|
||||
|
||||
public BaselineCodeAction {
|
||||
title = requireText(title, "title");
|
||||
diagnosticCode = requireText(diagnosticCode, "diagnosticCode");
|
||||
uri = requireText(uri, "uri");
|
||||
if (startLine < 0 || startCharacter < 0 || endLine < 0 || endCharacter < 0) {
|
||||
throw new IllegalArgumentException("code action range coordinates must not be negative");
|
||||
}
|
||||
newText = Objects.requireNonNull(newText, "newText");
|
||||
}
|
||||
|
||||
private static String requireText(
|
||||
final String value,
|
||||
final String field) {
|
||||
final String candidate = Objects.requireNonNull(value, field).trim();
|
||||
if (candidate.isEmpty()) {
|
||||
throw new IllegalArgumentException(field + " must not be blank");
|
||||
}
|
||||
return candidate;
|
||||
}
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package p.studio.lsp.messages;
|
||||
|
||||
public record BaselineCodeActionDiagnostic(
|
||||
String code,
|
||||
int startLine,
|
||||
int startCharacter,
|
||||
int endLine,
|
||||
int endCharacter) {
|
||||
|
||||
public BaselineCodeActionDiagnostic {
|
||||
code = code == null ? "" : code.trim();
|
||||
if (startLine < 0 || startCharacter < 0 || endLine < 0 || endCharacter < 0) {
|
||||
throw new IllegalArgumentException("diagnostic range coordinates must not be negative");
|
||||
}
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
package p.studio.lsp.messages;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public record BaselineCodeActions(List<BaselineCodeAction> actions) {
|
||||
public BaselineCodeActions {
|
||||
actions = actions == null ? List.of() : List.copyOf(actions);
|
||||
}
|
||||
|
||||
public static BaselineCodeActions empty() {
|
||||
return new BaselineCodeActions(List.of());
|
||||
}
|
||||
}
|
||||
+2
-1
@@ -16,5 +16,6 @@ public enum BaselineCompletionItemKind {
|
||||
ENUM,
|
||||
ERROR,
|
||||
GLOBAL,
|
||||
CONST
|
||||
CONST,
|
||||
MODULE
|
||||
}
|
||||
|
||||
+3
-1
@@ -9,12 +9,14 @@ public record BaselineDocumentIssue(
|
||||
int endCharacter,
|
||||
BaselineIssueSeverity severity,
|
||||
String source,
|
||||
String message) {
|
||||
String message,
|
||||
String code) {
|
||||
|
||||
public BaselineDocumentIssue {
|
||||
severity = Objects.requireNonNull(severity, "severity");
|
||||
source = requireText(source, "source");
|
||||
message = requireText(message, "message");
|
||||
code = code == null ? "" : code.trim();
|
||||
}
|
||||
|
||||
private static String requireText(
|
||||
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
package p.studio.lsp.messages;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public record BaselineDocumentLink(
|
||||
String targetUri,
|
||||
int startLine,
|
||||
int startCharacter,
|
||||
int endLine,
|
||||
int endCharacter) {
|
||||
|
||||
public BaselineDocumentLink {
|
||||
targetUri = requireText(targetUri, "targetUri");
|
||||
if (startLine < 0 || startCharacter < 0 || endLine < 0 || endCharacter < 0) {
|
||||
throw new IllegalArgumentException("document link range coordinates must not be negative");
|
||||
}
|
||||
}
|
||||
|
||||
private static String requireText(
|
||||
final String value,
|
||||
final String field) {
|
||||
final String candidate = Objects.requireNonNull(value, field).trim();
|
||||
if (candidate.isEmpty()) {
|
||||
throw new IllegalArgumentException(field + " must not be blank");
|
||||
}
|
||||
return candidate;
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
package p.studio.lsp.messages;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public record BaselineDocumentLinks(List<BaselineDocumentLink> links) {
|
||||
public BaselineDocumentLinks {
|
||||
links = links == null ? List.of() : List.copyOf(links);
|
||||
}
|
||||
|
||||
public static BaselineDocumentLinks empty() {
|
||||
return new BaselineDocumentLinks(List.of());
|
||||
}
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package p.studio.lsp.messages;
|
||||
|
||||
public record BaselineFoldingRange(
|
||||
int startLine,
|
||||
int startCharacter,
|
||||
int endLine,
|
||||
int endCharacter) {
|
||||
|
||||
public BaselineFoldingRange {
|
||||
if (startLine < 0 || startCharacter < 0 || endLine < 0 || endCharacter < 0) {
|
||||
throw new IllegalArgumentException("folding range coordinates must not be negative");
|
||||
}
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
package p.studio.lsp.messages;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public record BaselineFoldingRanges(List<BaselineFoldingRange> ranges) {
|
||||
public BaselineFoldingRanges {
|
||||
ranges = ranges == null ? List.of() : List.copyOf(ranges);
|
||||
}
|
||||
|
||||
public static BaselineFoldingRanges empty() {
|
||||
return new BaselineFoldingRanges(List.of());
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
package p.studio.lsp.messages;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public record BaselineFormatting(List<BaselineTextEdit> edits) {
|
||||
public BaselineFormatting {
|
||||
edits = edits == null ? List.of() : List.copyOf(edits);
|
||||
}
|
||||
|
||||
public static BaselineFormatting empty() {
|
||||
return new BaselineFormatting(List.of());
|
||||
}
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
package p.studio.lsp.messages;
|
||||
|
||||
public record BaselineSelectionRange(
|
||||
int startLine,
|
||||
int startCharacter,
|
||||
int endLine,
|
||||
int endCharacter,
|
||||
BaselineSelectionRange parent) {
|
||||
|
||||
public BaselineSelectionRange {
|
||||
if (startLine < 0 || startCharacter < 0 || endLine < 0 || endCharacter < 0) {
|
||||
throw new IllegalArgumentException("selection range coordinates must not be negative");
|
||||
}
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
package p.studio.lsp.messages;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public record BaselineSelectionRanges(List<BaselineSelectionRange> ranges) {
|
||||
public BaselineSelectionRanges {
|
||||
ranges = ranges == null ? List.of() : List.copyOf(ranges);
|
||||
}
|
||||
|
||||
public static BaselineSelectionRanges empty() {
|
||||
return new BaselineSelectionRanges(List.of());
|
||||
}
|
||||
}
|
||||
+6
@@ -15,6 +15,12 @@ public record BaselineServerDescription(
|
||||
boolean documentSymbolsSupported,
|
||||
boolean workspaceSymbolsSupported,
|
||||
boolean renameSupported,
|
||||
boolean codeActionsSupported,
|
||||
boolean documentLinksSupported,
|
||||
boolean foldingRangesSupported,
|
||||
boolean selectionRangesSupported,
|
||||
boolean formattingSupported,
|
||||
boolean callHierarchySupported,
|
||||
List<String> semanticTokenTypes,
|
||||
List<BaselineSemanticHostProjection> semanticHostProjections,
|
||||
List<BaselineVisualTheme> visualThemes,
|
||||
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
package p.studio.lsp.messages;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public record BaselineTextEdit(
|
||||
int startLine,
|
||||
int startCharacter,
|
||||
int endLine,
|
||||
int endCharacter,
|
||||
String newText) {
|
||||
|
||||
public BaselineTextEdit {
|
||||
if (startLine < 0 || startCharacter < 0 || endLine < 0 || endCharacter < 0) {
|
||||
throw new IllegalArgumentException("text edit coordinates must not be negative");
|
||||
}
|
||||
newText = Objects.requireNonNull(newText, "newText");
|
||||
}
|
||||
}
|
||||
+62
@@ -7,6 +7,15 @@ import p.studio.lsp.messages.BaselineHover;
|
||||
import p.studio.lsp.messages.BaselineDocumentSymbols;
|
||||
import p.studio.lsp.messages.BaselineReferences;
|
||||
import p.studio.lsp.messages.BaselineWorkspaceSymbols;
|
||||
import p.studio.lsp.messages.BaselineCodeActionDiagnostic;
|
||||
import p.studio.lsp.messages.BaselineCodeActions;
|
||||
import p.studio.lsp.messages.BaselineDocumentLinks;
|
||||
import p.studio.lsp.messages.BaselineFoldingRanges;
|
||||
import p.studio.lsp.messages.BaselineCallHierarchyItem;
|
||||
import p.studio.lsp.messages.BaselineCallSite;
|
||||
import p.studio.lsp.messages.BaselineFormatting;
|
||||
import p.studio.lsp.messages.BaselineSelectionRanges;
|
||||
import p.studio.lsp.messages.DocumentPosition;
|
||||
import p.studio.lsp.messages.BaselinePrepareRename;
|
||||
import p.studio.lsp.messages.BaselineRename;
|
||||
import p.studio.lsp.messages.BaselineSemanticTokens;
|
||||
@@ -14,6 +23,8 @@ import p.studio.lsp.messages.BaselineSignatureHelp;
|
||||
import p.studio.lsp.messages.BaselineServerDescription;
|
||||
import p.studio.lsp.messages.LspProjectContext;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface LanguageServiceBridge {
|
||||
BaselineServerDescription describeServer(LspProjectContext context);
|
||||
|
||||
@@ -56,5 +67,56 @@ public interface LanguageServiceBridge {
|
||||
|
||||
BaselineSemanticTokens semanticTokens(LspProjectContext context, String documentUri, String text);
|
||||
|
||||
default BaselineDocumentLinks documentLinks(LspProjectContext context, String documentUri, String text) {
|
||||
return BaselineDocumentLinks.empty();
|
||||
}
|
||||
|
||||
default BaselineFoldingRanges foldingRanges(LspProjectContext context, String documentUri, String text) {
|
||||
return BaselineFoldingRanges.empty();
|
||||
}
|
||||
|
||||
default BaselineFormatting formatDocument(LspProjectContext context, String documentUri, String text) {
|
||||
return BaselineFormatting.empty();
|
||||
}
|
||||
|
||||
default java.util.List<BaselineCallHierarchyItem> prepareCallHierarchy(
|
||||
LspProjectContext context,
|
||||
String documentUri,
|
||||
String text,
|
||||
int line,
|
||||
int character) {
|
||||
return java.util.List.of();
|
||||
}
|
||||
|
||||
default java.util.List<BaselineCallSite> incomingCalls(
|
||||
LspProjectContext context,
|
||||
String documentUri,
|
||||
String text,
|
||||
BaselineCallHierarchyItem target) {
|
||||
return java.util.List.of();
|
||||
}
|
||||
|
||||
default java.util.List<BaselineCallSite> outgoingCalls(
|
||||
LspProjectContext context,
|
||||
String documentUri,
|
||||
String text,
|
||||
BaselineCallHierarchyItem target) {
|
||||
return java.util.List.of();
|
||||
}
|
||||
|
||||
default BaselineSelectionRanges selectionRanges(
|
||||
LspProjectContext context,
|
||||
String documentUri,
|
||||
String text,
|
||||
List<DocumentPosition> positions) {
|
||||
return BaselineSelectionRanges.empty();
|
||||
}
|
||||
|
||||
BaselineCodeActions codeActions(
|
||||
LspProjectContext context,
|
||||
String documentUri,
|
||||
String text,
|
||||
List<BaselineCodeActionDiagnostic> diagnostics);
|
||||
|
||||
String onSave(LspProjectContext context, String documentUri);
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user