I like to use the EMBEDDED_CODE option for exporting APEX apps and until SQLcl 26 and APEXlang it worked fine with our SQLcl Projects workflow.
But with SQLcl version 26.1.2.0 (build: 26.1.2.132.1334), it properly exports the embedded code as before, but the project stage command fails with:
ERROR: The following files failed processing:
The hash value of the file p09999.sql is incorrect and can not be automatically adjusted (hard object)
The following test-case makes it very easy to reproduce this issue (using APEX version 26.1.1):
Test-case Step 1: Create an APEX app:
Simply create the starter app using:
apex generate -id 1000001
cd starter-app
apex import
cd ..
Test-case Step 2: Create the SQLcl Projects framework & use the EMBEDDED_CODE option:
Standard SQLcl Projects initialization and setup steps – nothing out of the ordinary here beyond adding the EMBEDDED_CODE option:
COLUMN current_schema NEW_VALUE current_schema;
SELECT LOWER(SYS_CONTEXT('USERENV', 'CURRENT_SCHEMA')) AS current_schema FROM DUAL;
project init -name starter-app-project -schemas &_USER. -makeroot -verbose
cd starter-app-project
project config -list -name export.apex.exptype -verbose
project config set -name export.apex.exptype -value APEXLANG,APPLICATION_SOURCE,EMBEDDED_CODE
project config -list -name export.apex.exptype -verbose
! git init
! git add --all
! git commit -m 'Initial commit after creating repo'
Test-case Step 3: Create a feature branch and perform the project export step:
! git checkout -b first-branch
project export -o apex.1000001
! git add --all
! git commit -m 'Initial export'
Test-case Step 4: Try the project stage command:
project stage
And the resulting output should be:
Stage is Comparing:
Old Branch refs/heads/main
New Branch refs/heads/first-branch
ERROR: The following files failed processing:
The hash value of the file p09999.sql is incorrect and can not be automatically adjusted (hard object)
The hash value of the file authorizations.sql is incorrect and can not be automatically adjusted (hard object)
Run the following to export the hard objects with hash mismatches:
project export -o EMBEDDED_CODE.p09999.sql,SHARED_COMPONENTS.authorizations.sql
ERROR: An error has occurred processing your request:
Stage process failed: Unrecoverable hash issues present.
So I'm wondering: is the EMBEDDED_CODE option not supported any longer? It's never been mentioned in the SQLcl Project command documentation here. But it is mentioned for the liquibase documentation here. It would be too bad if it's not supported as it used to work with SQLcl Projects and it does add value.
Or is possibly a new or already logged bug?