Repository navigation
Use production editor regions for Java EOF completion in existing LSP - #254
Merged
Merged
Conversation
…editor-regions # Conflicts: # tools/tinyexpression-p4-lsp-vscode/EMBEDDED-LANGUAGES.md # tools/tinyexpression-p4-lsp-vscode/src/embedded-test/java/org/unlaxer/tinyexpression/lsp/p4/ProductionEmbeddedDiagnosticsTest.java
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 #253. Follows #252 and adopts opaopa6969/unlaxer-parser#476.
The existing opt-in P4 LSP uses the explicit production editor bridge for full-document updates and Java completion. Real CodeBlock parsing certifies bounded unfinished regions; diagnostic and completion edits map only to original text. Syntax failure in another formula no longer discards valid Java siblings. The same lifecycle lock protects the immutable source/version used by both requests. Outside owned Java regions, existing Tiny completion remains unchanged.
The branch includes current Tiny master 0d84f0d and supports its retained-source long fences as well as triple fences. Editor recognition may append a candidate closing fence to the parser input, but synthetic characters never enter source maps or edits. The strict bridge continues to reject unfinished input. The current grammar identity is recorded independently from the older fixed source pin used by parser PR #479's Java/Rust parity fixtures.
Validation: current default LSP/DAP 40 tests and opt-in profile 41 tests, with no skips; packaged existing launcher over stdio invokes real javac, publishes both production Java diagnostics, then returns Unicode/CRLF EOF completion
targetat line 3, characters 41–44. Tests cover current long-fence diagnostics at 2:49–54, long-fence EOF completion, opaque hash/backtick body text and strict failure after an unfinished-source edit. The paired parser PR independently verifies nine partial fixtures/29 observations and the original 177 production observations for Java/Rust at its documented fixed source revision.The feature remains opt-in, disables annotation processing and executes no user code. Current root dependencies (Tiny 2.1.0, unlaxer 3.3.0-SNAPSHOT), default P4/ubnfc/DAP and strict CLI behavior are preserved. Foreign dependency diagnostics remain explicitly rejected by this single-document consumer. Revert restores diagnostic-only opt-in behavior without changing defaults.