Repository navigation
fix(marketplace): install runs the widget and design-property repairs itself (mendixlabs/mxcli#1527) - #1427
Merged
Conversation
…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
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 the CE0463 part of mendixlabs#1527 (#1409). The maintainer decided install should run
fix widgetsitself. 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 usesdocker.RunToolPreservingFormat, the same pathmxcli fixuses, which keeps MPR v2 and goes throughcanon.Reconcile.update-widgets(CE0463), thenrename-design-properties(CE6087).--file):update-widgets.Tests
TestPostInstallRepairs_*:ModuleRunsBothToolsWidgetRunsOnlyUpdateWidgetsNoMxKeepsTheHintUnknownVersionKeepsTheHintStepFailureWarnsAndContinuesAlso
TestReportTransplantInstall_RunsRepairsandTestInstallFile_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.mpkon 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 lintandmake check-findingspass.Not done
marketplace updatestill only prints the same next steps.--allow-format-change(mx module-import) path is unchanged.🤖 Generated with Claude Code
https://claude.ai/code/session_01W3x8Fyvir8kLyPgJs1BDmF
Generated by Claude Code