fix: run mx update-widgets before mx check to prevent false CE0463#164
Conversation
Pluggable widget definitions created by mxcli may have Object properties that don't match the Type PropertyTypes schema, triggering CE0463 errors during mx check. Running update-widgets first normalizes widget Objects against installed .mpk files. Added --no-update-widgets flag to docker check and docker build commands to opt out of this behavior. Closes mendixlabs#121
AI Code ReviewWhat Looks GoodThe PR implements a practical workaround for CE0463 errors by automatically running
The changes are minimal and targeted, touching only the necessary files to implement the feature without duplicating existing functionality or modifying MDL syntax (which makes the MDL-specific checklist sections inapplicable). RecommendationApprove - The PR is ready for merge. It solves a real user issue (CE0463 false positives) with a well-implemented, tested workaround that maintains backward compatibility via the opt-out flag. The follow-up PR addressing the root cause in the widget template engine is appropriately noted. Automated review via OpenRouter (Nemotron Super 120B) — workflow source |
ako
left a comment
There was a problem hiding this comment.
Clean fix with the right approach — mx update-widgets normalizes pluggable widget Objects against .mpk PropertyTypes, preventing false CE0463. PR correctly notes this is a workaround pending a root-cause fix in the widget template engine.
What's good:
SkipUpdateWidgetsoption threaded through bothBuildOptionsandCheckOptions--no-update-widgetsflag on bothdocker buildanddocker check- Failure is non-fatal (warns and continues) — correct, since worst case is the original CE0463
- Tests use fake shell scripts to verify command order (update-widgets before check) and the opt-out flag
Minor:
- Flag naming
--no-update-widgetsis slightly inconsistent with neighboring--skip-check.--skip-update-widgetswould match better. - No test for the failure path (
update-widgetsexits non-zero → warning printed, check still runs) - No test for the
Build()path even though the same logic was added there
LGTM.
Summary
mx update-widgetsautomatically beforemx checkindocker checkanddocker buildcommands to normalize pluggable widget definitions against installed.mpkfiles--no-update-widgetsflag to opt outContext
CE0463 ("The definition of this widget has changed") fires when widget Object properties don't match Type PropertyTypes. This is a known issue with mxcli-generated pluggable widgets. Running
mx update-widgetsnormalizes the Objects as a workaround.A follow-up PR will address the root cause in the widget template engine.
Closes #121
Test plan
update-widgetsruns beforecheckby default--no-update-widgetsskips the stepgo build ./...andgo vetpass🤖 Generated with Claude Code