Repository navigation
Connect existing P4 LSP to opt-in embedded Java diagnostics - #252
Merged
Merged
Conversation
This was referenced Oct 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #251. Integrates opaopa6969/unlaxer-parser#369, opaopa6969/unlaxer-parser#465, opaopa6969/unlaxer-parser#469 and opaopa6969/unlaxer-parser#470.
The existing P4 extension previously parsed only the first FormulaInfo section and removed CR characters before publishing diagnostics. An explicit
embedded-languagesMaven profile andtinyExpressionP4Lsp.embeddedLanguageDiagnosticssetting now send each untouched, versioned full document through the production FormulaInfo/P4 region bridge and real javac. Both Java sections in production fixture 69 publish diagnostics at original UTF-16 positions. Later-section edits reanalyze the snapshot; stale updates, save, close and unavailable extraction have explicit behavior.This branch includes current Tiny master 0d84f0d (Tiny 2.1.0, unlaxer 3.3.0-SNAPSHOT). The feature remains disabled by default, with registration behind a dependency-neutral SPI. Current retained-source long code fences use the public production layout API only after the real parser certifies the block; shorter backticks and hash characters in Java bodies remain opaque. FormulaInfo/Tiny identities record the current grammar revision. The build pins the mapping API source and JDK 21.0.9, disables annotation processing and executes no user code.
Validation: clean default LSP/DAP 40 tests and opt-in profile 41 tests, all with zero skips; TypeScript compilation and 7 npm tests; actual packaged launcher over stdio invokes javac, publishes independent positions 41:9 and 69:9 and clears them on close. Tests also cover second-section changes, Unicode/CRLF position 42:9, stale updates, save, invalid regions, feature opt-in and long-fence diagnostic range 2:49–54.
Scope: this is the existing Java Tiny LSP consumer. The underlying Java/Rust mapping contract has independent production fixtures in parser PR #470; its fixed older grammar pin is separate from this current-consumer adaptation. No Rust Tiny LSP implementation or current-long-fence cross-language comparison is claimed. Existing Tiny completion/edit behavior remains unchanged; unclosed Java completion follows in #254. Foreign dependency diagnostics remain explicitly rejected by this single-document adapter. Reverting this PR or disabling the feature restores the prior integration; broader roadmap parents remain open until all accepted consumers are verified.