From 3b0ed0a9b75d4a1ed0f9f8204f9d1fc366bf534f Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Wed, 20 Jul 2022 17:36:06 +0300 Subject: [PATCH 1/5] add disableWarning option --- src/compiler.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/compiler.md b/src/compiler.md index ac49996c8..c6689680b 100644 --- a/src/compiler.md +++ b/src/compiler.md @@ -23,7 +23,7 @@ asc entryFile.ts ``` --version, -v Prints just the compiler's version and exits. --help, -h Prints this message and exits. ---config Configuration file to apply. CLI arguments take precedence. +--config Configuration file to apply. CLI arguments take precedence. --target Configuration file target to use. Defaults to 'release'. ``` @@ -86,8 +86,8 @@ There are several flags that enable or disable specific WebAssembly or compiler --zeroFilledMemory Assume imported memory is zeroed. Requires importMemory. --importTable Imports the function table from 'env.table'. --exportTable Exports the function table as 'table'. ---exportStart Exports the start function using the specified name instead - of calling it implicitly. Useful for WASI or to obtain the +--exportStart Exports the start function using the specified name instead + of calling it implicitly. Useful for WASI or to obtain the exported memory before executing any code accessing it. --runtime Specifies the runtime variant to include in the program. @@ -97,8 +97,8 @@ There are several flags that enable or disable specific WebAssembly or compiler ... Path to a custom runtime implementation --exportRuntime Exports the runtime helpers (__new, __collect etc.). ---stackSize Overrides the stack size. Only relevant for incremental GC - or when using a custom runtime that requires stack space. +--stackSize Overrides the stack size. Only relevant for incremental GC + or when using a custom runtime that requires stack space. Defaults to 0 without and to 16384 with incremental GC. --enable Enables WebAssembly features being disabled by default. @@ -114,8 +114,8 @@ There are several flags that enable or disable specific WebAssembly or compiler nontrapping-f2i Non-trapping float to integer ops. bulk-memory Bulk memory operations. ---use, -u Aliases a global object under another name, e.g., to switch - the default 'Math' implementation used: --use Math=JSMath +--use, -u Aliases a global object under another name, e.g., to switch + the default 'Math' implementation used: --use Math=JSMath Can also be used to introduce an integer constant. --lowMemoryLimit Enforces very low (<64k) memory constraints. ``` @@ -165,6 +165,8 @@ Other options include those forwarded to Binaryen and various flags useful in ce --noEmit Performs compilation as usual but does not emit code. --stats Prints statistics on I/O and compile times. --pedantic Make yourself sad for no good reason. +--disableWarning Disables one specific or all compilation warnings. For disable specific warning add code (like `201`) as argument. +eg: --lib Adds one or multiple paths to custom library components and uses exports of all top-level files at this path as globals. --path Adds one or multiple paths to package resolution, similar From 9390effe70a61b557195bac876495375be28f998 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Wed, 20 Jul 2022 17:41:38 +0300 Subject: [PATCH 2/5] fix --- src/compiler.md | 1 - 1 file changed, 1 deletion(-) diff --git a/src/compiler.md b/src/compiler.md index c6689680b..06477f882 100644 --- a/src/compiler.md +++ b/src/compiler.md @@ -166,7 +166,6 @@ Other options include those forwarded to Binaryen and various flags useful in ce --stats Prints statistics on I/O and compile times. --pedantic Make yourself sad for no good reason. --disableWarning Disables one specific or all compilation warnings. For disable specific warning add code (like `201`) as argument. -eg: --lib Adds one or multiple paths to custom library components and uses exports of all top-level files at this path as globals. --path Adds one or multiple paths to package resolution, similar From 7eabf2e975b87dbcc777fe3c3040ffb3bbd6ac02 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Wed, 20 Jul 2022 17:42:44 +0300 Subject: [PATCH 3/5] move it after noUnsafe --- src/compiler.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler.md b/src/compiler.md index 06477f882..7832cf8a2 100644 --- a/src/compiler.md +++ b/src/compiler.md @@ -161,11 +161,11 @@ Other options include those forwarded to Binaryen and various flags useful in ce --baseDir Specifies the base directory of input and output files. --noColors Disables terminal colors. --noUnsafe Disallows the use of unsafe features in user code. +--disableWarning Disables one specific or all compilation warnings. For disable specific warning add code (like `201`) as argument. Does not affect library files and external modules. --noEmit Performs compilation as usual but does not emit code. --stats Prints statistics on I/O and compile times. --pedantic Make yourself sad for no good reason. ---disableWarning Disables one specific or all compilation warnings. For disable specific warning add code (like `201`) as argument. --lib Adds one or multiple paths to custom library components and uses exports of all top-level files at this path as globals. --path Adds one or multiple paths to package resolution, similar From cfcb4210e74308d120d6aebbbdb555f772adc30b Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Wed, 20 Jul 2022 17:43:40 +0300 Subject: [PATCH 4/5] fix --- src/compiler.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/compiler.md b/src/compiler.md index 7832cf8a2..fd1068a50 100644 --- a/src/compiler.md +++ b/src/compiler.md @@ -161,8 +161,9 @@ Other options include those forwarded to Binaryen and various flags useful in ce --baseDir Specifies the base directory of input and output files. --noColors Disables terminal colors. --noUnsafe Disallows the use of unsafe features in user code. ---disableWarning Disables one specific or all compilation warnings. For disable specific warning add code (like `201`) as argument. Does not affect library files and external modules. +--disableWarning Disables one specific or all compilation warnings. + For disable specific warning add code (like `201`) as argument. --noEmit Performs compilation as usual but does not emit code. --stats Prints statistics on I/O and compile times. --pedantic Make yourself sad for no good reason. From 740f04752cce6f8d57087692343d50dbd099f337 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Wed, 20 Jul 2022 17:45:03 +0300 Subject: [PATCH 5/5] sync with description in options.json --- src/compiler.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler.md b/src/compiler.md index fd1068a50..3d813a312 100644 --- a/src/compiler.md +++ b/src/compiler.md @@ -162,8 +162,8 @@ Other options include those forwarded to Binaryen and various flags useful in ce --noColors Disables terminal colors. --noUnsafe Disallows the use of unsafe features in user code. Does not affect library files and external modules. ---disableWarning Disables one specific or all compilation warnings. - For disable specific warning add code (like `201`) as argument. +--disableWarning Disables warnings matching the given diagnostic code. + If no diagnostic code is given, all warnings are disabled. --noEmit Performs compilation as usual but does not emit code. --stats Prints statistics on I/O and compile times. --pedantic Make yourself sad for no good reason.