Environment:
- SQLcl 26.1.2
- APEX 26.1
- SQLcl APEX export
- SQLcl Project
- APEXlang export/import workflow
Description:
The path behavior between APEXlang export, validate, and import is counterintuitive.
For APEXlang export, the command takes a directory such as:
apex export -applicationid <app_id> -exptype APEXLANG -dir src/database/<schema>/apex_apps/f<app_id>
After export, the APEXlang application root is created under an alias-named child folder:
src/database/<schema>/apex_apps/f<app_id>/<app-alias>
To validate or import the same application, the input path must point to that child folder:
apex validate -input src/database/<schema>/apex_apps/f<app_id>/<app-alias> -ws <workspace>
apex import -input src/database/<schema>/apex_apps/f<app_id>/<app-alias> -ws <workspace>
The directory passed to export is therefore not the same directory accepted by validate/import.
Expected behavior:
The export and import workflow should be symmetric. If I export to a directory, I should be able to validate or import from that same directory.
In other words, this should work when there is a single APEXlang application below the export directory:
apex validate -input src/database/<schema>/apex_apps/f<app_id>
apex import -input src/database/<schema>/apex_apps/f<app_id>
SQLcl could resolve the actual APEXlang application root by finding the child folder that contains .apex/apexlang.json.
Enhancement request:
Please consider two related improvements.
Suggestion 1: make APEXlang path handling symmetric.
Allow apex validate and apex import to accept the same directory that was passed to apex export -dir when the actual APEXlang application root can be resolved unambiguously.
Suggestion 2: add SQLcl Project-aware convenience commands.
For SQLcl Project repositories, please consider adding commands or options that accept an application ID and resolve the APEXlang source path automatically from the current project.
For example:
project apex validate -o APEX.<app_id>
project apex import -o APEX.<app_id>
Expected result:
SQLcl would find the exported APEXlang application source under the current export or project structure and use the correct workspace.
Impact:
The current command behavior works, but it is counterintuitive because the directory used for export cannot be reused directly for validate/import. Symmetric path handling and project-aware validation/import commands would make the APEXlang workflow simpler and less error-prone.