[import] Report the syntax errors truncating a textual import - #2511
Conversation
|
Pushed a follow-up commit repairing three defects found while re-reading the first one, plus the wording of the public texts. The validation pass could deadlock, and its timeout was unreachable. The CLI serializes an AST on its standard output during that pass for every document it finds valid, that pipe was never drained, and the standard error was joined before the timed wait. A document large enough to fill the pipe blocked the upload forever instead of hitting the bound. The output of the pass is now redirected to Substring matching could reject a valid document. The CLI renders a diagnostic as An inconclusive pass silently restored the old behaviour. A timeout, a launch failure or a failed read all returned an empty list, which the caller read as "the document is complete", so the truncated AST was accepted. The pass now has three outcomes: complete, truncated, and unavailable. The AST is withheld and an operational error is reported for the last one, and the unrelated diagnostics are only ignored after a pass that actually completed. Tests. Every case importing a document now asserts that the Texts. The claim that the validation pass "does not serialize the AST" was wrong and has been removed from the issue, this description and the release note: the pass does serialize one for a validation-clean document, and therefore does pay the
|
|
Startup regression from my previous commit, fixed in The commit repairing the validation pass added a second, package-private constructor so the tests could shorten the timeout. Spring only selects a constructor implicitly when a class declares exactly one, so The constructor taking the configured CLI path is now annotated with Added
|
|
Second review round, fixed in Abnormal termination was accepted as "document complete". A Coloring could hide the sentinel. With Diagnostics are now split statefully. The CLI copies the source range verbatim, newlines included, so a continuation line can look exactly like a diagnostic header. A line only starts a new diagnostic when the brackets of the previous one are closed. Where that cannot be decided — the words appear at a line start, no diagnostic header carries them, and the brackets of the report do not balance — the outcome is unavailable rather than clean, so the ambiguity fails closed. The report is bounded, and cleanup is tree-wide. The stream is still drained to its end so the CLI can terminate, but at most 64 diagnostics are retained, each abbreviated to 1 KiB; the parsing pass keeps at most 64 KiB of its own stderr. A pass that has to be destroyed is now destroyed together with Tests. Seven added, all in Texts. The issue and this description now say the extra parse is one per
One limitation worth stating: the CLI's report is a human rendering with unescaped source text, so the bracket balance is a heuristic, not a grammar. It is deliberately biased towards withholding the AST when it cannot decide. A machine-readable diagnostic output from the CLI would remove the guesswork entirely, if that is something the SysIDE side would consider. |
|
One more, in The helper reading the returned AST wrapped the stream failure in an This was in the branch since the first repair commit. My earlier runs built the module with |
|
@1wgrumph thank you for providing this PR. Please take a look at previous commits, and at https://doc.mbse-syson.org/syson/v2026.7.0/developer-guide/index.html#_contribute_a_change_in_the_codebase. We are also close to the 2026.9.0 release (this Wednesday), so this PR will be part of 2026.11.0 release. Thank you for your understanding. Regards, |
a34221b to
8d95eef
Compare
|
Reshaped into one commit in the format from the developer guide ( |
|
Some new remarks:
So “a second project” means the patch goes beyond “run validation and detect truncation” into designing a bounded, multiline diagnostic protocol parser plus adversarial process cleanup.
|
|
Hello @1wgrumph for your information, the 2026.9.0 has been released. Regards, |
4818895 to
e1064c8
Compare
|
Thanks, Axel. Updated for 2026.11.0. Partial imports are preserved, and syntax diagnostics appear in the import report. I removed the bracket parsing and extra process-management code, limited the additional validation pass to file uploads, and reduced the tests to six focused cases. The original bug is reproduced, and the revised import suite passes. The workflows are awaiting maintainer approval. Could you approve them and take another look? |
|
Hello @1wgrumph, All my comments seem to have been taken into account, thank you very much! Thank you again for all your work! Regards, |
Keep the parsed model and report syntax diagnostics on file uploads. Ignore standalone standard-library resolution errors and preserve the existing text-editor behavior. Bug: eclipse-syson#2510 Signed-off-by: William Rumph IV <1wgrumph@gmail.com>
e1064c8 to
5e25e76
Compare
Fixes #2510.
File uploads now preserve the model the parser produced and include syntax diagnostics in the import report. Validation failures also leave the model available. Standard-library resolution errors are ignored, and text-editor behavior is unchanged.
The original bug is reproduced on unmodified upstream code. The same regression test passes with this change. All 14 required build modules pass, including 50 import-module tests and Checkstyle.
Changelog and release notes target 2026.11.0. Diagnostic detection follows the embedded CLI’s format and ordering, which need rechecking when that dependency changes.
PLEASE READ ALL ITEMS AND CHECK ONLY RELEVANT CHECKBOXES BELOW
Auto review
Project management
priority:andpr:labels been added to the pull request? (In case of doubt, start with the labelspriority: lowandpr: to review later)area:,type:)Changelog and release notes
CHANGELOG.adoc+doc/content/modules/user-manual/pages/release-notes/YYYY.MM.0.adocbeen updated to reference the relevant issues?CHANGELOG.adoc?CHANGELOG.adoc?doc/content/modules/user-manual/pages/release-notes/YYYY.MM.0.adoc?Key highlightssection indoc/content/modules/user-manual/pages/release-notes/YYYY.MM.0.adoc?Documentation
Tests