Nimgrep improvements 2 (#15612)
* nimgrep: speed up by threads and Channels * nimgrep: add --bin, --text, --count options * nimgrep: add --sortTime option * allow Peg in all matches including --includeFile, --excludeFile, --excludeDir * add --match and --noMatch options * add --includeDir option * add --limit (-m) and --onlyAscii (-o) options * fix performance regression introduced in nimgrep improvements #12779 * better error handling * add option --fit * fix groups in --replace * fix flushing, --replace, improve --count * use "." as the default directory, not full path * fix --fit for Windows * force target to C for macosx * validate non-negative int input for options #15318 * switch nimgrep to using --gc:orc * address review: implement cropping in matches,... * implement stdin/pipe & revise --help * address stylistic review & add limitations
This commit is contained in:
parent
49f68122e6
commit
5db181f377
3 changed files with 1055 additions and 303 deletions
|
|
@ -262,6 +262,9 @@ proc debuggerTests(r: var TResults, cat: Category, options: string) =
|
||||||
if fileExists("tools/nimgrep.nim"):
|
if fileExists("tools/nimgrep.nim"):
|
||||||
var t = makeTest("tools/nimgrep", options & " --debugger:on", cat)
|
var t = makeTest("tools/nimgrep", options & " --debugger:on", cat)
|
||||||
t.spec.action = actionCompile
|
t.spec.action = actionCompile
|
||||||
|
# force target to C because of MacOS 10.15 SDK headers bug
|
||||||
|
# https://github.com/nim-lang/Nim/pull/15612#issuecomment-712471879
|
||||||
|
t.spec.targets = { targetC }
|
||||||
testSpec r, t
|
testSpec r, t
|
||||||
|
|
||||||
# ------------------------- JS tests ------------------------------------------
|
# ------------------------- JS tests ------------------------------------------
|
||||||
|
|
|
||||||
1346
tools/nimgrep.nim
1346
tools/nimgrep.nim
File diff suppressed because it is too large
Load diff
|
|
@ -1,5 +1,4 @@
|
||||||
# The GC is stable enough now:
|
# don't use --gc:refc because of bug
|
||||||
|
# https://github.com/nim-lang/Nim/issues/14138 .
|
||||||
#--gc:none
|
# --gc:orc and --gc:markandsweep work well.
|
||||||
|
--threads:on --gc:orc
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue