* fix #14912, make `--useVersion:1.0` work again * a better fix * add test
This commit is contained in:
parent
04232d92cd
commit
371b416ac8
2 changed files with 51 additions and 0 deletions
|
|
@ -878,6 +878,7 @@ proc processSwitch*(switch, arg: string, pass: TCmdLinePass, info: TLineInfo;
|
||||||
defineSymbol(conf.symbols, "NimPatch", "100")
|
defineSymbol(conf.symbols, "NimPatch", "100")
|
||||||
# old behaviors go here:
|
# old behaviors go here:
|
||||||
defineSymbol(conf.symbols, "nimOldRelativePathBehavior")
|
defineSymbol(conf.symbols, "nimOldRelativePathBehavior")
|
||||||
|
undefSymbol(conf.symbols, "nimDoesntTrackDefects")
|
||||||
ast.eqTypeFlags.excl {tfGcSafe, tfNoSideEffect}
|
ast.eqTypeFlags.excl {tfGcSafe, tfNoSideEffect}
|
||||||
conf.globalOptions.incl optNimV1Emulation
|
conf.globalOptions.incl optNimV1Emulation
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
50
tests/system/tuse_version.nim
Normal file
50
tests/system/tuse_version.nim
Normal file
|
|
@ -0,0 +1,50 @@
|
||||||
|
discard """
|
||||||
|
cmd: "nim c --useVersion:1.0 -r $file"
|
||||||
|
output: "1.0.100"
|
||||||
|
"""
|
||||||
|
|
||||||
|
{.warning[UnusedImport]: off.}
|
||||||
|
|
||||||
|
import std/[
|
||||||
|
# Core:
|
||||||
|
bitops, typetraits, lenientops, macros, volatile,
|
||||||
|
|
||||||
|
# Algorithms:
|
||||||
|
algorithm, sequtils,
|
||||||
|
|
||||||
|
# Collections:
|
||||||
|
critbits, deques, heapqueue, intsets, lists, options, sets,
|
||||||
|
sharedlist, tables,
|
||||||
|
|
||||||
|
# Strings:
|
||||||
|
editdistance, wordwrap, parseutils, ropes,
|
||||||
|
pegs, punycode, strformat, strmisc, strscans, strtabs,
|
||||||
|
strutils, unicode, unidecode,
|
||||||
|
|
||||||
|
# Generic operator system services:
|
||||||
|
os, streams,
|
||||||
|
|
||||||
|
# Math libraries:
|
||||||
|
complex, math, mersenne, random, rationals, stats, sums,
|
||||||
|
|
||||||
|
# Internet protocols:
|
||||||
|
httpcore, mimetypes, uri,
|
||||||
|
|
||||||
|
# Parsers:
|
||||||
|
htmlparser, json, lexbase, parsecfg, parsecsv, parsesql, parsexml,
|
||||||
|
|
||||||
|
# XML processing:
|
||||||
|
xmltree, xmlparser,
|
||||||
|
|
||||||
|
# Generators:
|
||||||
|
htmlgen,
|
||||||
|
|
||||||
|
# Hashing:
|
||||||
|
base64, hashes,
|
||||||
|
|
||||||
|
# Miscellaneous:
|
||||||
|
colors, sugar, varints,
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
echo NimVersion
|
||||||
Loading…
Add table
Add a link
Reference in a new issue