Round-trip a page over a flow the project lacks: keep bindings qualified - #678
Merged
Merged
Conversation
describe → exec of Feedback v4.0.2's EXCLUDED FeedbackModule.ShareFeedback_Logo
was refused: "nanoflow not found: FeedbackModule.DS_FeedbackForm (data source)".
Forcing it through left a project `mx check` could not LOAD
(ArgumentNullException setting 'Attribute').
With the flow missing, DESCRIBE had no context entity and printed every
binding inside the data view bare (`Attribute: Subject`, `{1} = ImageB64`,
`Visible: _showEmail in (…)`). Exec had nothing to qualify them against.
The stored model always has the full names.
- DESCRIBE keeps the stored Module.Entity.Attr for bindings inside a data
view, list view or gallery whose flow cannot be resolved. This covers
Attribute:, template parameters, pluggable attribute properties,
object-list items and the attribute visibility condition.
- `Visible: Module.Entity.Attr in (…)` is accepted and needs no entity in
scope.
- On an excluded page a missing data-source flow is kept by name, like the
action targets in the previous commit.
- The check reports it as a warning when every binding inside is qualified.
Otherwise it refuses and names the bare binding and its widget.
- As a last line, the page and snippet writer refuses any DomainModels$AttributeRef
that is not Module.Entity.Attr. Studio Pro qualifies every one (72 of 72
across the project), and a bare one takes the loader down.
ShareFeedback_Logo now round-trips: warnings only, all 6 attribute references
identical to the stored ones, the page still excluded, and `mx check` 0 errors.
A forced-fault variant with one binding hand-edited back to bare is refused,
naming the widget. All 17 pages of the project now exec.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…k' into fix/describe-unresolved-context-attrs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Follow-up to #675.
Symptom
FeedbackModule.ShareFeedback_Logo(Feedback v4.0.2, Mendix 11.13.0) is an excluded example page whose data view is sourced by a nanoflow the module doesn't ship. After #675, describe → exec was still refused:Forcing it through left a project
mx checkcould not load (ArgumentNullException setting 'Attribute').Cause
With the flow missing, describe had no entity in scope for the data view, so it printed every binding inside it bare:
Attribute: Subject,{1} = ImageB64,Visible: _showEmail in (…). Exec has nothing to qualify those against.The stored model never lost the information. Every
AttributeRefin there still holdsFeedbackModule.Feedback.Subject; describe threw the entity away.Fix
Module.Entity.Attr. That coversAttribute:, template parameters, pluggable attribute properties, object-list items and the attribute visibility condition. Where the entity is known, output is unchanged.Visible: Module.Entity.Attr in (…)(from Round-trip "Visible: based on attribute value" (Visible: Attr in (…)) #671) accepts the qualified form without an entity in scope. Inherited attributes are still stored against their declaring entity.DomainModels$AttributeRefthat isn'tModule.Entity.Attris refused, naming it. Studio Pro qualifies every one (72 of 72 across the project's pages, snippets and layouts), and a bare one takes Mendix's loader down. This turns a load-time stack trace into a statement error. The full backend suite passes with the guard on.Evidence
Control. With the implementation reverted, every layer fails:
lacks "Attribute: FeedbackModule.Feedback.Subject"and the three other bindings;failed to resolve nanoflow: nanoflow not found: Feedback.DS_FeedbackForm;Visible: M.Job.IsLocal in (…): … place the widget inside a data container;a bare attribute reference must be refused, naming it; got <nil>.Real run (copy of the 11.13.0 project):
ShareFeedback_Logodescribe → exec gives warnings only.mx check: 0 errors.textbox \feedback_subject` (Attribute: Subject)`.mx check, gives 0 errors. This is the first time every page of the project writes back clean.Bug-test
mdl-examples/bug-tests/excluded-page-unresolved-flow-qualified-bindings.mdl: 0 errors, and a bare variant is refused.Reviewer notes
pagemutator) is not covered.check-syntaxskill and the docs-site validation tutorial are updated for the new rule.Checklist
mx checkrun, including the forced-fault variantmake check-mdlpassesmake check-findingspassesmake build && make test && make lintpass🤖 Generated with Claude Code