Repository navigation
Add module documentation and admin user name support (issue #1314) - #1058
Merged
Merged
Conversation
…1314) Since mendixlabs#1269 lint reads modules().domain_model_documentation and project_security().admin_user_name, but MDL could write neither: the doc comment before `create or modify module MyFirstModule` is lost ... [MDL089] alter app security has no property "AdminUserName" - The doc comment on `create [or modify] module` is stored as the module's domain model documentation (DomainModels$DomainModel. Documentation; Projects$Module has none). No comment preserves what is stored, `/** */` clears it, and a plain create of an existing module stays a no-op. `describe module` prints it back as that comment. - `alter app security ( AdminUserName: '<name>' )` renames the built-in administrator. The password stays out of MDL (#624). New backend methods SetDomainModelDocumentation and SetProjectAdminUserName change only that property on the stored unit. Checked on a fresh 11.12.5 app: exec, describe round-trip, the catalog column lint reads, and mx check with 0 errors, same as an untouched control. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uj8k5uUCi1zKZ3Edj8MZ8h
…14-5to4h3 # Conflicts: # .claude/skills/fix-issue/findings/mdl-executor.jsonl
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.
Summary
Implements support for reading and writing module documentation and project admin user name in MDL, addressing issue mendixlabs#1314. Previously, MDL could not set these properties even though lint rules (mendixlabs#1269) read them, leaving MDL-built apps with empty module documentation and default admin names.
Key Changes
Module Documentation: A Mendix module has no documentation property of its own; its documentation is stored on
DomainModels$DomainModel.Documentation. The doc comment oncreate modulestatements now sets this property, anddescribe moduleprints it back as a doc comment for round-tripping.DocumentationandDocumentationSetfields toCreateModuleStmtAST nodeCreateOrModifyfield to distinguishcreate or modify module(applies docs to existing modules) from plaincreate module(no-op on existing modules)setModuleDocumentation()to persist domain model documentation via backenddescribeModule()to emit domain model documentation as a doc commentProject Admin User Name: Added support for renaming the built-in administrator account (default
MxAdmin) viaalter app security ( AdminUserName: '<name>' ).AdminUserNamefield toAlterProjectSecurityStmtAST nodeSetProjectAdminUserName()backend method in modelsdkAdminUserNameas a valid property (deliberately excludingAdminPasswordper fix(check): a gallery's template/filter block is a slot, not a CE0495 duplicate #624)execAlterProjectSecurity()to apply the changeBackend Support:
SetDomainModelDocumentation()method to domain model backend interface and implementationsSetProjectAdminUserName()method to project security backend interface and implementationsDocumentation & Examples:
1314-module-documentation-and-admin-user-name.mdl) demonstrating both featuresImplementation Details
/** */) clears itcreate moduleof an existing module remains a no-op; onlycreate or modify moduleapplies documentation to existing moduleshttps://claude.ai/code/session_01Uj8k5uUCi1zKZ3Edj8MZ8h