diff options
author | ringabout <43030857+ringabout@users.noreply.github.com> | 2022-09-27 03:40:20 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-26 15:40:20 -0400 |
commit | cb24eea86b730a99311086f028d378ab53fd20e2 (patch) | |
tree | 718a04812c0a93e2f030a8b013f2cba97b79ff60 | |
parent | 9ca88a18897f5ebc59d6a67dfc7f9a8de8fa35ce (diff) | |
download | Nim-cb24eea86b730a99311086f028d378ab53fd20e2.tar.gz |
fixes #20426; remove `maincommand` and `m` options since they are a no op since 2014 (#20429)
* bump macOS image on Azure CI to macos-11 ##[warning]The macOS-10.15 environment is deprecated, consider switching to macos-11(macos-latest), macos-12 instead. For more details see https://github.com/actions/virtual-environments/issues/5583 * fix CI error * fixes #20426; remove `maincommand` and `m` options since they are a noop since 2014 and causes confusion fixes #20426 https://github.com/nim-lang/Nim/commit/7f7b13a45f73c6d9dcca3ce8388833189d77426c#diff-d949f8c356fd2dc9ceedc6f3dbbd01e2c806269dd0a8ad6516facf589fa2c99a makes it a no op, but it causes a regression because it should add `expectArg(switch, arg, pass, info)` before the discard statement. It causes https://github.com/nim-lang/Nim/issues/20426 to happen. Without `expectArg(switch, arg, pass, info)`, `-mm:orc` is wrongly interpreted as `-m` and compiler, which doesn't make sense. It should either abort compilation or prints `argument for command line option expected: '-m'` message. Since they are a no op since 2014, let's remove it to clear the confusion. Let's wait and see whether it breaks something. * add a changelog
-rw-r--r-- | changelog.md | 2 | ||||
-rw-r--r-- | compiler/commands.nim | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/changelog.md b/changelog.md index 5ae8660f3..6d4ccd4b0 100644 --- a/changelog.md +++ b/changelog.md @@ -12,6 +12,8 @@ - The `gc:v2` option is removed. +- The `mainmodule` and `m` options are removed. + - The `threads:on` option is now the default. - Optional parameters in combination with `: body` syntax (RFC #405) are now opt-in via diff --git a/compiler/commands.nim b/compiler/commands.nim index b1765489c..c2ed01891 100644 --- a/compiler/commands.nim +++ b/compiler/commands.nim @@ -1094,7 +1094,7 @@ proc processSwitch*(switch, arg: string, pass: TCmdLinePass, info: TLineInfo; processOnOffSwitchG(conf, {optEnableDeepCopy}, arg, pass, info) of "": # comes from "-" in for example: `nim c -r -` (gets stripped from -) handleStdinInput(conf) - of "nilseqs", "nilchecks", "mainmodule", "m", "symbol", "taintmode", "cs", "deadcodeelim": warningOptionNoop(switch) + of "nilseqs", "nilchecks", "symbol", "taintmode", "cs", "deadcodeelim": warningOptionNoop(switch) of "nimmainprefix": conf.nimMainPrefix = arg else: if strutils.find(switch, '.') >= 0: options.setConfigVar(conf, switch, arg) |