firefly-compiler 0.5.78 → 0.5.80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/compiler/Builder.ff +32 -40
- package/compiler/Compiler.ff +14 -4
- package/compiler/DevelopMode.ff +406 -0
- package/compiler/JsEmitter.ff +11 -2
- package/compiler/Main.ff +79 -54
- package/compiler/ModuleCache.ff +5 -5
- package/core/.firefly/include/package.json +1 -1
- package/core/BuildSystem.ff +82 -11
- package/core/Core.ff +4 -4
- package/core/Error.ff +7 -1
- package/core/Js.ff +13 -2
- package/core/NodeSystem.ff +47 -30
- package/core/Path.ff +7 -2
- package/experimental/proxy/Main.ff +60 -0
- package/experimental/proxy/Runner.ff +11 -0
- package/experimental/proxy/Tcp.ff +162 -0
- package/experimental/random/Superdigit.ff +18 -0
- package/experimental/terrain/Main.ff +40 -0
- package/experimental/terrain/Terrain.ff +97 -0
- package/experimental/terrain/Terrain2.ff +109 -0
- package/fireflysite/Html.ff +15 -2
- package/fireflysite/Main.ff +0 -1
- package/fireflysite/assets/markdown/reference/statements-and-expressions.md +1 -1
- package/lsp/CompletionHandler.ff +2 -2
- package/output/js/ff/compiler/Builder.mjs +26 -51
- package/output/js/ff/compiler/Builder.mjs.map +7 -11
- package/output/js/ff/compiler/Compiler.mjs +74 -20
- package/output/js/ff/compiler/Compiler.mjs.map +18 -14
- package/output/js/ff/compiler/Dependencies.mjs +10 -10
- package/output/js/ff/compiler/Dependencies.mjs.map +2 -2
- package/output/js/ff/compiler/DependencyLock.mjs.map +1 -1
- package/output/js/ff/compiler/Deriver.mjs +2 -2
- package/output/js/ff/compiler/Deriver.mjs.map +2 -2
- package/output/js/ff/compiler/DevelopMode.mjs +1049 -0
- package/output/js/ff/compiler/DevelopMode.mjs.map +183 -0
- package/output/js/ff/compiler/Dictionaries.mjs +4 -4
- package/output/js/ff/compiler/Dictionaries.mjs.map +2 -2
- package/output/js/ff/compiler/Environment.mjs +6 -6
- package/output/js/ff/compiler/Environment.mjs.map +2 -2
- package/output/js/ff/compiler/Inference.mjs +80 -80
- package/output/js/ff/compiler/Inference.mjs.map +2 -2
- package/output/js/ff/compiler/JsEmitter.mjs +60 -14
- package/output/js/ff/compiler/JsEmitter.mjs.map +3 -3
- package/output/js/ff/compiler/JsImporter.mjs +8 -8
- package/output/js/ff/compiler/JsImporter.mjs.map +2 -2
- package/output/js/ff/compiler/LspHook.mjs +4 -4
- package/output/js/ff/compiler/LspHook.mjs.map +2 -2
- package/output/js/ff/compiler/Main.mjs +298 -137
- package/output/js/ff/compiler/Main.mjs.map +48 -38
- package/output/js/ff/compiler/ModuleCache.mjs +12 -8
- package/output/js/ff/compiler/ModuleCache.mjs.map +4 -3
- package/output/js/ff/compiler/Parser.mjs +50 -50
- package/output/js/ff/compiler/Parser.mjs.map +2 -2
- package/output/js/ff/compiler/Patterns.mjs +6 -6
- package/output/js/ff/compiler/Patterns.mjs.map +2 -2
- package/output/js/ff/compiler/Resolver.mjs +32 -32
- package/output/js/ff/compiler/Resolver.mjs.map +2 -2
- package/output/js/ff/compiler/SourceMap.mjs.map +1 -1
- package/output/js/ff/compiler/Substitution.mjs.map +1 -1
- package/output/js/ff/compiler/Syntax.mjs +74 -74
- package/output/js/ff/compiler/Syntax.mjs.map +2 -2
- package/output/js/ff/compiler/Token.mjs +4 -4
- package/output/js/ff/compiler/Token.mjs.map +2 -2
- package/output/js/ff/compiler/Tokenizer.mjs +4 -4
- package/output/js/ff/compiler/Tokenizer.mjs.map +2 -2
- package/output/js/ff/compiler/Unification.mjs +14 -14
- package/output/js/ff/compiler/Unification.mjs.map +2 -2
- package/output/js/ff/compiler/Wildcards.mjs.map +1 -1
- package/output/js/ff/compiler/Workspace.mjs +4 -4
- package/output/js/ff/compiler/Workspace.mjs.map +2 -2
- package/output/js/ff/core/Any.mjs.map +1 -1
- package/output/js/ff/core/Array.mjs +10 -10
- package/output/js/ff/core/Array.mjs.map +2 -2
- package/output/js/ff/core/AssetSystem.mjs.map +1 -1
- package/output/js/ff/core/Atomic.mjs.map +1 -1
- package/output/js/ff/core/Bool.mjs.map +1 -1
- package/output/js/ff/core/BrowserSystem.mjs.map +1 -1
- package/output/js/ff/core/Buffer.mjs +4 -4
- package/output/js/ff/core/Buffer.mjs.map +2 -2
- package/output/js/ff/core/BuildSystem.mjs +116 -12
- package/output/js/ff/core/BuildSystem.mjs.map +35 -6
- package/output/js/ff/core/Channel.mjs.map +1 -1
- package/output/js/ff/core/Char.mjs.map +1 -1
- package/output/js/ff/core/Core.mjs +4 -8
- package/output/js/ff/core/Core.mjs.map +5 -7
- package/output/js/ff/core/Crypto.mjs.map +1 -1
- package/output/js/ff/core/Date.mjs.map +1 -1
- package/output/js/ff/core/Duration.mjs.map +1 -1
- package/output/js/ff/core/Equal.mjs.map +1 -1
- package/output/js/ff/core/Error.mjs +32 -2
- package/output/js/ff/core/Error.mjs.map +16 -3
- package/output/js/ff/core/FileHandle.mjs.map +1 -1
- package/output/js/ff/core/Float.mjs.map +1 -1
- package/output/js/ff/core/HttpClient.mjs.map +1 -1
- package/output/js/ff/core/Int.mjs.map +1 -1
- package/output/js/ff/core/IntMap.mjs +2 -2
- package/output/js/ff/core/IntMap.mjs.map +2 -2
- package/output/js/ff/core/Js.mjs +20 -4
- package/output/js/ff/core/Js.mjs.map +9 -5
- package/output/js/ff/core/JsSystem.mjs.map +1 -1
- package/output/js/ff/core/JsValue.mjs +20 -20
- package/output/js/ff/core/JsValue.mjs.map +2 -2
- package/output/js/ff/core/Json.mjs +10 -10
- package/output/js/ff/core/Json.mjs.map +2 -2
- package/output/js/ff/core/List.mjs +4 -4
- package/output/js/ff/core/List.mjs.map +2 -2
- package/output/js/ff/core/Lock.mjs +4 -4
- package/output/js/ff/core/Lock.mjs.map +2 -2
- package/output/js/ff/core/Log.mjs.map +1 -1
- package/output/js/ff/core/Map.mjs.map +1 -1
- package/output/js/ff/core/NodeSystem.mjs +56 -22
- package/output/js/ff/core/NodeSystem.mjs.map +14 -6
- package/output/js/ff/core/Nothing.mjs.map +1 -1
- package/output/js/ff/core/Option.mjs +2 -2
- package/output/js/ff/core/Option.mjs.map +2 -2
- package/output/js/ff/core/Ordering.mjs.map +1 -1
- package/output/js/ff/core/Pair.mjs +2 -2
- package/output/js/ff/core/Pair.mjs.map +2 -2
- package/output/js/ff/core/Path.mjs +30 -4
- package/output/js/ff/core/Path.mjs.map +8 -6
- package/output/js/ff/core/Queue.mjs.map +1 -1
- package/output/js/ff/core/Random.mjs.map +1 -1
- package/output/js/ff/core/RbMap.mjs.map +1 -1
- package/output/js/ff/core/Serializable.mjs +2 -2
- package/output/js/ff/core/Serializable.mjs.map +2 -2
- package/output/js/ff/core/Set.mjs.map +1 -1
- package/output/js/ff/core/Show.mjs.map +1 -1
- package/output/js/ff/core/SourceLocation.mjs.map +1 -1
- package/output/js/ff/core/Stream.mjs.map +1 -1
- package/output/js/ff/core/String.mjs +10 -10
- package/output/js/ff/core/String.mjs.map +2 -2
- package/output/js/ff/core/StringMap.mjs +2 -2
- package/output/js/ff/core/StringMap.mjs.map +2 -2
- package/output/js/ff/core/Task.mjs.map +1 -1
- package/output/js/ff/core/Try.mjs +2 -2
- package/output/js/ff/core/Try.mjs.map +2 -2
- package/output/js/ff/core/Unit.mjs.map +1 -1
- package/output/js/ff/core/node_modules +1 -0
- package/package.json +1 -2
- package/vscode/package.json +1 -1
- package/webserver/.firefly/include/package.json +1 -1
- package/webserver/WebServer.ff +7 -4
|
@@ -8,6 +8,8 @@ import * as ff_compiler_Dependencies from "../../ff/compiler/Dependencies.mjs"
|
|
|
8
8
|
|
|
9
9
|
import * as ff_compiler_DependencyLock from "../../ff/compiler/DependencyLock.mjs"
|
|
10
10
|
|
|
11
|
+
import * as ff_compiler_DevelopMode from "../../ff/compiler/DevelopMode.mjs"
|
|
12
|
+
|
|
11
13
|
import * as ff_compiler_Inference from "../../ff/compiler/Inference.mjs"
|
|
12
14
|
|
|
13
15
|
import * as ff_compiler_JsEmitter from "../../ff/compiler/JsEmitter.mjs"
|
|
@@ -129,6 +131,9 @@ return BootstrapCommand$;
|
|
|
129
131
|
export function RunCommand(mainPath_, argument_) {
|
|
130
132
|
return {RunCommand: true, mainPath_, argument_};
|
|
131
133
|
}
|
|
134
|
+
export function DevelopCommand(mainPath_, argument_) {
|
|
135
|
+
return {DevelopCommand: true, mainPath_, argument_};
|
|
136
|
+
}
|
|
132
137
|
export function BrowserCommand(mainPath_) {
|
|
133
138
|
return {BrowserCommand: true, mainPath_};
|
|
134
139
|
}
|
|
@@ -147,39 +152,10 @@ export function CommandLineError(problem_) {
|
|
|
147
152
|
return {problem_};
|
|
148
153
|
}
|
|
149
154
|
|
|
150
|
-
export const usageString_ = "\r\nusage: firefly <main-file> [<main-arguments>] | <command> [<command-arguments>]\r\n\r\nThese are the commands:\r\n run <main-file> [<main-arguments>]
|
|
155
|
+
export const usageString_ = "\r\nusage: firefly <main-file> [<main-arguments>] | <command> [<command-arguments>]\r\n\r\nThese are the commands:\r\n run <main-file> [<main-arguments>] Run the main file with the provided arguments\r\n develop <main-file> [<main-arguments>] Develop the main file with the provided arguments\r\n browser <main-file> Compile the main file for the browser\r\n build <main-file> Build the main file\r\n check <firefly-file> Check the firefly source file for errors\r\n symbols <out-file> <firefly-file> Print a .tsv with the symbols of a firefly source file\r\n bootstrap Bootstrap the compiler\r\n";
|
|
151
156
|
|
|
152
157
|
export function main_(system_) {
|
|
153
158
|
const fireflyPath_ = ff_compiler_Main.detectFireflyPath_(system_);
|
|
154
|
-
function buildScript_(mainPath_, mainPackagePair_, emitTarget_, resolvedDependencies_) {
|
|
155
|
-
const fixedPackagePaths_ = (ff_core_Map.Map_contains(resolvedDependencies_.packagePaths_, ff_compiler_Syntax.PackagePair("ff", "core"), ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_PackagePair)
|
|
156
|
-
? resolvedDependencies_.packagePaths_
|
|
157
|
-
: ff_core_Map.Map_add(resolvedDependencies_.packagePaths_, ff_compiler_Syntax.PackagePair("ff", "core"), ff_core_Path.Path_slash(fireflyPath_, "core"), ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_PackagePair));
|
|
158
|
-
const compilerModulePath_ = ((ff_core_Equal.notEquals_(emitTarget_, ff_compiler_JsEmitter.EmitBrowser(), ff_compiler_JsEmitter.ff_core_Equal_Equal$ff_compiler_JsEmitter_EmitTarget) && ff_core_Equal.notEquals_(emitTarget_, ff_compiler_JsEmitter.EmitExecutable(), ff_compiler_JsEmitter.ff_core_Equal_Equal$ff_compiler_JsEmitter_EmitTarget))
|
|
159
|
-
? ff_core_Option.Some(ff_core_Path.Path_slash(ff_core_Path.Path_slash(ff_core_Path.Path_slash(ff_core_Path.Path_slash(fireflyPath_, "output"), "js"), "ff"), "compiler/Builder.mjs"))
|
|
160
|
-
: ff_core_Option.None());
|
|
161
|
-
const targetName_ = (((_1) => {
|
|
162
|
-
if(_1.EmitBuild) {
|
|
163
|
-
return "build"
|
|
164
|
-
}
|
|
165
|
-
if(_1.EmitNode) {
|
|
166
|
-
return "node"
|
|
167
|
-
}
|
|
168
|
-
if(_1.EmitBrowser) {
|
|
169
|
-
return "browser"
|
|
170
|
-
}
|
|
171
|
-
{
|
|
172
|
-
return "executable"
|
|
173
|
-
}
|
|
174
|
-
}))(emitTarget_);
|
|
175
|
-
const folders_ = ff_core_Path.Path_relativeListTo(ff_core_Option.Option_grab(ff_core_Path.Path_parent(mainPath_)), ff_core_Map.Map_grab(fixedPackagePaths_, mainPackagePair_, ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_PackagePair));
|
|
176
|
-
const name_ = ff_core_Option.Option_grab(ff_core_String.String_removeLast(ff_core_Path.Path_base(mainPath_), ".ff"));
|
|
177
|
-
const moduleKey_ = ff_compiler_Syntax.ModuleKey(mainPackagePair_, folders_, name_);
|
|
178
|
-
ff_compiler_Builder.build_(system_, emitTarget_, [moduleKey_], (((_c) => {
|
|
179
|
-
return ff_compiler_Dependencies.ResolvedDependencies(_c.mainPackagePair_, _c.packages_, fixedPackagePaths_, _c.singleFilePackages_)
|
|
180
|
-
}))(resolvedDependencies_), compilerModulePath_, ff_core_Path.Path_slash(ff_core_NodeSystem.NodeSystem_path(system_, ".firefly"), "temporary"), ff_core_Path.Path_path(ff_core_Path.Path_path(ff_core_NodeSystem.NodeSystem_path(system_, ".firefly"), "output"), targetName_), false, ff_compiler_ModuleCache.new_(0));
|
|
181
|
-
return moduleKey_
|
|
182
|
-
}
|
|
183
159
|
function runCommand_(command_) {
|
|
184
160
|
const command_a = command_;
|
|
185
161
|
if(command_a.RunCommand) {
|
|
@@ -188,11 +164,17 @@ const arguments_ = command_a.argument_;
|
|
|
188
164
|
const resolvedDependencies_ = ff_compiler_Dependencies.process_(ff_core_NodeSystem.NodeSystem_httpClient(system_), ff_compiler_DependencyLock.new_(ff_core_NodeSystem.NodeSystem_mainTask(system_)), ff_core_NodeSystem.NodeSystem_path(system_, mainFile_));
|
|
189
165
|
ff_compiler_Main.prepareFireflyDirectory_(ff_core_NodeSystem.NodeSystem_path(system_, "."));
|
|
190
166
|
const mainPath_ = ff_core_NodeSystem.NodeSystem_path(system_, mainFile_);
|
|
191
|
-
const moduleKey_ = buildScript_(mainPath_, resolvedDependencies_.mainPackagePair_, ff_compiler_JsEmitter.EmitNode(), resolvedDependencies_);
|
|
167
|
+
const moduleKey_ = ff_compiler_Main.buildScript_(system_, mainPath_, resolvedDependencies_.mainPackagePair_, ff_compiler_JsEmitter.EmitNode(), resolvedDependencies_, ff_compiler_ModuleCache.new_(0), false);
|
|
192
168
|
if((!ff_compiler_Main.importAndRun_(system_, fireflyPath_, "node", moduleKey_, arguments_))) {
|
|
193
169
|
const at_ = ff_compiler_Syntax.Location(ff_core_Path.Path_absolute(ff_core_NodeSystem.NodeSystem_path(system_, mainFile_)), 1, 1);
|
|
194
|
-
throw ff_core_Js.initializeError_(
|
|
170
|
+
throw ff_core_Js.initializeError_(ff_compiler_Syntax.CompileError(at_, "This module does not contain a 'nodeMain' function"), new Error(), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError, ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_CompileError)
|
|
171
|
+
}
|
|
172
|
+
return
|
|
195
173
|
}
|
|
174
|
+
if(command_a.DevelopCommand) {
|
|
175
|
+
const mainFile_ = command_a.mainPath_;
|
|
176
|
+
const arguments_ = command_a.argument_;
|
|
177
|
+
ff_compiler_DevelopMode.run_(system_, fireflyPath_, mainFile_, arguments_)
|
|
196
178
|
return
|
|
197
179
|
}
|
|
198
180
|
if(command_a.BrowserCommand) {
|
|
@@ -200,7 +182,7 @@ const mainFile_ = command_a.mainPath_;
|
|
|
200
182
|
const resolvedDependencies_ = ff_compiler_Dependencies.process_(ff_core_NodeSystem.NodeSystem_httpClient(system_), ff_compiler_DependencyLock.new_(ff_core_NodeSystem.NodeSystem_mainTask(system_)), ff_core_NodeSystem.NodeSystem_path(system_, mainFile_));
|
|
201
183
|
ff_compiler_Main.prepareFireflyDirectory_(ff_core_NodeSystem.NodeSystem_path(system_, "."));
|
|
202
184
|
const mainPath_ = ff_core_NodeSystem.NodeSystem_path(system_, mainFile_);
|
|
203
|
-
const moduleKey_ = buildScript_(mainPath_, resolvedDependencies_.mainPackagePair_, ff_compiler_JsEmitter.EmitBrowser(), resolvedDependencies_);
|
|
185
|
+
const moduleKey_ = ff_compiler_Main.buildScript_(system_, mainPath_, resolvedDependencies_.mainPackagePair_, ff_compiler_JsEmitter.EmitBrowser(), resolvedDependencies_, ff_compiler_ModuleCache.new_(0), false);
|
|
204
186
|
ff_compiler_Main.bundleForBrowser_(system_, resolvedDependencies_.mainPackagePair_, moduleKey_)
|
|
205
187
|
return
|
|
206
188
|
}
|
|
@@ -209,8 +191,8 @@ const mainFile_ = command_a.mainPath_;
|
|
|
209
191
|
const resolvedDependencies_ = ff_compiler_Dependencies.process_(ff_core_NodeSystem.NodeSystem_httpClient(system_), ff_compiler_DependencyLock.new_(ff_core_NodeSystem.NodeSystem_mainTask(system_)), ff_core_NodeSystem.NodeSystem_path(system_, (mainFile_ + ".ff")));
|
|
210
192
|
ff_compiler_Main.prepareFireflyDirectory_(ff_core_NodeSystem.NodeSystem_path(system_, "."));
|
|
211
193
|
const mainPath_ = ff_core_NodeSystem.NodeSystem_path(system_, mainFile_);
|
|
212
|
-
const moduleKey_ = buildScript_(mainPath_, resolvedDependencies_.mainPackagePair_, ff_compiler_JsEmitter.EmitBuild(), resolvedDependencies_);
|
|
213
|
-
buildScript_(mainPath_, resolvedDependencies_.mainPackagePair_, ff_compiler_JsEmitter.EmitExecutable(), resolvedDependencies_);
|
|
194
|
+
const moduleKey_ = ff_compiler_Main.buildScript_(system_, mainPath_, resolvedDependencies_.mainPackagePair_, ff_compiler_JsEmitter.EmitBuild(), resolvedDependencies_, ff_compiler_ModuleCache.new_(0), false);
|
|
195
|
+
ff_compiler_Main.buildScript_(system_, mainPath_, resolvedDependencies_.mainPackagePair_, ff_compiler_JsEmitter.EmitExecutable(), resolvedDependencies_, ff_compiler_ModuleCache.new_(0), false);
|
|
214
196
|
ff_compiler_Main.bundleForPkg_(system_, resolvedDependencies_.mainPackagePair_, ff_core_Path.Path_base(mainPath_));
|
|
215
197
|
ff_compiler_Main.importAndRun_(system_, fireflyPath_, "build", moduleKey_, [])
|
|
216
198
|
return
|
|
@@ -219,14 +201,14 @@ if(command_a.CheckCommand) {
|
|
|
219
201
|
const filePath_ = command_a.filePath_;
|
|
220
202
|
const errors_ = ff_compiler_Builder.check_(system_, fireflyPath_, ff_core_NodeSystem.NodeSystem_path(system_, filePath_), ff_core_Option.None(), ff_core_Set.new_(), ff_core_Map.new_(), ff_compiler_ModuleCache.new_(1), ff_compiler_DependencyLock.new_(ff_core_NodeSystem.NodeSystem_mainTask(system_)), 0, ff_compiler_LspHook.disabled_(), true);
|
|
221
203
|
if((!ff_core_List.List_isEmpty(errors_))) {
|
|
222
|
-
throw ff_core_Js.initializeError_(
|
|
204
|
+
throw ff_core_Js.initializeError_(ff_compiler_Syntax.CompileErrors(ff_core_List.List_distinct(errors_, ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_CompileError)), new Error(), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileErrors, ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_CompileErrors)
|
|
223
205
|
}
|
|
224
206
|
return
|
|
225
207
|
}
|
|
226
208
|
if(command_a.BootstrapCommand) {
|
|
227
209
|
const workingDirectory_ = ff_core_NodeSystem.NodeSystem_path(system_, ".");
|
|
228
210
|
const fakeLocation_ = ff_compiler_Syntax.Location("<core>", 0, 0);
|
|
229
|
-
ff_compiler_Builder.build_(system_, ff_compiler_JsEmitter.EmitNode(), [ff_compiler_Syntax.ModuleKey(ff_compiler_Syntax.PackagePair("ff", "compiler"), [], "Main")], ff_compiler_Dependencies.ResolvedDependencies(ff_compiler_Syntax.PackagePair("ff", "compiler"), ff_core_List.List_toMap([ff_core_Pair.Pair(ff_compiler_Syntax.PackagePair("ff", "core"), ff_compiler_Syntax.PackageInfo(ff_compiler_Syntax.DPackage(fakeLocation_, ff_compiler_Syntax.PackagePair("ff", "core"), ff_compiler_Syntax.Version(fakeLocation_, 0, 0, 0), ff_compiler_Syntax.TargetNames(true, false)), [], [ff_compiler_Syntax.DInclude(fakeLocation_, "node_modules")]))], ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_PackagePair), ff_core_List.List_toMap([ff_core_Pair.Pair(ff_compiler_Syntax.PackagePair("ff", "compiler"), ff_core_Path.Path_slash(workingDirectory_, "compiler")), ff_core_Pair.Pair(ff_compiler_Syntax.PackagePair("ff", "core"), ff_core_Path.Path_slash(workingDirectory_, "core"))], ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_PackagePair), ff_core_List.List_toSet([], ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_PackagePair)), ff_core_Option.None(), ff_core_Path.Path_slash(ff_core_Path.Path_slash(workingDirectory_, "output"), "
|
|
211
|
+
ff_compiler_Builder.build_(system_, ff_compiler_JsEmitter.EmitNode(), [ff_compiler_Syntax.ModuleKey(ff_compiler_Syntax.PackagePair("ff", "compiler"), [], "Main")], ff_compiler_Dependencies.ResolvedDependencies(ff_compiler_Syntax.PackagePair("ff", "compiler"), ff_core_List.List_toMap([ff_core_Pair.Pair(ff_compiler_Syntax.PackagePair("ff", "core"), ff_compiler_Syntax.PackageInfo(ff_compiler_Syntax.DPackage(fakeLocation_, ff_compiler_Syntax.PackagePair("ff", "core"), ff_compiler_Syntax.Version(fakeLocation_, 0, 0, 0), ff_compiler_Syntax.TargetNames(true, false)), [], [ff_compiler_Syntax.DInclude(fakeLocation_, "node_modules")]))], ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_PackagePair), ff_core_List.List_toMap([ff_core_Pair.Pair(ff_compiler_Syntax.PackagePair("ff", "compiler"), ff_core_Path.Path_slash(workingDirectory_, "compiler")), ff_core_Pair.Pair(ff_compiler_Syntax.PackagePair("ff", "core"), ff_core_Path.Path_slash(workingDirectory_, "core"))], ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_PackagePair), ff_core_List.List_toSet([], ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_PackagePair)), ff_core_Option.None(), ff_core_Path.Path_slash(ff_core_Path.Path_slash(workingDirectory_, "output"), "js"), true, ff_compiler_ModuleCache.new_(0))
|
|
230
212
|
return
|
|
231
213
|
}
|
|
232
214
|
{
|
|
@@ -295,6 +277,37 @@ return
|
|
|
295
277
|
}), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileErrors)
|
|
296
278
|
}
|
|
297
279
|
|
|
280
|
+
export function buildScript_(system_, mainPath_, mainPackagePair_, emitTarget_, resolvedDependencies_, moduleCache_ = ff_compiler_ModuleCache.new_(0), printMeasurements_ = false) {
|
|
281
|
+
const fireflyPath_ = ff_compiler_Main.detectFireflyPath_(system_);
|
|
282
|
+
const fixedPackagePaths_ = (ff_core_Map.Map_contains(resolvedDependencies_.packagePaths_, ff_compiler_Syntax.PackagePair("ff", "core"), ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_PackagePair)
|
|
283
|
+
? resolvedDependencies_.packagePaths_
|
|
284
|
+
: ff_core_Map.Map_add(resolvedDependencies_.packagePaths_, ff_compiler_Syntax.PackagePair("ff", "core"), ff_core_Path.Path_slash(fireflyPath_, "core"), ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_PackagePair));
|
|
285
|
+
const compilerModulePath_ = ((ff_core_Equal.notEquals_(emitTarget_, ff_compiler_JsEmitter.EmitBrowser(), ff_compiler_JsEmitter.ff_core_Equal_Equal$ff_compiler_JsEmitter_EmitTarget) && ff_core_Equal.notEquals_(emitTarget_, ff_compiler_JsEmitter.EmitExecutable(), ff_compiler_JsEmitter.ff_core_Equal_Equal$ff_compiler_JsEmitter_EmitTarget))
|
|
286
|
+
? ff_core_Option.Some(ff_core_Path.Path_slash(ff_core_Path.Path_slash(ff_core_Path.Path_slash(ff_core_Path.Path_slash(fireflyPath_, "output"), "js"), "ff"), "compiler/Builder.mjs"))
|
|
287
|
+
: ff_core_Option.None());
|
|
288
|
+
const targetName_ = (((_1) => {
|
|
289
|
+
if(_1.EmitBuild) {
|
|
290
|
+
return "build"
|
|
291
|
+
}
|
|
292
|
+
if(_1.EmitNode) {
|
|
293
|
+
return "node"
|
|
294
|
+
}
|
|
295
|
+
if(_1.EmitBrowser) {
|
|
296
|
+
return "browser"
|
|
297
|
+
}
|
|
298
|
+
{
|
|
299
|
+
return "executable"
|
|
300
|
+
}
|
|
301
|
+
}))(emitTarget_);
|
|
302
|
+
const folders_ = ff_core_Path.Path_relativeListTo(ff_core_Option.Option_grab(ff_core_Path.Path_parent(mainPath_)), ff_core_Map.Map_grab(fixedPackagePaths_, mainPackagePair_, ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_PackagePair));
|
|
303
|
+
const name_ = ff_core_Option.Option_grab(ff_core_String.String_removeLast(ff_core_Path.Path_base(mainPath_), ".ff"));
|
|
304
|
+
const moduleKey_ = ff_compiler_Syntax.ModuleKey(mainPackagePair_, folders_, name_);
|
|
305
|
+
ff_compiler_Builder.build_(system_, emitTarget_, [moduleKey_], (((_c) => {
|
|
306
|
+
return ff_compiler_Dependencies.ResolvedDependencies(_c.mainPackagePair_, _c.packages_, fixedPackagePaths_, _c.singleFilePackages_)
|
|
307
|
+
}))(resolvedDependencies_), compilerModulePath_, ff_core_Path.Path_path(ff_core_Path.Path_path(ff_core_NodeSystem.NodeSystem_path(system_, ".firefly"), "output"), targetName_), printMeasurements_, moduleCache_);
|
|
308
|
+
return moduleKey_
|
|
309
|
+
}
|
|
310
|
+
|
|
298
311
|
export function parseCommandLine_(arguments_) {
|
|
299
312
|
const arguments_a = arguments_;
|
|
300
313
|
if(arguments_a.length >= 1) {
|
|
@@ -320,7 +333,26 @@ return ff_compiler_Main.RunCommand(mainFile_, mainArguments_)
|
|
|
320
333
|
}
|
|
321
334
|
}
|
|
322
335
|
{
|
|
323
|
-
throw ff_core_Js.initializeError_(
|
|
336
|
+
throw ff_core_Js.initializeError_(ff_compiler_Main.CommandLineError(("You must specify a Firefly file (.ff) as first argument to run." + ff_compiler_Main.usageString_)), new Error(), ff_compiler_Main.ff_core_Any_HasAnyTag$ff_compiler_Main_CommandLineError, ff_compiler_Main.ff_core_Show_Show$ff_compiler_Main_CommandLineError)
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
return
|
|
340
|
+
}
|
|
341
|
+
if(arguments_a.length >= 1 && arguments_a[0] === "develop") {
|
|
342
|
+
const runArguments_ = arguments_a.slice(1);
|
|
343
|
+
{
|
|
344
|
+
const _1 = runArguments_;
|
|
345
|
+
if(_1.length >= 1) {
|
|
346
|
+
const mainFile_ = _1[0];
|
|
347
|
+
const mainArguments_ = _1.slice(1);
|
|
348
|
+
const _guard1 = ff_core_String.String_removeLast(mainFile_, ".ff");
|
|
349
|
+
if(_guard1.Some) {
|
|
350
|
+
const mainName_ = _guard1.value_;
|
|
351
|
+
return ff_compiler_Main.DevelopCommand(mainFile_, mainArguments_)
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
{
|
|
355
|
+
throw ff_core_Js.initializeError_(ff_compiler_Main.CommandLineError(("You must specify a Firefly file (.ff) as first argument to develop." + ff_compiler_Main.usageString_)), new Error(), ff_compiler_Main.ff_core_Any_HasAnyTag$ff_compiler_Main_CommandLineError, ff_compiler_Main.ff_core_Show_Show$ff_compiler_Main_CommandLineError)
|
|
324
356
|
}
|
|
325
357
|
}
|
|
326
358
|
return
|
|
@@ -338,10 +370,10 @@ return ff_compiler_Main.BrowserCommand(mainFile_)
|
|
|
338
370
|
}
|
|
339
371
|
}
|
|
340
372
|
if(_1.length >= 2) {
|
|
341
|
-
throw ff_core_Js.initializeError_(
|
|
373
|
+
throw ff_core_Js.initializeError_(ff_compiler_Main.CommandLineError(("You must only specify a single argument to browser." + ff_compiler_Main.usageString_)), new Error(), ff_compiler_Main.ff_core_Any_HasAnyTag$ff_compiler_Main_CommandLineError, ff_compiler_Main.ff_core_Show_Show$ff_compiler_Main_CommandLineError)
|
|
342
374
|
}
|
|
343
375
|
{
|
|
344
|
-
throw ff_core_Js.initializeError_(
|
|
376
|
+
throw ff_core_Js.initializeError_(ff_compiler_Main.CommandLineError(("You must specify a Firefly file (.ff) as the argument to browser." + ff_compiler_Main.usageString_)), new Error(), ff_compiler_Main.ff_core_Any_HasAnyTag$ff_compiler_Main_CommandLineError, ff_compiler_Main.ff_core_Show_Show$ff_compiler_Main_CommandLineError)
|
|
345
377
|
}
|
|
346
378
|
}
|
|
347
379
|
return
|
|
@@ -359,10 +391,10 @@ return ff_compiler_Main.BuildCommand(mainFile_)
|
|
|
359
391
|
}
|
|
360
392
|
}
|
|
361
393
|
if(_1.length >= 2) {
|
|
362
|
-
throw ff_core_Js.initializeError_(
|
|
394
|
+
throw ff_core_Js.initializeError_(ff_compiler_Main.CommandLineError(("You must only specify a single argument to build." + ff_compiler_Main.usageString_)), new Error(), ff_compiler_Main.ff_core_Any_HasAnyTag$ff_compiler_Main_CommandLineError, ff_compiler_Main.ff_core_Show_Show$ff_compiler_Main_CommandLineError)
|
|
363
395
|
}
|
|
364
396
|
{
|
|
365
|
-
throw ff_core_Js.initializeError_(
|
|
397
|
+
throw ff_core_Js.initializeError_(ff_compiler_Main.CommandLineError(("You must specify a Firefly file (.ff) as the argument to build." + ff_compiler_Main.usageString_)), new Error(), ff_compiler_Main.ff_core_Any_HasAnyTag$ff_compiler_Main_CommandLineError, ff_compiler_Main.ff_core_Show_Show$ff_compiler_Main_CommandLineError)
|
|
366
398
|
}
|
|
367
399
|
}
|
|
368
400
|
return
|
|
@@ -376,10 +408,10 @@ const fileName_ = _1[0];
|
|
|
376
408
|
return ff_compiler_Main.CheckCommand(fileName_)
|
|
377
409
|
}
|
|
378
410
|
if(_1.length >= 2) {
|
|
379
|
-
throw ff_core_Js.initializeError_(
|
|
411
|
+
throw ff_core_Js.initializeError_(ff_compiler_Main.CommandLineError(("You must only specify a single argument to check." + ff_compiler_Main.usageString_)), new Error(), ff_compiler_Main.ff_core_Any_HasAnyTag$ff_compiler_Main_CommandLineError, ff_compiler_Main.ff_core_Show_Show$ff_compiler_Main_CommandLineError)
|
|
380
412
|
}
|
|
381
413
|
{
|
|
382
|
-
throw ff_core_Js.initializeError_(
|
|
414
|
+
throw ff_core_Js.initializeError_(ff_compiler_Main.CommandLineError(("You must specify a Firefly file (.ff) or directory as the argument to check." + ff_compiler_Main.usageString_)), new Error(), ff_compiler_Main.ff_core_Any_HasAnyTag$ff_compiler_Main_CommandLineError, ff_compiler_Main.ff_core_Show_Show$ff_compiler_Main_CommandLineError)
|
|
383
415
|
}
|
|
384
416
|
}
|
|
385
417
|
return
|
|
@@ -397,23 +429,23 @@ return ff_compiler_Main.SymbolsCommand(outName_, [fileName_, ...fileNames_])
|
|
|
397
429
|
}
|
|
398
430
|
}
|
|
399
431
|
{
|
|
400
|
-
throw ff_core_Js.initializeError_(
|
|
432
|
+
throw ff_core_Js.initializeError_(ff_compiler_Main.CommandLineError(("You must specify a output file (.tsv) and 1+ Firefly files (.ff) to symbols." + ff_compiler_Main.usageString_)), new Error(), ff_compiler_Main.ff_core_Any_HasAnyTag$ff_compiler_Main_CommandLineError, ff_compiler_Main.ff_core_Show_Show$ff_compiler_Main_CommandLineError)
|
|
401
433
|
}
|
|
402
434
|
}
|
|
403
435
|
return
|
|
404
436
|
}
|
|
405
437
|
if(arguments_a.length === 2 && arguments_a[0] === "bootstrap") {
|
|
406
|
-
throw ff_core_Js.initializeError_(
|
|
438
|
+
throw ff_core_Js.initializeError_(ff_compiler_Main.CommandLineError(("bootstrap takes no arguments" + ff_compiler_Main.usageString_)), new Error(), ff_compiler_Main.ff_core_Any_HasAnyTag$ff_compiler_Main_CommandLineError, ff_compiler_Main.ff_core_Show_Show$ff_compiler_Main_CommandLineError)
|
|
407
439
|
}
|
|
408
440
|
if(arguments_a.length === 1 && arguments_a[0] === "bootstrap") {
|
|
409
441
|
return ff_compiler_Main.BootstrapCommand()
|
|
410
442
|
}
|
|
411
443
|
if(arguments_a.length === 0) {
|
|
412
|
-
throw ff_core_Js.initializeError_(
|
|
444
|
+
throw ff_core_Js.initializeError_(ff_compiler_Main.CommandLineError(("You must specify a command or a main file to run." + ff_compiler_Main.usageString_)), new Error(), ff_compiler_Main.ff_core_Any_HasAnyTag$ff_compiler_Main_CommandLineError, ff_compiler_Main.ff_core_Show_Show$ff_compiler_Main_CommandLineError)
|
|
413
445
|
}
|
|
414
446
|
{
|
|
415
447
|
const s_ = arguments_a[0];
|
|
416
|
-
throw ff_core_Js.initializeError_(
|
|
448
|
+
throw ff_core_Js.initializeError_(ff_compiler_Main.CommandLineError(((("Unknown command '" + s_) + "'") + ff_compiler_Main.usageString_)), new Error(), ff_compiler_Main.ff_core_Any_HasAnyTag$ff_compiler_Main_CommandLineError, ff_compiler_Main.ff_core_Show_Show$ff_compiler_Main_CommandLineError)
|
|
417
449
|
}
|
|
418
450
|
}
|
|
419
451
|
|
|
@@ -432,25 +464,34 @@ ff_core_BuildSystem.internalBrowserCallEsBuild_(system_, [ff_core_Path.Path_abso
|
|
|
432
464
|
}
|
|
433
465
|
|
|
434
466
|
export function importAndRun_(system_, fireflyPath_, target_, moduleKey_, arguments_) {
|
|
435
|
-
const
|
|
436
|
-
const cwd_ = process_.cwd();
|
|
437
|
-
const workingDirectory_ = ((cwd_.indexOf(":") === 1)
|
|
438
|
-
? ("file:///" + cwd_)
|
|
439
|
-
: cwd_);
|
|
440
|
-
const packagePath_ = ff_compiler_Syntax.PackagePair_groupName(moduleKey_.packagePair_, "/");
|
|
441
|
-
const runFile_ = (((((((workingDirectory_ + "/.firefly/output/") + target_) + "/") + packagePath_) + "/") + ff_compiler_Syntax.ModuleKey_importName(moduleKey_)) + ".run.mjs");
|
|
467
|
+
const runFile_ = ff_compiler_Main.locateRunFile_(system_, target_, moduleKey_);
|
|
442
468
|
const runFilePath_ = (ff_core_String.String_contains(runFile_, "://")
|
|
443
469
|
? ff_core_NodeSystem.NodeSystem_pathFromUrl(system_, runFile_)
|
|
444
470
|
: ff_core_NodeSystem.NodeSystem_path(system_, runFile_));
|
|
445
471
|
if(ff_core_Path.Path_exists(runFilePath_, false, false, false)) {
|
|
446
472
|
const main_ = import(runFile_);
|
|
447
|
-
|
|
473
|
+
try {
|
|
474
|
+
main_["$run$"](fireflyPath_.absolutePath_, arguments_)
|
|
475
|
+
} catch(error_) {
|
|
476
|
+
console.error(ff_core_Error.Error_stack(error_));
|
|
477
|
+
process.exit(1)
|
|
478
|
+
};
|
|
448
479
|
return true
|
|
449
480
|
} else {
|
|
450
481
|
return false
|
|
451
482
|
}
|
|
452
483
|
}
|
|
453
484
|
|
|
485
|
+
export function locateRunFile_(system_, target_, moduleKey_) {
|
|
486
|
+
const process_ = import("process");
|
|
487
|
+
const cwd_ = process_.cwd();
|
|
488
|
+
const workingDirectory_ = ((cwd_.indexOf(":") === 1)
|
|
489
|
+
? ("file:///" + cwd_)
|
|
490
|
+
: cwd_);
|
|
491
|
+
const packagePath_ = ff_compiler_Syntax.PackagePair_groupName(moduleKey_.packagePair_, "/");
|
|
492
|
+
return (((((((workingDirectory_ + "/.firefly/output/") + target_) + "/") + packagePath_) + "/") + ff_compiler_Syntax.ModuleKey_importName(moduleKey_)) + ".run.mjs")
|
|
493
|
+
}
|
|
494
|
+
|
|
454
495
|
export function prepareFireflyDirectory_(path_) {
|
|
455
496
|
if((!ff_core_Path.Path_exists(ff_core_Path.Path_slash(ff_core_Path.Path_slash(path_, ".firefly"), "output"), false, false, false))) {
|
|
456
497
|
if((!ff_core_Path.Path_exists(ff_core_Path.Path_slash(path_, ".firefly"), false, false, false))) {
|
|
@@ -555,35 +596,6 @@ return [header_, ...ff_core_List.List_sort(r_.symbols_, ff_core_Ordering.ff_core
|
|
|
555
596
|
|
|
556
597
|
export async function main_$(system_, $task) {
|
|
557
598
|
const fireflyPath_ = (await ff_compiler_Main.detectFireflyPath_$(system_, $task));
|
|
558
|
-
async function buildScript_$(mainPath_, mainPackagePair_, emitTarget_, resolvedDependencies_, $task) {
|
|
559
|
-
const fixedPackagePaths_ = (ff_core_Map.Map_contains(resolvedDependencies_.packagePaths_, ff_compiler_Syntax.PackagePair("ff", "core"), ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_PackagePair)
|
|
560
|
-
? resolvedDependencies_.packagePaths_
|
|
561
|
-
: ff_core_Map.Map_add(resolvedDependencies_.packagePaths_, ff_compiler_Syntax.PackagePair("ff", "core"), (await ff_core_Path.Path_slash$(fireflyPath_, "core", $task)), ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_PackagePair));
|
|
562
|
-
const compilerModulePath_ = ((ff_core_Equal.notEquals_(emitTarget_, ff_compiler_JsEmitter.EmitBrowser(), ff_compiler_JsEmitter.ff_core_Equal_Equal$ff_compiler_JsEmitter_EmitTarget) && ff_core_Equal.notEquals_(emitTarget_, ff_compiler_JsEmitter.EmitExecutable(), ff_compiler_JsEmitter.ff_core_Equal_Equal$ff_compiler_JsEmitter_EmitTarget))
|
|
563
|
-
? ff_core_Option.Some((await ff_core_Path.Path_slash$((await ff_core_Path.Path_slash$((await ff_core_Path.Path_slash$((await ff_core_Path.Path_slash$(fireflyPath_, "output", $task)), "js", $task)), "ff", $task)), "compiler/Builder.mjs", $task)))
|
|
564
|
-
: ff_core_Option.None());
|
|
565
|
-
const targetName_ = (((_1) => {
|
|
566
|
-
if(_1.EmitBuild) {
|
|
567
|
-
return "build"
|
|
568
|
-
}
|
|
569
|
-
if(_1.EmitNode) {
|
|
570
|
-
return "node"
|
|
571
|
-
}
|
|
572
|
-
if(_1.EmitBrowser) {
|
|
573
|
-
return "browser"
|
|
574
|
-
}
|
|
575
|
-
{
|
|
576
|
-
return "executable"
|
|
577
|
-
}
|
|
578
|
-
}))(emitTarget_);
|
|
579
|
-
const folders_ = (await ff_core_Path.Path_relativeListTo$(ff_core_Option.Option_grab((await ff_core_Path.Path_parent$(mainPath_, $task))), ff_core_Map.Map_grab(fixedPackagePaths_, mainPackagePair_, ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_PackagePair), $task));
|
|
580
|
-
const name_ = ff_core_Option.Option_grab(ff_core_String.String_removeLast((await ff_core_Path.Path_base$(mainPath_, $task)), ".ff"));
|
|
581
|
-
const moduleKey_ = ff_compiler_Syntax.ModuleKey(mainPackagePair_, folders_, name_);
|
|
582
|
-
(await ff_compiler_Builder.build_$(system_, emitTarget_, [moduleKey_], (((_c) => {
|
|
583
|
-
return ff_compiler_Dependencies.ResolvedDependencies(_c.mainPackagePair_, _c.packages_, fixedPackagePaths_, _c.singleFilePackages_)
|
|
584
|
-
}))(resolvedDependencies_), compilerModulePath_, (await ff_core_Path.Path_slash$((await ff_core_NodeSystem.NodeSystem_path$(system_, ".firefly", $task)), "temporary", $task)), (await ff_core_Path.Path_path$((await ff_core_Path.Path_path$((await ff_core_NodeSystem.NodeSystem_path$(system_, ".firefly", $task)), "output", $task)), targetName_, $task)), false, ff_compiler_ModuleCache.new_(0), $task));
|
|
585
|
-
return moduleKey_
|
|
586
|
-
}
|
|
587
599
|
async function runCommand_$(command_, $task) {
|
|
588
600
|
const command_a = command_;
|
|
589
601
|
if(command_a.RunCommand) {
|
|
@@ -592,11 +604,17 @@ const arguments_ = command_a.argument_;
|
|
|
592
604
|
const resolvedDependencies_ = (await ff_compiler_Dependencies.process_$((await ff_core_NodeSystem.NodeSystem_httpClient$(system_, $task)), (await ff_compiler_DependencyLock.new_$((await ff_core_NodeSystem.NodeSystem_mainTask$(system_, $task)), $task)), (await ff_core_NodeSystem.NodeSystem_path$(system_, mainFile_, $task)), $task));
|
|
593
605
|
(await ff_compiler_Main.prepareFireflyDirectory_$((await ff_core_NodeSystem.NodeSystem_path$(system_, ".", $task)), $task));
|
|
594
606
|
const mainPath_ = (await ff_core_NodeSystem.NodeSystem_path$(system_, mainFile_, $task));
|
|
595
|
-
const moduleKey_ = (await buildScript_$(mainPath_, resolvedDependencies_.mainPackagePair_, ff_compiler_JsEmitter.EmitNode(), resolvedDependencies_, $task));
|
|
607
|
+
const moduleKey_ = (await ff_compiler_Main.buildScript_$(system_, mainPath_, resolvedDependencies_.mainPackagePair_, ff_compiler_JsEmitter.EmitNode(), resolvedDependencies_, ff_compiler_ModuleCache.new_(0), false, $task));
|
|
596
608
|
if((!(await ff_compiler_Main.importAndRun_$(system_, fireflyPath_, "node", moduleKey_, arguments_, $task)))) {
|
|
597
609
|
const at_ = ff_compiler_Syntax.Location((await ff_core_Path.Path_absolute$((await ff_core_NodeSystem.NodeSystem_path$(system_, mainFile_, $task)), $task)), 1, 1);
|
|
598
|
-
throw ff_core_Js.initializeError_(
|
|
610
|
+
throw ff_core_Js.initializeError_(ff_compiler_Syntax.CompileError(at_, "This module does not contain a 'nodeMain' function"), new Error(), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileError, ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_CompileError)
|
|
611
|
+
}
|
|
612
|
+
return
|
|
599
613
|
}
|
|
614
|
+
if(command_a.DevelopCommand) {
|
|
615
|
+
const mainFile_ = command_a.mainPath_;
|
|
616
|
+
const arguments_ = command_a.argument_;
|
|
617
|
+
(await ff_compiler_DevelopMode.run_$(system_, fireflyPath_, mainFile_, arguments_, $task))
|
|
600
618
|
return
|
|
601
619
|
}
|
|
602
620
|
if(command_a.BrowserCommand) {
|
|
@@ -604,7 +622,7 @@ const mainFile_ = command_a.mainPath_;
|
|
|
604
622
|
const resolvedDependencies_ = (await ff_compiler_Dependencies.process_$((await ff_core_NodeSystem.NodeSystem_httpClient$(system_, $task)), (await ff_compiler_DependencyLock.new_$((await ff_core_NodeSystem.NodeSystem_mainTask$(system_, $task)), $task)), (await ff_core_NodeSystem.NodeSystem_path$(system_, mainFile_, $task)), $task));
|
|
605
623
|
(await ff_compiler_Main.prepareFireflyDirectory_$((await ff_core_NodeSystem.NodeSystem_path$(system_, ".", $task)), $task));
|
|
606
624
|
const mainPath_ = (await ff_core_NodeSystem.NodeSystem_path$(system_, mainFile_, $task));
|
|
607
|
-
const moduleKey_ = (await buildScript_$(mainPath_, resolvedDependencies_.mainPackagePair_, ff_compiler_JsEmitter.EmitBrowser(), resolvedDependencies_, $task));
|
|
625
|
+
const moduleKey_ = (await ff_compiler_Main.buildScript_$(system_, mainPath_, resolvedDependencies_.mainPackagePair_, ff_compiler_JsEmitter.EmitBrowser(), resolvedDependencies_, ff_compiler_ModuleCache.new_(0), false, $task));
|
|
608
626
|
(await ff_compiler_Main.bundleForBrowser_$(system_, resolvedDependencies_.mainPackagePair_, moduleKey_, $task))
|
|
609
627
|
return
|
|
610
628
|
}
|
|
@@ -613,8 +631,8 @@ const mainFile_ = command_a.mainPath_;
|
|
|
613
631
|
const resolvedDependencies_ = (await ff_compiler_Dependencies.process_$((await ff_core_NodeSystem.NodeSystem_httpClient$(system_, $task)), (await ff_compiler_DependencyLock.new_$((await ff_core_NodeSystem.NodeSystem_mainTask$(system_, $task)), $task)), (await ff_core_NodeSystem.NodeSystem_path$(system_, (mainFile_ + ".ff"), $task)), $task));
|
|
614
632
|
(await ff_compiler_Main.prepareFireflyDirectory_$((await ff_core_NodeSystem.NodeSystem_path$(system_, ".", $task)), $task));
|
|
615
633
|
const mainPath_ = (await ff_core_NodeSystem.NodeSystem_path$(system_, mainFile_, $task));
|
|
616
|
-
const moduleKey_ = (await buildScript_$(mainPath_, resolvedDependencies_.mainPackagePair_, ff_compiler_JsEmitter.EmitBuild(), resolvedDependencies_, $task));
|
|
617
|
-
(await buildScript_$(mainPath_, resolvedDependencies_.mainPackagePair_, ff_compiler_JsEmitter.EmitExecutable(), resolvedDependencies_, $task));
|
|
634
|
+
const moduleKey_ = (await ff_compiler_Main.buildScript_$(system_, mainPath_, resolvedDependencies_.mainPackagePair_, ff_compiler_JsEmitter.EmitBuild(), resolvedDependencies_, ff_compiler_ModuleCache.new_(0), false, $task));
|
|
635
|
+
(await ff_compiler_Main.buildScript_$(system_, mainPath_, resolvedDependencies_.mainPackagePair_, ff_compiler_JsEmitter.EmitExecutable(), resolvedDependencies_, ff_compiler_ModuleCache.new_(0), false, $task));
|
|
618
636
|
(await ff_compiler_Main.bundleForPkg_$(system_, resolvedDependencies_.mainPackagePair_, (await ff_core_Path.Path_base$(mainPath_, $task)), $task));
|
|
619
637
|
(await ff_compiler_Main.importAndRun_$(system_, fireflyPath_, "build", moduleKey_, [], $task))
|
|
620
638
|
return
|
|
@@ -623,14 +641,14 @@ if(command_a.CheckCommand) {
|
|
|
623
641
|
const filePath_ = command_a.filePath_;
|
|
624
642
|
const errors_ = (await ff_compiler_Builder.check_$(system_, fireflyPath_, (await ff_core_NodeSystem.NodeSystem_path$(system_, filePath_, $task)), ff_core_Option.None(), ff_core_Set.new_(), ff_core_Map.new_(), ff_compiler_ModuleCache.new_(1), (await ff_compiler_DependencyLock.new_$((await ff_core_NodeSystem.NodeSystem_mainTask$(system_, $task)), $task)), 0, ff_compiler_LspHook.disabled_(), true, $task));
|
|
625
643
|
if((!ff_core_List.List_isEmpty(errors_))) {
|
|
626
|
-
throw ff_core_Js.initializeError_(
|
|
644
|
+
throw ff_core_Js.initializeError_(ff_compiler_Syntax.CompileErrors(ff_core_List.List_distinct(errors_, ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_CompileError)), new Error(), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileErrors, ff_compiler_Syntax.ff_core_Show_Show$ff_compiler_Syntax_CompileErrors)
|
|
627
645
|
}
|
|
628
646
|
return
|
|
629
647
|
}
|
|
630
648
|
if(command_a.BootstrapCommand) {
|
|
631
649
|
const workingDirectory_ = (await ff_core_NodeSystem.NodeSystem_path$(system_, ".", $task));
|
|
632
650
|
const fakeLocation_ = ff_compiler_Syntax.Location("<core>", 0, 0);
|
|
633
|
-
(await ff_compiler_Builder.build_$(system_, ff_compiler_JsEmitter.EmitNode(), [ff_compiler_Syntax.ModuleKey(ff_compiler_Syntax.PackagePair("ff", "compiler"), [], "Main")], ff_compiler_Dependencies.ResolvedDependencies(ff_compiler_Syntax.PackagePair("ff", "compiler"), ff_core_List.List_toMap([ff_core_Pair.Pair(ff_compiler_Syntax.PackagePair("ff", "core"), ff_compiler_Syntax.PackageInfo(ff_compiler_Syntax.DPackage(fakeLocation_, ff_compiler_Syntax.PackagePair("ff", "core"), ff_compiler_Syntax.Version(fakeLocation_, 0, 0, 0), ff_compiler_Syntax.TargetNames(true, false)), [], [ff_compiler_Syntax.DInclude(fakeLocation_, "node_modules")]))], ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_PackagePair), ff_core_List.List_toMap([ff_core_Pair.Pair(ff_compiler_Syntax.PackagePair("ff", "compiler"), (await ff_core_Path.Path_slash$(workingDirectory_, "compiler", $task))), ff_core_Pair.Pair(ff_compiler_Syntax.PackagePair("ff", "core"), (await ff_core_Path.Path_slash$(workingDirectory_, "core", $task)))], ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_PackagePair), ff_core_List.List_toSet([], ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_PackagePair)), ff_core_Option.None(), (await ff_core_Path.Path_slash$((await ff_core_Path.Path_slash$(workingDirectory_, "output", $task)), "
|
|
651
|
+
(await ff_compiler_Builder.build_$(system_, ff_compiler_JsEmitter.EmitNode(), [ff_compiler_Syntax.ModuleKey(ff_compiler_Syntax.PackagePair("ff", "compiler"), [], "Main")], ff_compiler_Dependencies.ResolvedDependencies(ff_compiler_Syntax.PackagePair("ff", "compiler"), ff_core_List.List_toMap([ff_core_Pair.Pair(ff_compiler_Syntax.PackagePair("ff", "core"), ff_compiler_Syntax.PackageInfo(ff_compiler_Syntax.DPackage(fakeLocation_, ff_compiler_Syntax.PackagePair("ff", "core"), ff_compiler_Syntax.Version(fakeLocation_, 0, 0, 0), ff_compiler_Syntax.TargetNames(true, false)), [], [ff_compiler_Syntax.DInclude(fakeLocation_, "node_modules")]))], ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_PackagePair), ff_core_List.List_toMap([ff_core_Pair.Pair(ff_compiler_Syntax.PackagePair("ff", "compiler"), (await ff_core_Path.Path_slash$(workingDirectory_, "compiler", $task))), ff_core_Pair.Pair(ff_compiler_Syntax.PackagePair("ff", "core"), (await ff_core_Path.Path_slash$(workingDirectory_, "core", $task)))], ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_PackagePair), ff_core_List.List_toSet([], ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_PackagePair)), ff_core_Option.None(), (await ff_core_Path.Path_slash$((await ff_core_Path.Path_slash$(workingDirectory_, "output", $task)), "js", $task)), true, ff_compiler_ModuleCache.new_(0), $task))
|
|
634
652
|
return
|
|
635
653
|
}
|
|
636
654
|
{
|
|
@@ -699,6 +717,37 @@ return
|
|
|
699
717
|
}), ff_compiler_Syntax.ff_core_Any_HasAnyTag$ff_compiler_Syntax_CompileErrors)
|
|
700
718
|
}
|
|
701
719
|
|
|
720
|
+
export async function buildScript_$(system_, mainPath_, mainPackagePair_, emitTarget_, resolvedDependencies_, moduleCache_ = ff_compiler_ModuleCache.new_(0), printMeasurements_ = false, $task) {
|
|
721
|
+
const fireflyPath_ = (await ff_compiler_Main.detectFireflyPath_$(system_, $task));
|
|
722
|
+
const fixedPackagePaths_ = (ff_core_Map.Map_contains(resolvedDependencies_.packagePaths_, ff_compiler_Syntax.PackagePair("ff", "core"), ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_PackagePair)
|
|
723
|
+
? resolvedDependencies_.packagePaths_
|
|
724
|
+
: ff_core_Map.Map_add(resolvedDependencies_.packagePaths_, ff_compiler_Syntax.PackagePair("ff", "core"), (await ff_core_Path.Path_slash$(fireflyPath_, "core", $task)), ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_PackagePair));
|
|
725
|
+
const compilerModulePath_ = ((ff_core_Equal.notEquals_(emitTarget_, ff_compiler_JsEmitter.EmitBrowser(), ff_compiler_JsEmitter.ff_core_Equal_Equal$ff_compiler_JsEmitter_EmitTarget) && ff_core_Equal.notEquals_(emitTarget_, ff_compiler_JsEmitter.EmitExecutable(), ff_compiler_JsEmitter.ff_core_Equal_Equal$ff_compiler_JsEmitter_EmitTarget))
|
|
726
|
+
? ff_core_Option.Some((await ff_core_Path.Path_slash$((await ff_core_Path.Path_slash$((await ff_core_Path.Path_slash$((await ff_core_Path.Path_slash$(fireflyPath_, "output", $task)), "js", $task)), "ff", $task)), "compiler/Builder.mjs", $task)))
|
|
727
|
+
: ff_core_Option.None());
|
|
728
|
+
const targetName_ = (((_1) => {
|
|
729
|
+
if(_1.EmitBuild) {
|
|
730
|
+
return "build"
|
|
731
|
+
}
|
|
732
|
+
if(_1.EmitNode) {
|
|
733
|
+
return "node"
|
|
734
|
+
}
|
|
735
|
+
if(_1.EmitBrowser) {
|
|
736
|
+
return "browser"
|
|
737
|
+
}
|
|
738
|
+
{
|
|
739
|
+
return "executable"
|
|
740
|
+
}
|
|
741
|
+
}))(emitTarget_);
|
|
742
|
+
const folders_ = (await ff_core_Path.Path_relativeListTo$(ff_core_Option.Option_grab((await ff_core_Path.Path_parent$(mainPath_, $task))), ff_core_Map.Map_grab(fixedPackagePaths_, mainPackagePair_, ff_compiler_Syntax.ff_core_Ordering_Order$ff_compiler_Syntax_PackagePair), $task));
|
|
743
|
+
const name_ = ff_core_Option.Option_grab(ff_core_String.String_removeLast((await ff_core_Path.Path_base$(mainPath_, $task)), ".ff"));
|
|
744
|
+
const moduleKey_ = ff_compiler_Syntax.ModuleKey(mainPackagePair_, folders_, name_);
|
|
745
|
+
(await ff_compiler_Builder.build_$(system_, emitTarget_, [moduleKey_], (((_c) => {
|
|
746
|
+
return ff_compiler_Dependencies.ResolvedDependencies(_c.mainPackagePair_, _c.packages_, fixedPackagePaths_, _c.singleFilePackages_)
|
|
747
|
+
}))(resolvedDependencies_), compilerModulePath_, (await ff_core_Path.Path_path$((await ff_core_Path.Path_path$((await ff_core_NodeSystem.NodeSystem_path$(system_, ".firefly", $task)), "output", $task)), targetName_, $task)), printMeasurements_, moduleCache_, $task));
|
|
748
|
+
return moduleKey_
|
|
749
|
+
}
|
|
750
|
+
|
|
702
751
|
export async function parseCommandLine_$(arguments_, $task) {
|
|
703
752
|
const arguments_a = arguments_;
|
|
704
753
|
if(arguments_a.length >= 1) {
|
|
@@ -724,7 +773,26 @@ return ff_compiler_Main.RunCommand(mainFile_, mainArguments_)
|
|
|
724
773
|
}
|
|
725
774
|
}
|
|
726
775
|
{
|
|
727
|
-
throw ff_core_Js.initializeError_(
|
|
776
|
+
throw ff_core_Js.initializeError_(ff_compiler_Main.CommandLineError(("You must specify a Firefly file (.ff) as first argument to run." + ff_compiler_Main.usageString_)), new Error(), ff_compiler_Main.ff_core_Any_HasAnyTag$ff_compiler_Main_CommandLineError, ff_compiler_Main.ff_core_Show_Show$ff_compiler_Main_CommandLineError)
|
|
777
|
+
}
|
|
778
|
+
}
|
|
779
|
+
return
|
|
780
|
+
}
|
|
781
|
+
if(arguments_a.length >= 1 && arguments_a[0] === "develop") {
|
|
782
|
+
const runArguments_ = arguments_a.slice(1);
|
|
783
|
+
{
|
|
784
|
+
const _1 = runArguments_;
|
|
785
|
+
if(_1.length >= 1) {
|
|
786
|
+
const mainFile_ = _1[0];
|
|
787
|
+
const mainArguments_ = _1.slice(1);
|
|
788
|
+
const _guard1 = ff_core_String.String_removeLast(mainFile_, ".ff");
|
|
789
|
+
if(_guard1.Some) {
|
|
790
|
+
const mainName_ = _guard1.value_;
|
|
791
|
+
return ff_compiler_Main.DevelopCommand(mainFile_, mainArguments_)
|
|
792
|
+
}
|
|
793
|
+
}
|
|
794
|
+
{
|
|
795
|
+
throw ff_core_Js.initializeError_(ff_compiler_Main.CommandLineError(("You must specify a Firefly file (.ff) as first argument to develop." + ff_compiler_Main.usageString_)), new Error(), ff_compiler_Main.ff_core_Any_HasAnyTag$ff_compiler_Main_CommandLineError, ff_compiler_Main.ff_core_Show_Show$ff_compiler_Main_CommandLineError)
|
|
728
796
|
}
|
|
729
797
|
}
|
|
730
798
|
return
|
|
@@ -742,10 +810,10 @@ return ff_compiler_Main.BrowserCommand(mainFile_)
|
|
|
742
810
|
}
|
|
743
811
|
}
|
|
744
812
|
if(_1.length >= 2) {
|
|
745
|
-
throw ff_core_Js.initializeError_(
|
|
813
|
+
throw ff_core_Js.initializeError_(ff_compiler_Main.CommandLineError(("You must only specify a single argument to browser." + ff_compiler_Main.usageString_)), new Error(), ff_compiler_Main.ff_core_Any_HasAnyTag$ff_compiler_Main_CommandLineError, ff_compiler_Main.ff_core_Show_Show$ff_compiler_Main_CommandLineError)
|
|
746
814
|
}
|
|
747
815
|
{
|
|
748
|
-
throw ff_core_Js.initializeError_(
|
|
816
|
+
throw ff_core_Js.initializeError_(ff_compiler_Main.CommandLineError(("You must specify a Firefly file (.ff) as the argument to browser." + ff_compiler_Main.usageString_)), new Error(), ff_compiler_Main.ff_core_Any_HasAnyTag$ff_compiler_Main_CommandLineError, ff_compiler_Main.ff_core_Show_Show$ff_compiler_Main_CommandLineError)
|
|
749
817
|
}
|
|
750
818
|
}
|
|
751
819
|
return
|
|
@@ -763,10 +831,10 @@ return ff_compiler_Main.BuildCommand(mainFile_)
|
|
|
763
831
|
}
|
|
764
832
|
}
|
|
765
833
|
if(_1.length >= 2) {
|
|
766
|
-
throw ff_core_Js.initializeError_(
|
|
834
|
+
throw ff_core_Js.initializeError_(ff_compiler_Main.CommandLineError(("You must only specify a single argument to build." + ff_compiler_Main.usageString_)), new Error(), ff_compiler_Main.ff_core_Any_HasAnyTag$ff_compiler_Main_CommandLineError, ff_compiler_Main.ff_core_Show_Show$ff_compiler_Main_CommandLineError)
|
|
767
835
|
}
|
|
768
836
|
{
|
|
769
|
-
throw ff_core_Js.initializeError_(
|
|
837
|
+
throw ff_core_Js.initializeError_(ff_compiler_Main.CommandLineError(("You must specify a Firefly file (.ff) as the argument to build." + ff_compiler_Main.usageString_)), new Error(), ff_compiler_Main.ff_core_Any_HasAnyTag$ff_compiler_Main_CommandLineError, ff_compiler_Main.ff_core_Show_Show$ff_compiler_Main_CommandLineError)
|
|
770
838
|
}
|
|
771
839
|
}
|
|
772
840
|
return
|
|
@@ -780,10 +848,10 @@ const fileName_ = _1[0];
|
|
|
780
848
|
return ff_compiler_Main.CheckCommand(fileName_)
|
|
781
849
|
}
|
|
782
850
|
if(_1.length >= 2) {
|
|
783
|
-
throw ff_core_Js.initializeError_(
|
|
851
|
+
throw ff_core_Js.initializeError_(ff_compiler_Main.CommandLineError(("You must only specify a single argument to check." + ff_compiler_Main.usageString_)), new Error(), ff_compiler_Main.ff_core_Any_HasAnyTag$ff_compiler_Main_CommandLineError, ff_compiler_Main.ff_core_Show_Show$ff_compiler_Main_CommandLineError)
|
|
784
852
|
}
|
|
785
853
|
{
|
|
786
|
-
throw ff_core_Js.initializeError_(
|
|
854
|
+
throw ff_core_Js.initializeError_(ff_compiler_Main.CommandLineError(("You must specify a Firefly file (.ff) or directory as the argument to check." + ff_compiler_Main.usageString_)), new Error(), ff_compiler_Main.ff_core_Any_HasAnyTag$ff_compiler_Main_CommandLineError, ff_compiler_Main.ff_core_Show_Show$ff_compiler_Main_CommandLineError)
|
|
787
855
|
}
|
|
788
856
|
}
|
|
789
857
|
return
|
|
@@ -801,23 +869,23 @@ return ff_compiler_Main.SymbolsCommand(outName_, [fileName_, ...fileNames_])
|
|
|
801
869
|
}
|
|
802
870
|
}
|
|
803
871
|
{
|
|
804
|
-
throw ff_core_Js.initializeError_(
|
|
872
|
+
throw ff_core_Js.initializeError_(ff_compiler_Main.CommandLineError(("You must specify a output file (.tsv) and 1+ Firefly files (.ff) to symbols." + ff_compiler_Main.usageString_)), new Error(), ff_compiler_Main.ff_core_Any_HasAnyTag$ff_compiler_Main_CommandLineError, ff_compiler_Main.ff_core_Show_Show$ff_compiler_Main_CommandLineError)
|
|
805
873
|
}
|
|
806
874
|
}
|
|
807
875
|
return
|
|
808
876
|
}
|
|
809
877
|
if(arguments_a.length === 2 && arguments_a[0] === "bootstrap") {
|
|
810
|
-
throw ff_core_Js.initializeError_(
|
|
878
|
+
throw ff_core_Js.initializeError_(ff_compiler_Main.CommandLineError(("bootstrap takes no arguments" + ff_compiler_Main.usageString_)), new Error(), ff_compiler_Main.ff_core_Any_HasAnyTag$ff_compiler_Main_CommandLineError, ff_compiler_Main.ff_core_Show_Show$ff_compiler_Main_CommandLineError)
|
|
811
879
|
}
|
|
812
880
|
if(arguments_a.length === 1 && arguments_a[0] === "bootstrap") {
|
|
813
881
|
return ff_compiler_Main.BootstrapCommand()
|
|
814
882
|
}
|
|
815
883
|
if(arguments_a.length === 0) {
|
|
816
|
-
throw ff_core_Js.initializeError_(
|
|
884
|
+
throw ff_core_Js.initializeError_(ff_compiler_Main.CommandLineError(("You must specify a command or a main file to run." + ff_compiler_Main.usageString_)), new Error(), ff_compiler_Main.ff_core_Any_HasAnyTag$ff_compiler_Main_CommandLineError, ff_compiler_Main.ff_core_Show_Show$ff_compiler_Main_CommandLineError)
|
|
817
885
|
}
|
|
818
886
|
{
|
|
819
887
|
const s_ = arguments_a[0];
|
|
820
|
-
throw ff_core_Js.initializeError_(
|
|
888
|
+
throw ff_core_Js.initializeError_(ff_compiler_Main.CommandLineError(((("Unknown command '" + s_) + "'") + ff_compiler_Main.usageString_)), new Error(), ff_compiler_Main.ff_core_Any_HasAnyTag$ff_compiler_Main_CommandLineError, ff_compiler_Main.ff_core_Show_Show$ff_compiler_Main_CommandLineError)
|
|
821
889
|
}
|
|
822
890
|
}
|
|
823
891
|
|
|
@@ -836,25 +904,34 @@ ff_core_BuildSystem.internalBrowserCallEsBuild_(system_, [(await ff_core_Path.Pa
|
|
|
836
904
|
}
|
|
837
905
|
|
|
838
906
|
export async function importAndRun_$(system_, fireflyPath_, target_, moduleKey_, arguments_, $task) {
|
|
839
|
-
const
|
|
840
|
-
const cwd_ = process_.cwd();
|
|
841
|
-
const workingDirectory_ = ((cwd_.indexOf(":") === 1)
|
|
842
|
-
? ("file:///" + cwd_)
|
|
843
|
-
: cwd_);
|
|
844
|
-
const packagePath_ = ff_compiler_Syntax.PackagePair_groupName(moduleKey_.packagePair_, "/");
|
|
845
|
-
const runFile_ = (((((((workingDirectory_ + "/.firefly/output/") + target_) + "/") + packagePath_) + "/") + ff_compiler_Syntax.ModuleKey_importName(moduleKey_)) + ".run.mjs");
|
|
907
|
+
const runFile_ = (await ff_compiler_Main.locateRunFile_$(system_, target_, moduleKey_, $task));
|
|
846
908
|
const runFilePath_ = (ff_core_String.String_contains(runFile_, "://")
|
|
847
909
|
? (await ff_core_NodeSystem.NodeSystem_pathFromUrl$(system_, runFile_, $task))
|
|
848
910
|
: (await ff_core_NodeSystem.NodeSystem_path$(system_, runFile_, $task)));
|
|
849
911
|
if((await ff_core_Path.Path_exists$(runFilePath_, false, false, false, $task))) {
|
|
850
912
|
const main_ = (await import(runFile_));
|
|
851
|
-
|
|
913
|
+
try {
|
|
914
|
+
(await main_["$run$"](fireflyPath_.absolutePath_, arguments_))
|
|
915
|
+
} catch(error_) {
|
|
916
|
+
console.error(ff_core_Error.Error_stack(error_));
|
|
917
|
+
process.exit(1)
|
|
918
|
+
};
|
|
852
919
|
return true
|
|
853
920
|
} else {
|
|
854
921
|
return false
|
|
855
922
|
}
|
|
856
923
|
}
|
|
857
924
|
|
|
925
|
+
export async function locateRunFile_$(system_, target_, moduleKey_, $task) {
|
|
926
|
+
const process_ = (await import("process"));
|
|
927
|
+
const cwd_ = process_.cwd();
|
|
928
|
+
const workingDirectory_ = ((cwd_.indexOf(":") === 1)
|
|
929
|
+
? ("file:///" + cwd_)
|
|
930
|
+
: cwd_);
|
|
931
|
+
const packagePath_ = ff_compiler_Syntax.PackagePair_groupName(moduleKey_.packagePair_, "/");
|
|
932
|
+
return (((((((workingDirectory_ + "/.firefly/output/") + target_) + "/") + packagePath_) + "/") + ff_compiler_Syntax.ModuleKey_importName(moduleKey_)) + ".run.mjs")
|
|
933
|
+
}
|
|
934
|
+
|
|
858
935
|
export async function prepareFireflyDirectory_$(path_, $task) {
|
|
859
936
|
if((!(await ff_core_Path.Path_exists$((await ff_core_Path.Path_slash$((await ff_core_Path.Path_slash$(path_, ".firefly", $task)), "output", $task)), false, false, false, $task)))) {
|
|
860
937
|
if((!(await ff_core_Path.Path_exists$((await ff_core_Path.Path_slash$(path_, ".firefly", $task)), false, false, false, $task)))) {
|
|
@@ -986,6 +1063,10 @@ if(value_a.RunCommand) {
|
|
|
986
1063
|
const z_ = value_a;
|
|
987
1064
|
return ((((("RunCommand" + "(") + ff_core_Show.ff_core_Show_Show$ff_core_String_String.show_(z_.mainPath_)) + ", ") + ff_core_Show.ff_core_Show_Show$ff_core_List_List(ff_core_Show.ff_core_Show_Show$ff_core_String_String).show_(z_.argument_)) + ")")
|
|
988
1065
|
}
|
|
1066
|
+
if(value_a.DevelopCommand) {
|
|
1067
|
+
const z_ = value_a;
|
|
1068
|
+
return ((((("DevelopCommand" + "(") + ff_core_Show.ff_core_Show_Show$ff_core_String_String.show_(z_.mainPath_)) + ", ") + ff_core_Show.ff_core_Show_Show$ff_core_List_List(ff_core_Show.ff_core_Show_Show$ff_core_String_String).show_(z_.argument_)) + ")")
|
|
1069
|
+
}
|
|
989
1070
|
if(value_a.BrowserCommand) {
|
|
990
1071
|
const z_ = value_a;
|
|
991
1072
|
return ((("BrowserCommand" + "(") + ff_core_Show.ff_core_Show_Show$ff_core_String_String.show_(z_.mainPath_)) + ")")
|
|
@@ -1013,6 +1094,10 @@ if(value_a.RunCommand) {
|
|
|
1013
1094
|
const z_ = value_a;
|
|
1014
1095
|
return ((((("RunCommand" + "(") + ff_core_Show.ff_core_Show_Show$ff_core_String_String.show_(z_.mainPath_)) + ", ") + ff_core_Show.ff_core_Show_Show$ff_core_List_List(ff_core_Show.ff_core_Show_Show$ff_core_String_String).show_(z_.argument_)) + ")")
|
|
1015
1096
|
}
|
|
1097
|
+
if(value_a.DevelopCommand) {
|
|
1098
|
+
const z_ = value_a;
|
|
1099
|
+
return ((((("DevelopCommand" + "(") + ff_core_Show.ff_core_Show_Show$ff_core_String_String.show_(z_.mainPath_)) + ", ") + ff_core_Show.ff_core_Show_Show$ff_core_List_List(ff_core_Show.ff_core_Show_Show$ff_core_String_String).show_(z_.argument_)) + ")")
|
|
1100
|
+
}
|
|
1016
1101
|
if(value_a.BrowserCommand) {
|
|
1017
1102
|
const z_ = value_a;
|
|
1018
1103
|
return ((("BrowserCommand" + "(") + ff_core_Show.ff_core_Show_Show$ff_core_String_String.show_(z_.mainPath_)) + ")")
|
|
@@ -1061,6 +1146,11 @@ const x_ = x_a;
|
|
|
1061
1146
|
const y_ = y_a;
|
|
1062
1147
|
return ((x_.mainPath_ === y_.mainPath_) && ff_core_List.ff_core_Equal_Equal$ff_core_List_List(ff_core_Equal.ff_core_Equal_Equal$ff_core_String_String).equals_(x_.argument_, y_.argument_))
|
|
1063
1148
|
}
|
|
1149
|
+
if(x_a.DevelopCommand && y_a.DevelopCommand) {
|
|
1150
|
+
const x_ = x_a;
|
|
1151
|
+
const y_ = y_a;
|
|
1152
|
+
return ((x_.mainPath_ === y_.mainPath_) && ff_core_List.ff_core_Equal_Equal$ff_core_List_List(ff_core_Equal.ff_core_Equal_Equal$ff_core_String_String).equals_(x_.argument_, y_.argument_))
|
|
1153
|
+
}
|
|
1064
1154
|
if(x_a.BrowserCommand && y_a.BrowserCommand) {
|
|
1065
1155
|
const x_ = x_a;
|
|
1066
1156
|
const y_ = y_a;
|
|
@@ -1096,6 +1186,11 @@ const x_ = x_a;
|
|
|
1096
1186
|
const y_ = y_a;
|
|
1097
1187
|
return ((x_.mainPath_ === y_.mainPath_) && ff_core_List.ff_core_Equal_Equal$ff_core_List_List(ff_core_Equal.ff_core_Equal_Equal$ff_core_String_String).equals_(x_.argument_, y_.argument_))
|
|
1098
1188
|
}
|
|
1189
|
+
if(x_a.DevelopCommand && y_a.DevelopCommand) {
|
|
1190
|
+
const x_ = x_a;
|
|
1191
|
+
const y_ = y_a;
|
|
1192
|
+
return ((x_.mainPath_ === y_.mainPath_) && ff_core_List.ff_core_Equal_Equal$ff_core_List_List(ff_core_Equal.ff_core_Equal_Equal$ff_core_String_String).equals_(x_.argument_, y_.argument_))
|
|
1193
|
+
}
|
|
1099
1194
|
if(x_a.BrowserCommand && y_a.BrowserCommand) {
|
|
1100
1195
|
const x_ = x_a;
|
|
1101
1196
|
const y_ = y_a;
|
|
@@ -1168,6 +1263,22 @@ return ff_core_Ordering.OrderingSame()
|
|
|
1168
1263
|
}
|
|
1169
1264
|
return
|
|
1170
1265
|
}
|
|
1266
|
+
if(x_a.DevelopCommand && y_a.DevelopCommand) {
|
|
1267
|
+
const x_ = x_a;
|
|
1268
|
+
const y_ = y_a;
|
|
1269
|
+
const mainPathOrdering_ = ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String.compare_(x_.mainPath_, y_.mainPath_);
|
|
1270
|
+
if((mainPathOrdering_ !== ff_core_Ordering.OrderingSame())) {
|
|
1271
|
+
return mainPathOrdering_
|
|
1272
|
+
} else {
|
|
1273
|
+
const argumentOrdering_ = ff_core_Ordering.ff_core_Ordering_Order$ff_core_List_List(ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String).compare_(x_.argument_, y_.argument_);
|
|
1274
|
+
if((argumentOrdering_ !== ff_core_Ordering.OrderingSame())) {
|
|
1275
|
+
return argumentOrdering_
|
|
1276
|
+
} else {
|
|
1277
|
+
return ff_core_Ordering.OrderingSame()
|
|
1278
|
+
}
|
|
1279
|
+
}
|
|
1280
|
+
return
|
|
1281
|
+
}
|
|
1171
1282
|
if(x_a.BrowserCommand && y_a.BrowserCommand) {
|
|
1172
1283
|
const x_ = x_a;
|
|
1173
1284
|
const y_ = y_a;
|
|
@@ -1226,18 +1337,21 @@ return 0
|
|
|
1226
1337
|
if(z_a.RunCommand) {
|
|
1227
1338
|
return 1
|
|
1228
1339
|
}
|
|
1229
|
-
if(z_a.
|
|
1340
|
+
if(z_a.DevelopCommand) {
|
|
1230
1341
|
return 2
|
|
1231
1342
|
}
|
|
1232
|
-
if(z_a.
|
|
1343
|
+
if(z_a.BrowserCommand) {
|
|
1233
1344
|
return 3
|
|
1234
1345
|
}
|
|
1235
|
-
if(z_a.
|
|
1346
|
+
if(z_a.BuildCommand) {
|
|
1236
1347
|
return 4
|
|
1237
1348
|
}
|
|
1238
|
-
{
|
|
1349
|
+
if(z_a.CheckCommand) {
|
|
1239
1350
|
return 5
|
|
1240
1351
|
}
|
|
1352
|
+
{
|
|
1353
|
+
return 6
|
|
1354
|
+
}
|
|
1241
1355
|
}
|
|
1242
1356
|
return ff_core_Ordering.ff_core_Ordering_Order$ff_core_Int_Int.compare_(number_(x_), number_(y_))
|
|
1243
1357
|
}
|
|
@@ -1264,6 +1378,22 @@ return ff_core_Ordering.OrderingSame()
|
|
|
1264
1378
|
}
|
|
1265
1379
|
return
|
|
1266
1380
|
}
|
|
1381
|
+
if(x_a.DevelopCommand && y_a.DevelopCommand) {
|
|
1382
|
+
const x_ = x_a;
|
|
1383
|
+
const y_ = y_a;
|
|
1384
|
+
const mainPathOrdering_ = ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String.compare_(x_.mainPath_, y_.mainPath_);
|
|
1385
|
+
if((mainPathOrdering_ !== ff_core_Ordering.OrderingSame())) {
|
|
1386
|
+
return mainPathOrdering_
|
|
1387
|
+
} else {
|
|
1388
|
+
const argumentOrdering_ = ff_core_Ordering.ff_core_Ordering_Order$ff_core_List_List(ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String).compare_(x_.argument_, y_.argument_);
|
|
1389
|
+
if((argumentOrdering_ !== ff_core_Ordering.OrderingSame())) {
|
|
1390
|
+
return argumentOrdering_
|
|
1391
|
+
} else {
|
|
1392
|
+
return ff_core_Ordering.OrderingSame()
|
|
1393
|
+
}
|
|
1394
|
+
}
|
|
1395
|
+
return
|
|
1396
|
+
}
|
|
1267
1397
|
if(x_a.BrowserCommand && y_a.BrowserCommand) {
|
|
1268
1398
|
const x_ = x_a;
|
|
1269
1399
|
const y_ = y_a;
|
|
@@ -1322,18 +1452,21 @@ return 0
|
|
|
1322
1452
|
if(z_a.RunCommand) {
|
|
1323
1453
|
return 1
|
|
1324
1454
|
}
|
|
1325
|
-
if(z_a.
|
|
1455
|
+
if(z_a.DevelopCommand) {
|
|
1326
1456
|
return 2
|
|
1327
1457
|
}
|
|
1328
|
-
if(z_a.
|
|
1458
|
+
if(z_a.BrowserCommand) {
|
|
1329
1459
|
return 3
|
|
1330
1460
|
}
|
|
1331
|
-
if(z_a.
|
|
1461
|
+
if(z_a.BuildCommand) {
|
|
1332
1462
|
return 4
|
|
1333
1463
|
}
|
|
1334
|
-
{
|
|
1464
|
+
if(z_a.CheckCommand) {
|
|
1335
1465
|
return 5
|
|
1336
1466
|
}
|
|
1467
|
+
{
|
|
1468
|
+
return 6
|
|
1469
|
+
}
|
|
1337
1470
|
}
|
|
1338
1471
|
return ff_core_Ordering.ff_core_Ordering_Order$ff_core_Int_Int.compare_(number_(x_), number_(y_))
|
|
1339
1472
|
}
|
|
@@ -1397,12 +1530,22 @@ ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.ser
|
|
|
1397
1530
|
ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_List_List(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String).serializeUsing_(serialization_, v_.argument_)
|
|
1398
1531
|
return
|
|
1399
1532
|
}
|
|
1400
|
-
if(value_a.
|
|
1533
|
+
if(value_a.DevelopCommand) {
|
|
1401
1534
|
const v_ = value_a;
|
|
1402
1535
|
serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 31), 0);
|
|
1403
1536
|
ff_core_Serializable.Serialization_autoResize(serialization_, 1);
|
|
1404
1537
|
ff_core_Buffer.Buffer_setUint8(serialization_.buffer_, serialization_.offset_, 2);
|
|
1405
1538
|
serialization_.offset_ += 1;
|
|
1539
|
+
ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.serializeUsing_(serialization_, v_.mainPath_);
|
|
1540
|
+
ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_List_List(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String).serializeUsing_(serialization_, v_.argument_)
|
|
1541
|
+
return
|
|
1542
|
+
}
|
|
1543
|
+
if(value_a.BrowserCommand) {
|
|
1544
|
+
const v_ = value_a;
|
|
1545
|
+
serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 31), 0);
|
|
1546
|
+
ff_core_Serializable.Serialization_autoResize(serialization_, 1);
|
|
1547
|
+
ff_core_Buffer.Buffer_setUint8(serialization_.buffer_, serialization_.offset_, 3);
|
|
1548
|
+
serialization_.offset_ += 1;
|
|
1406
1549
|
ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.serializeUsing_(serialization_, v_.mainPath_)
|
|
1407
1550
|
return
|
|
1408
1551
|
}
|
|
@@ -1410,7 +1553,7 @@ if(value_a.BuildCommand) {
|
|
|
1410
1553
|
const v_ = value_a;
|
|
1411
1554
|
serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 29), 0);
|
|
1412
1555
|
ff_core_Serializable.Serialization_autoResize(serialization_, 1);
|
|
1413
|
-
ff_core_Buffer.Buffer_setUint8(serialization_.buffer_, serialization_.offset_,
|
|
1556
|
+
ff_core_Buffer.Buffer_setUint8(serialization_.buffer_, serialization_.offset_, 4);
|
|
1414
1557
|
serialization_.offset_ += 1;
|
|
1415
1558
|
ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.serializeUsing_(serialization_, v_.mainPath_)
|
|
1416
1559
|
return
|
|
@@ -1419,7 +1562,7 @@ if(value_a.CheckCommand) {
|
|
|
1419
1562
|
const v_ = value_a;
|
|
1420
1563
|
serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 29), 0);
|
|
1421
1564
|
ff_core_Serializable.Serialization_autoResize(serialization_, 1);
|
|
1422
|
-
ff_core_Buffer.Buffer_setUint8(serialization_.buffer_, serialization_.offset_,
|
|
1565
|
+
ff_core_Buffer.Buffer_setUint8(serialization_.buffer_, serialization_.offset_, 5);
|
|
1423
1566
|
serialization_.offset_ += 1;
|
|
1424
1567
|
ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.serializeUsing_(serialization_, v_.filePath_)
|
|
1425
1568
|
return
|
|
@@ -1428,7 +1571,7 @@ return
|
|
|
1428
1571
|
const v_ = value_a;
|
|
1429
1572
|
serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 31), 0);
|
|
1430
1573
|
ff_core_Serializable.Serialization_autoResize(serialization_, 1);
|
|
1431
|
-
ff_core_Buffer.Buffer_setUint8(serialization_.buffer_, serialization_.offset_,
|
|
1574
|
+
ff_core_Buffer.Buffer_setUint8(serialization_.buffer_, serialization_.offset_, 6);
|
|
1432
1575
|
serialization_.offset_ += 1;
|
|
1433
1576
|
ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.serializeUsing_(serialization_, v_.outPath_);
|
|
1434
1577
|
ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_List_List(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String).serializeUsing_(serialization_, v_.filePaths_)
|
|
@@ -1450,22 +1593,26 @@ return ff_compiler_Main.RunCommand(ff_core_Serializable.ff_core_Serializable_Ser
|
|
|
1450
1593
|
}
|
|
1451
1594
|
if(_1 === 2) {
|
|
1452
1595
|
serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 31), 0);
|
|
1453
|
-
return ff_compiler_Main.
|
|
1596
|
+
return ff_compiler_Main.DevelopCommand(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.deserializeUsing_(serialization_), ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_List_List(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String).deserializeUsing_(serialization_))
|
|
1454
1597
|
}
|
|
1455
1598
|
if(_1 === 3) {
|
|
1599
|
+
serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 31), 0);
|
|
1600
|
+
return ff_compiler_Main.BrowserCommand(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.deserializeUsing_(serialization_))
|
|
1601
|
+
}
|
|
1602
|
+
if(_1 === 4) {
|
|
1456
1603
|
serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 29), 0);
|
|
1457
1604
|
return ff_compiler_Main.BuildCommand(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.deserializeUsing_(serialization_))
|
|
1458
1605
|
}
|
|
1459
|
-
if(_1 ===
|
|
1606
|
+
if(_1 === 5) {
|
|
1460
1607
|
serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 29), 0);
|
|
1461
1608
|
return ff_compiler_Main.CheckCommand(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.deserializeUsing_(serialization_))
|
|
1462
1609
|
}
|
|
1463
|
-
if(_1 ===
|
|
1610
|
+
if(_1 === 6) {
|
|
1464
1611
|
serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 31), 0);
|
|
1465
1612
|
return ff_compiler_Main.SymbolsCommand(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.deserializeUsing_(serialization_), ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_List_List(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String).deserializeUsing_(serialization_))
|
|
1466
1613
|
}
|
|
1467
1614
|
{
|
|
1468
|
-
throw ff_core_Js.initializeError_(
|
|
1615
|
+
throw ff_core_Js.initializeError_(ff_core_Serializable.DeserializationChecksumException(), new Error(), ff_core_Serializable.ff_core_Any_HasAnyTag$ff_core_Serializable_DeserializationChecksumException, ff_core_Serializable.ff_core_Show_Show$ff_core_Serializable_DeserializationChecksumException)
|
|
1469
1616
|
}
|
|
1470
1617
|
}
|
|
1471
1618
|
},
|
|
@@ -1490,12 +1637,22 @@ ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.ser
|
|
|
1490
1637
|
ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_List_List(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String).serializeUsing_(serialization_, v_.argument_)
|
|
1491
1638
|
return
|
|
1492
1639
|
}
|
|
1493
|
-
if(value_a.
|
|
1640
|
+
if(value_a.DevelopCommand) {
|
|
1494
1641
|
const v_ = value_a;
|
|
1495
1642
|
serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 31), 0);
|
|
1496
1643
|
ff_core_Serializable.Serialization_autoResize(serialization_, 1);
|
|
1497
1644
|
ff_core_Buffer.Buffer_setUint8(serialization_.buffer_, serialization_.offset_, 2);
|
|
1498
1645
|
serialization_.offset_ += 1;
|
|
1646
|
+
ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.serializeUsing_(serialization_, v_.mainPath_);
|
|
1647
|
+
ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_List_List(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String).serializeUsing_(serialization_, v_.argument_)
|
|
1648
|
+
return
|
|
1649
|
+
}
|
|
1650
|
+
if(value_a.BrowserCommand) {
|
|
1651
|
+
const v_ = value_a;
|
|
1652
|
+
serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 31), 0);
|
|
1653
|
+
ff_core_Serializable.Serialization_autoResize(serialization_, 1);
|
|
1654
|
+
ff_core_Buffer.Buffer_setUint8(serialization_.buffer_, serialization_.offset_, 3);
|
|
1655
|
+
serialization_.offset_ += 1;
|
|
1499
1656
|
ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.serializeUsing_(serialization_, v_.mainPath_)
|
|
1500
1657
|
return
|
|
1501
1658
|
}
|
|
@@ -1503,7 +1660,7 @@ if(value_a.BuildCommand) {
|
|
|
1503
1660
|
const v_ = value_a;
|
|
1504
1661
|
serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 29), 0);
|
|
1505
1662
|
ff_core_Serializable.Serialization_autoResize(serialization_, 1);
|
|
1506
|
-
ff_core_Buffer.Buffer_setUint8(serialization_.buffer_, serialization_.offset_,
|
|
1663
|
+
ff_core_Buffer.Buffer_setUint8(serialization_.buffer_, serialization_.offset_, 4);
|
|
1507
1664
|
serialization_.offset_ += 1;
|
|
1508
1665
|
ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.serializeUsing_(serialization_, v_.mainPath_)
|
|
1509
1666
|
return
|
|
@@ -1512,7 +1669,7 @@ if(value_a.CheckCommand) {
|
|
|
1512
1669
|
const v_ = value_a;
|
|
1513
1670
|
serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 29), 0);
|
|
1514
1671
|
ff_core_Serializable.Serialization_autoResize(serialization_, 1);
|
|
1515
|
-
ff_core_Buffer.Buffer_setUint8(serialization_.buffer_, serialization_.offset_,
|
|
1672
|
+
ff_core_Buffer.Buffer_setUint8(serialization_.buffer_, serialization_.offset_, 5);
|
|
1516
1673
|
serialization_.offset_ += 1;
|
|
1517
1674
|
ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.serializeUsing_(serialization_, v_.filePath_)
|
|
1518
1675
|
return
|
|
@@ -1521,7 +1678,7 @@ return
|
|
|
1521
1678
|
const v_ = value_a;
|
|
1522
1679
|
serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 31), 0);
|
|
1523
1680
|
ff_core_Serializable.Serialization_autoResize(serialization_, 1);
|
|
1524
|
-
ff_core_Buffer.Buffer_setUint8(serialization_.buffer_, serialization_.offset_,
|
|
1681
|
+
ff_core_Buffer.Buffer_setUint8(serialization_.buffer_, serialization_.offset_, 6);
|
|
1525
1682
|
serialization_.offset_ += 1;
|
|
1526
1683
|
ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.serializeUsing_(serialization_, v_.outPath_);
|
|
1527
1684
|
ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_List_List(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String).serializeUsing_(serialization_, v_.filePaths_)
|
|
@@ -1543,22 +1700,26 @@ return ff_compiler_Main.RunCommand(ff_core_Serializable.ff_core_Serializable_Ser
|
|
|
1543
1700
|
}
|
|
1544
1701
|
if(_1 === 2) {
|
|
1545
1702
|
serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 31), 0);
|
|
1546
|
-
return ff_compiler_Main.
|
|
1703
|
+
return ff_compiler_Main.DevelopCommand(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.deserializeUsing_(serialization_), ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_List_List(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String).deserializeUsing_(serialization_))
|
|
1547
1704
|
}
|
|
1548
1705
|
if(_1 === 3) {
|
|
1706
|
+
serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 31), 0);
|
|
1707
|
+
return ff_compiler_Main.BrowserCommand(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.deserializeUsing_(serialization_))
|
|
1708
|
+
}
|
|
1709
|
+
if(_1 === 4) {
|
|
1549
1710
|
serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 29), 0);
|
|
1550
1711
|
return ff_compiler_Main.BuildCommand(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.deserializeUsing_(serialization_))
|
|
1551
1712
|
}
|
|
1552
|
-
if(_1 ===
|
|
1713
|
+
if(_1 === 5) {
|
|
1553
1714
|
serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 29), 0);
|
|
1554
1715
|
return ff_compiler_Main.CheckCommand(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.deserializeUsing_(serialization_))
|
|
1555
1716
|
}
|
|
1556
|
-
if(_1 ===
|
|
1717
|
+
if(_1 === 6) {
|
|
1557
1718
|
serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_) + 31), 0);
|
|
1558
1719
|
return ff_compiler_Main.SymbolsCommand(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.deserializeUsing_(serialization_), ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_List_List(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String).deserializeUsing_(serialization_))
|
|
1559
1720
|
}
|
|
1560
1721
|
{
|
|
1561
|
-
throw ff_core_Js.initializeError_(
|
|
1722
|
+
throw ff_core_Js.initializeError_(ff_core_Serializable.DeserializationChecksumException(), new Error(), ff_core_Serializable.ff_core_Any_HasAnyTag$ff_core_Serializable_DeserializationChecksumException, ff_core_Serializable.ff_core_Show_Show$ff_core_Serializable_DeserializationChecksumException)
|
|
1562
1723
|
}
|
|
1563
1724
|
}
|
|
1564
1725
|
},
|
|
@@ -1588,7 +1749,7 @@ serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_
|
|
|
1588
1749
|
return ff_compiler_Main.CommandLineError(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.deserializeUsing_(serialization_))
|
|
1589
1750
|
}
|
|
1590
1751
|
{
|
|
1591
|
-
throw ff_core_Js.initializeError_(
|
|
1752
|
+
throw ff_core_Js.initializeError_(ff_core_Serializable.DeserializationChecksumException(), new Error(), ff_core_Serializable.ff_core_Any_HasAnyTag$ff_core_Serializable_DeserializationChecksumException, ff_core_Serializable.ff_core_Show_Show$ff_core_Serializable_DeserializationChecksumException)
|
|
1592
1753
|
}
|
|
1593
1754
|
}
|
|
1594
1755
|
},
|
|
@@ -1615,7 +1776,7 @@ serialization_.checksum_ = ff_core_Int.Int_bitOr(((31 * serialization_.checksum_
|
|
|
1615
1776
|
return ff_compiler_Main.CommandLineError(ff_core_Serializable.ff_core_Serializable_Serializable$ff_core_String_String.deserializeUsing_(serialization_))
|
|
1616
1777
|
}
|
|
1617
1778
|
{
|
|
1618
|
-
throw ff_core_Js.initializeError_(
|
|
1779
|
+
throw ff_core_Js.initializeError_(ff_core_Serializable.DeserializationChecksumException(), new Error(), ff_core_Serializable.ff_core_Any_HasAnyTag$ff_core_Serializable_DeserializationChecksumException, ff_core_Serializable.ff_core_Show_Show$ff_core_Serializable_DeserializationChecksumException)
|
|
1619
1780
|
}
|
|
1620
1781
|
}
|
|
1621
1782
|
},
|