You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
exec writes javasource/<module>/actions/<Name>.java for create java action but prints only "Created java action", so the file is easy to leave uncommitted #1634
create java action stores the action in the model and writes its body to javasource/<module>/actions/<Name>.java. The exec output names only the model element:
$ mxcli exec ja.mdl -p <app>.mpr
Created module: Probe
Created java action: Probe.JA_Hello
$ git status --short
M <app>.mpr
?? javasource/probe/
?? mprcontents/...
A workflow that commits "the model" (<app>.mpr plus mprcontents/) leaves the .java behind. The model still
builds locally, because the file is on disk. A clone from git gets a model that references an action with no body
file, or an empty stub, and the logic is gone. Nothing in the output hints that a file outside the model was written.
Reproduce
mxcli new JA --version 11.14.0 --theme none --layout none --skip-init --skip-build
cd JA && git init -q && git add -A && git commit -qm base
cat > ../ja.mdl <<'EOF'
mdl 1;
create module "Probe";
create java action "Probe"."JA_Hello" () returns String
as $$
return "hi";
$$;
EOF
mxcli exec ../ja.mdl -p JA.mpr
git status --short # ?? javasource/probe/ (the body, untracked)
Expected
The output says which files outside the .mpr it wrote, so the person or script committing can stage them.
Suggested fix (ranked)
Print each source file written, as its own line: Wrote javasource/probe/actions/JA_Hello.java (Java action body; commit it with the model).
The same applies to JavaScript actions and anything else exec writes beside the model.
A summary line at the end of a run that wrote such files: Files written outside the model: 1 (javasource/). Stage them with the .mpr.
Optionally, exec --json lists them, so wrappers can stage them without parsing text.
How to retest
The reproduction above: after the fix, the exec output names javasource/probe/actions/JA_Hello.java.
Activity