From f4810d8934659742a5b46ae1045b149cf35b2976 Mon Sep 17 00:00:00 2001 From: Evgeny Metelkin Date: Fri, 6 Sep 2024 10:12:15 +0300 Subject: [PATCH] remove juliaOnly, --julia-only --- bin/heta-build.js | 2 -- cli-references.md | 5 +---- src/builder/declaration-schema.json | 1 - src/builder/index.js | 7 +------ 4 files changed, 2 insertions(+), 13 deletions(-) diff --git a/bin/heta-build.js b/bin/heta-build.js index 961b0feb..e5ee96c1 100644 --- a/bin/heta-build.js +++ b/bin/heta-build.js @@ -29,7 +29,6 @@ program .option('--units-check', 'Check all Records for unit consistency.') .option('-L, --log-mode ', 'When to create log file.') .option('--debug', 'If set the raw module output will be stored in "meta".') - .option('--julia-only', 'Run in Julia supporting mode: skip declared exports.') .option('--dist-dir ', 'Set export directory path, where to store exported files.') .option('--meta-dir ', 'Set meta directory path.') // moduleImport @@ -87,7 +86,6 @@ async function main() { unitsCheck: opts.unitsCheck, logMode: opts.logMode, debug: opts.debug, - juliaOnly: opts.juliaOnly, distDir: opts.distDir, metaDir: opts.metaDir }, diff --git a/cli-references.md b/cli-references.md index f47c6189..533401e9 100644 --- a/cli-references.md +++ b/cli-references.md @@ -60,7 +60,6 @@ List of `heta build` options: | --type | \ | heta | Type of source file. This option allows to select type of module which will be applied for parsing. Available values: heta/xlsx/json/yaml/sbml. | | --debug | | | Working in debugging mode. All parsed files will be saved in JSON files in **meta** directory. | | --units-check | | | If set all records will be checked for units consistency. | -| --julia-only | | | Run in Julia supporting mode: skip declared exports, add default export to Julia. | | --dist-dir | \ | | Set export directory path, where to store exported files. | | --meta-dir | \ | | Set meta directory path. | | --log-mode | string | error | The rule in which case the log file should be created. Possible values are: never/error/always | @@ -205,7 +204,6 @@ There are properties in declaration file which do not change compilation process | options.logLevel | string | | info | When parsing the compiler prints the messages to the shell. Here you can set a level of printing messages. Possible values: "info", "warn", "error". For example if you set "warn", only warnings and errors will be printed. | | options.logFormat | string | | `string` | The format of saving logs to file. The default value is `string` which corresponds the format similar to console. Full list of options is : `string`, `json`.| | options.unitsCheck | boolean | --units-check | false | If `true` all Record will be checked for units consistency. | -| options.juliaOnly | boolean | --julia-only | false | If `true` the compilation will run Julia supporting mode. | | options.distDir | string | --dist-dir | dist | At default all export files are created inside **dist** directory. The option can set the another target for storing outputs. | | options.debug | boolean | --debug | false | Working in debugging mode. All parsed modules will be saved in JSON files in meta directory. | | options.metaDir | string | --meta-dir | meta | If `options.debug` is set as `true` this option changes the target directory for meta files. | @@ -222,8 +220,7 @@ Using neither declaration file nor CLI options is equivalent to the following de "distDir": "dist", "metaDir": "meta", "debug": false, - "unitsCheck": false, - "juliaOnly": false + "unitsCheck": false }, "importModule": { "source": "index.heta", diff --git a/src/builder/declaration-schema.json b/src/builder/declaration-schema.json index 8394e00c..33543a5f 100644 --- a/src/builder/declaration-schema.json +++ b/src/builder/declaration-schema.json @@ -30,7 +30,6 @@ "logLevel": {"type": "string", "default": "info", "enum": ["panic", "info", "warn", "error"]}, "logFormat": {"type": "string", "default": "string", "enum": ["string", "json"]}, "unitsCheck": {"type": "boolean", "default": false}, - "juliaOnly": {"type": "boolean", "default": false}, "distDir": {"type": "string", "default": "dist" }, "debug": {"type": "boolean", "default": false, "description": "Should we put parsed modules to meta?"}, "metaDir": {"type": "string", "default": "meta" } diff --git a/src/builder/index.js b/src/builder/index.js index aa2bfbf0..c7020e6a 100644 --- a/src/builder/index.js +++ b/src/builder/index.js @@ -165,12 +165,7 @@ class Builder { this.container.checkTerms(); // 9. Exports - if (this.options.juliaOnly) { - this.logger.warn('"Julia only" mode'); - this.exportJuliaOnly(); - } else { - this.exportMany(); - } + this.exportMany(); } else { this.logger.warn('Units checking and export were skipped because of errors in compilation.'); }