The v0.9 release of Heta includes improvements in export flexibility, support for new formats, and better tooling for the declaration files.
The v0.9 version of the Heta compiler adheres to the Heta standard v0.5.0.
To use the latest Heta compiler, you will need to update some platform files. For other updates, refer to the changelog.
You may also want to check the previous migration guides: Migrate to v0.6, Migrate to v0.7, and Migrate to v0.8.
The new version uses the YAML format (instead of JSON) for the declaration file. YAML is more flexible, supporting comments and multiline strings.
You can still use JSON format for declaration files without restrictions, but YAML files will now be generated by default when using heta init
.
In this version, the export
array is used in the declaration file to specify the list of actions to be exported.
Alternatively, you can use the --export
option in CLI commands. For more details, refer to the CLI documentation.
The old inline export syntax will be deprecated but supported in the current version. However, it will be removed in future versions.
-
Ensure your platform builds without errors using the current v0.8.x builder.
If you're using Git, it is recommended to commit the latest changes before updating the formats.
-
Install the latest version of the Heta compiler:
npm install -g heta-compiler heta -v # should return v0.9.0 or newer
-
If you're using the platform.json declaration file, update the
builderVersion
property to^0.9.0
, and optionally rename the file to platform.yml.# in platform.yml { "builderVersion": "^0.9.0", "id": "my-platform", "notes": "platform notes", "version": "v0.1.0", ... }
-
Remove any unnecessary properties from the declaration file if you had used them previously:
options.skipExport
: replace withexport: []
options.juliaOnly
: replace withexport: [{format: Julia}]
-
If you were using command line options to suppress export with
heta build --no-export
, now useheta build --export ''
.If you previously used
heta build --julia-only
to build only Julia code, now useheta build --export 'Julia'
. -
Remove all inline
#export
actions from your.heta
files and move them to theexport
array in the declaration file.Refer to export formats for more details.
Before:
// in index.heta #export {format: DBSolve, filepath: model, powTransform: function}; #export {format: SBML, version: L3V2};
After (YAML format):
# in platform.yml ... export: [ {format: DBSolve, filepath: model, powTransform: function}, {format: SBML, version: L3V2} ]
Or After (JSON format):
# in platform.json ... "export": [ {"format": "DBSolve", "filepath": "model", "powTransform": "function"}, {"format": "SBML", "version": "L3V2"} ]
-
Test the build with
heta build
, and if you're using Git, make a commit.