Skip to content

fix(marketplace): install runs the widget and design-property repairs itself (mendixlabs/mxcli#1527) - #1427

Merged
ako merged 1 commit into
mainfrom
fix/1527-marketplace-install-fixes-widgets
Oct 16, 2026
Merged

ako merged 1 commit into
mainfrom
fix/1527-marketplace-install-fixes-widgets

Conversation

@ako

@ako ako commented Oct 16, 2026

Copy link
Copy Markdown
Owner

Fixes the CE0463 part of mendixlabs#1527 (#1409). The maintainer decided install should run fix widgets itself. Resolving module dependencies is out of scope.

Cause

installModuleFromFile (the transplant path) and both widget paths only printed "Next: mxcli fix …". A headless install therefore left CE0463 widget definitions behind until the user ran the fixes by hand (diagnose-ce0463 Case A).

Fix

New cmd/mxcli/marketplace_postinstall.go, runPostInstallRepairs. It uses docker.RunToolPreservingFormat, the same path mxcli fix uses, which keeps MPR v2 and goes through canon.Reconcile.

  • After a module install: update-widgets (CE0463), then rename-design-properties (CE6087).
  • After a widget install (online or --file): update-widgets.
  • If mx or the Mendix version can't be resolved: it warns and prints the manual commands. Install still succeeds.
  • If one repair fails: it names that repair's manual command and continues with the next.

Tests

TestPostInstallRepairs_*:

  • ModuleRunsBothTools
  • WidgetRunsOnlyUpdateWidgets
  • NoMxKeepsTheHint
  • UnknownVersionKeepsTheHint
  • StepFailureWarnsAndContinues

Also TestReportTransplantInstall_RunsRepairs and TestInstallFile_WidgetRunsUpdateWidgets.

Revert check: with hints printed instead of the tools run, the last two tests fail.

Real run on 11.6.6: install --file Badge.mpk on a fixture copy ran update-widgets, and the project stayed MPR v2 with all 369 .mxunit files. CE0463 before/after was not measured, because no widget package newer than the fixture's was available.

Also updated: install --help, the download-marketplace-content skill, docs-site/src/guides/marketplace.md, and a finding file. make build, make test, make lint and make check-findings pass.

Not done

  • marketplace update still only prints the same next steps.
  • The --allow-format-change (mx module-import) path is unchanged.
  • There is no flag to skip the automatic repairs.

🤖 Generated with Claude Code

https://claude.ai/code/session_01W3x8Fyvir8kLyPgJs1BDmF


Generated by Claude Code

…of install (mendixlabs#1527)

A headless module or widget install leaves CE0463 (stored widget
instances older than the installed packages) and, for a module, CE6087
(renamed design properties) for Mendix's own tools to fix. install only
printed 'mxcli fix widgets' / 'mxcli fix design-properties' as a Next
step, so the field run was left with 41 units of CE0463.

install now runs them itself through docker.RunToolPreservingFormat, the
same call 'mxcli fix' makes, which keeps MPR v2: both repairs after a
transplant module install, the widget resync after a widget install
(online and --file). When the project's Mendix version cannot be read
or mx cannot be resolved, it prints a warning and the manual commands
instead of failing; a failing repair names its own command and the next
one still runs. The mx resolution and tool runner are package-level
seams so the tests need no mx and no marketplace network.

Not changed: marketplace update (still prints the steps), the
--allow-format-change module-import path, and dependency resolution.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W3x8Fyvir8kLyPgJs1BDmF
@ako
ako merged commit 3a5c503 into main Oct 16, 2026
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants