TraceOps findings: page/grammar/combobox fixes (#9,#10,#11,#12,#16,#17,#23,#27) - #809
Merged
ako merged 4 commits intoJul 31, 2026
Merged
Conversation
…ze (TraceOps #9/#10/#17) Three page-builder defects found by the TraceOps project, each verified against mxbuild 11.12.1 (`mx check` → 0 errors after the fix): #9 — `dynamictext x (Content: '')` persisted as `Content: '{1}'` with no parameters (an orphaned placeholder) → CE0720 "Place holder index 1 is greater than 0". buildDynamicTextV3 unconditionally defaulted empty content to `{1}`. Now empty content with no params is a literal empty template; `{1}` is only synthesized when a parameter exists. #10 — `dynamictext s (Content: '$318')` was treated as a variable reference and became an unbound `{1}` param → CE0402/CE1613 ("attribute '$318' no longer exists"). A `$` starts a variable ONLY when followed by a letter/underscore (new isDynamicTextVariableRef / dynamicTextVariableRe); `$318` stays literal. #17 — `listview (… PageSize: 200)` always paged at 20: the property parsed into the AST but was ignored on write (buildListViewV3 hardcoded 20) and never read or emitted by describe. Now the write honors GetIntProp("PageSize"), the describe parse reads it, and the listview formatter emits a non-default value so it round-trips. Tests: TestBuildDynamicTextV3_{EmptyContent,DollarDigitLiteral,VariableStillBinds}, TestIsDynamicTextVariableRef, TestBuildListViewV3_PageSize. Repro mdl-examples/bug-tests/traceops-9-10-17-dynamictext-listview.mdl. Symptom rows added to fix-issue.md. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JXnEgoc2NQP1Y2TWMCMXC4
…ribute clauses (TraceOps #27) A `/** … */` doc comment written between two `alter entity … add attribute` clauses (before the ADD keyword) was a parse error ("no viable alternative at input '/**'"): alterEntityAction accepted a doc comment only INSIDE an attributeDefinition. `--` line comments are not an equivalent workaround — they are discarded by the lexer, whereas a `/** */` doc comment is persisted as the attribute's Mendix documentation, so rewriting to `--` silently drops the documentation the author meant to store. alterEntityAction now accepts an optional leading docComment on ADD ATTRIBUTE / ADD COLUMN, and ExitAlterEntityAction attaches it as the added attribute's documentation when the attributeDefinition itself has none. Verified against mxbuild 11.12.1: the script builds clean and DESCRIBE ENTITY round-trips the doc comment on the second column. `make grammar` regenerates the parser (generated files are not committed). Test TestAlterEntityAddAttributeDocComment; repro mdl-examples/bug-tests/traceops-27-doc-comment-between-clauses.mdl. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JXnEgoc2NQP1Y2TWMCMXC4
…ete association combobox (TraceOps #23) A `combobox (Association: Mod.Ref, …)` was accepted by the parser but the widget engine read the reference only from the `attribute:` keyword, so the explicit `Association:` keyword was silently dropped and the widget fell back to enumeration mode → MxBuild failed CE0642 ("Property 'Attribute' is required"). Two changes: 1. The engine's `Association` source now reads the reference from EITHER `Association:` or the generic `attribute:` keyword, so the intuitive `Association:` form works. Verified on mxbuild 11.12.1: a complete association combobox (reference + datasource + CaptionAttribute) builds with 0 errors. 2. New MDL-WIDGET16 flags an incomplete association combobox — an `Association:` with no `datasource:` (the option list) — at check time with the full working syntax, instead of letting it pass check and fail MxBuild with the opaque CE0642. Association mode needs three things: the reference (`Association:`/`attribute:`), the option list (`datasource:` = target entity), and the display value (`CaptionAttribute:`). Doc updated. Test TestValidateComboBoxAssociation; repro mdl-examples/bug-tests/traceops-23-combobox-association.mdl. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JXnEgoc2NQP1Y2TWMCMXC4
…ibute-keyword hint (TraceOps #11/#12/#16) Three MDL ergonomics improvements, each verified against mxbuild 11.12.1 (`mx check` → 0 errors): #11 — a single-quoted string literal may now span multiple lines. STRING_LITERAL excluded `\r\n`, so a newline terminated the token ("missing END at …"). Dropped the newline exclusion; mxbuild accepts a multi-line String value. (A missing close-quote now spans lines — the standard multi-line-string trade-off.) #12 — a bare MDL keyword (`body`, `content`, `search`, `as`, …) may be used unquoted as a WIDGET name, matching attribute and placeholder names. The widgetV3 rule accepted only IDENTIFIER | QUOTED_IDENTIFIER; it now also accepts `keyword`, and the visitor reads `wCtx.Keyword()` so the name is preserved (previously the parse failed, or an accepted keyword name came out empty → CE7247 "name cannot be empty"). #16 — `alter entity … add <name>: <type>` without the `attribute` keyword gave an opaque "no viable alternative at input 'add<Name>'". enhanceErrorMessage now appends an actionable hint with the correct `add attribute <name>: <type>` form when the offending line is `add <word>:` and `<word>` isn't a real clause keyword (attribute/column/index/event/value/…); gated to the primary error. `make grammar` regenerates the parser (generated files are not committed). Tests TestMultiLineStringLiteral, TestKeywordWidgetName, TestAlterEntityMissingAttributeKeywordHint; repro mdl-examples/bug-tests/traceops-11-12-16-strings-names.mdl. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JXnEgoc2NQP1Y2TWMCMXC4
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.
Fixes eight TraceOps findings verified against mxbuild 11.12.1 (
mx check→ 0 errors). Each ships with regression tests and amdl-examples/bug-tests/repro.Pages
$vartemplate referencesPageSizeis written and round-trips throughdescribeWidgets
Association:(+ MDL-WIDGET16 flags an incomplete association combobox)Grammar
Type,Status, …)attributekeyword is missing in ALTER ENTITY/** */doc comment allowed between alter-entity add-attribute clausesNot defects (documented, no code change)
createrefusing to overwrite is intentional; the error already names a working idempotent form (create or modify)count()must be assigned to a variable, not used inline — a Mendix platform rule surfaced via the MDL044 hint