Skip to content

Fix and improve the generate command - #1324

Merged
isc-dchui merged 3 commits into
mainfrom
fix/806
Nov 6, 2026
Merged

isc-dchui merged 3 commits into
mainfrom
fix/806

Conversation

@isc-dchui

@isc-dchui isc-dchui commented Nov 6, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Fixes #806, fixes #503, fixes #150

generate wrote web applications with %Installer.CSPApplication attribute names inside <WebApplication>, which validates every attribute against Security.Applications, so generated modules with a web app failed to load. This also fixes two smaller gaps:

generate on Before After
A web application PasswordAuthEnabled, Url, DeployPath, ... rejected on load Security.Applications property names
Classes MyApp.Local.A and MyApp.Local.B MyApp.PKG MyApp.Local.PKG
A tests/ folder Ignored <UnitTest> with the classes' shared package
  • Every property Security.Applications.Get returns is written if it differs from its default, because those defaults are what WebApplication creates the app with. Name and NameSpace come from the install, and IsNameSpaceDefault is left out so installing the module doesn't take over the namespace's default app. AutheEnabled is always written so a reader can see how the app authenticates.
  • Only a CSP app's Path becomes {$cspdir}. Other directories, such as WSGIAppLocation, keep this instance's path.
  • <WebApplication> doesn't deploy files the way <CSPApplication SourcePath> did, so a CSP app's source files get a <FileCopy> to its Path. That FileCopy replaces its target on load and removes it on uninstall, so loading a generated module on the instance it came from swaps the app's directory for the module's copy.
  • Each directory gets one .PKG per top-level package. Being narrower than before, it won't cover a package added later outside it, such as MyApp.Other next to MyApp.Local.PKG.
  • A tests folder inside the source folder is left out of the .PKG resources. Every <UnitTest> gets Phase="test", including integration tests.
  • A source folder that doesn't exist now stops generate with an error instead of writing a module.xml with no code.

Testing

New Test.PM.Integration.Generate and Test.PM.Unit.ModuleTemplate. The web app test deletes the apps it generated from and loads the module to recreate them.

Checklist

  • This branch has the latest changes from the main branch rebased or merged.
  • Changelog entry added.
  • Unit (zpm test -only) and integration tests (zpm verify -only) pass.
  • Style matches the style guide in the contributing guide.
  • Documentation has been/will be updated
    • Source controlled docs, e.g. README.md, should be included in this PR and Wiki changes should be made after this PR is merged (add an extra issue for this if needed)
  • Pull request correctly renders in the "Preview" tab.

🤖 Generated with Claude Code

Comment thread src/cls/IPM/Storage/ModuleTemplate.cls Resolved
@isc-dchui
isc-dchui merged commit 571e04a into main Nov 6, 2026
12 of 13 checks passed
@isc-dchui
isc-dchui deleted the fix/806 branch November 6, 2026 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants