Skip to content

Add module documentation and admin user name support (issue #1314) - #1058

Merged
ako merged 2 commits into
mainfrom
claude/mxcli-issue-1314-5to4h3
Oct 8, 2026
Merged

ako merged 2 commits into
mainfrom
claude/mxcli-issue-1314-5to4h3

Conversation

@ako

@ako ako commented Oct 8, 2026

Copy link
Copy Markdown
Owner

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 on create module statements now sets this property, and describe module prints it back as a doc comment for round-tripping.

    • Added Documentation and DocumentationSet fields to CreateModuleStmt AST node
    • Added CreateOrModify field to distinguish create or modify module (applies docs to existing modules) from plain create module (no-op on existing modules)
    • Implemented setModuleDocumentation() to persist domain model documentation via backend
    • Updated describeModule() to emit domain model documentation as a doc comment
    • Parser now captures doc comments on module creation statements
  • Project Admin User Name: Added support for renaming the built-in administrator account (default MxAdmin) via alter app security ( AdminUserName: '<name>' ).

  • Backend Support:

    • Added SetDomainModelDocumentation() method to domain model backend interface and implementations
    • Added SetProjectAdminUserName() method to project security backend interface and implementations
    • Updated mock backend and unimplemented stubs to support both new methods
  • Documentation & Examples:

    • Added comprehensive test cases covering module documentation round-tripping, empty comment clearing, and control cases
    • Added test case for admin user name setting
    • Added example MDL file (1314-module-documentation-and-admin-user-name.mdl) demonstrating both features
    • Updated syntax documentation and quick reference guides

Implementation Details

https://claude.ai/code/session_01Uj8k5uUCi1zKZ3Edj8MZ8h

claude added 2 commits October 8, 2026 13:29
…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
@ako
ako merged commit 3d557be into main Oct 8, 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