Commit Graph

27 Commits

Author SHA1 Message Date
Timothee Cour
52829fc8d1 cmdline: improve command processing (#16056) 2020-11-26 15:55:56 -08:00
Clyybber
07ad608fb2 Retain backwards compatibility after #16057 (#16068)
* Retain backwards compatibility

* Fix typo
2020-11-20 14:11:41 +01:00
Timothee Cour
7815ed69d4 rename loadConfigsAndRunMainCommand => loadConfigsAndProcessCmdLine, reflect reality (#16057) 2020-11-20 10:51:14 +01:00
Timothee Cour
c1664f93b0 new: nim -e:cmd to run a command directly; also fixes #15731 (#15687)
* new: `nim -i cmd`
* rename -i to -e (for eval); consistent with majority of other programing languages
* `nim e -e:cmd` now works; bugfix: `echo cmd | nim e -` now works
* honor --betterRun
* address comments
* --eval alias for -e (replaces undocumented --eval which was a noop)
* --eval now defaults to e (nimscript) instead of r
* address comment: remove -e, only keep --eval
* address comment
* fixup
* Update compiler/nimconf.nim

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2020-11-09 16:07:22 +01:00
Andreas Rumpf
226595515c explicit ID generation for easier IC (#15559)
* refactoring: idents don't need inheritance
* refactoring: adding an IdGenerator (part 1)
* refactoring: adding an IdGenerator (part 2)
* refactoring: adding an IdGenerator (part 3)
* refactoring: adding an IdGenerator (part 4)
* refactoring: adding an IdGenerator (part 5)
* refactoring: adding an IdGenerator (part 5)
* IdGenerator must be a ref type; hello world works again
* make bootstrapping work again
* progress: add back the 'exactReplica' ideas
* added back the missing exactReplica hacks
* make tcompilerapi work again
* make important packages green
* attempt to fix the build for 32 bit machines (probably need a better solution here)
2020-10-25 08:50:47 +01:00
narimiran
b418c54ec4 even more "eg" fixes [ci skip] 2020-10-20 13:58:12 +02:00
Andreas Rumpf
3492178494 refactoring: removed cmdlinehelper.mainCommand callback 2020-10-11 20:44:04 +02:00
Timothee Cour
c777f2fb60 fix some issues with --backend (#14363)
* fix some issues with --backend
* fix https://github.com/timotheecour/Nim/issues/175; improve upon #14306
2020-05-16 13:09:18 +02:00
Timothee Cour
9502e39b63 nim doc --backend:js, nim doc --doccmd:-d:foo, nim r --backend:js, --doccmd:skip + other improvements (#14278)
* `nim doc --backend:js|cpp...`
`nim doc --doccmd:'-d:foo --threads:on'`
`nim r --backend:cpp...` (implies --run --usenimcache)
* --usenimcache works with all targets
* --docCmd:skip now skips compiling snippets; 50X speedup for doc/manual.rst
2020-05-11 12:01:18 +02:00
Andreas Rumpf
3a2697dd73 drnim: tiny progress (#13882)
* drnim: tiny progress
* refactoring complete
* drnim: prove .ensures annotations
* Moved code around to avoid code duplication
* drnim: first implementation of the 'old' property
* drnim: be precise about the assignment statement
* first implementation of --assumeUnique
* progress on forall/exists handling
2020-04-15 20:03:25 +02:00
Timothee Cour
c1cbf94e2d remove isCmdLine; use passCmd1 2020-02-27 13:22:18 +01:00
Timothee Cour
ce36fdc897 correctly honor cmdline --hint:conf:on/off ; correctly show Conf hints in order 2020-02-27 13:22:18 +01:00
Ganesh Viswanathan
96bffadf60 Fix #9405 - cfg and nims run in sync 2020-02-27 13:22:18 +01:00
Timothee Cour
1f7c907e7d fix #13374 nim c -r - now generates $nimcache/stdinfile (#13380) [backport] 2020-02-11 00:37:40 +01:00
Andreas Rumpf
6efac70181 make goto based exceptions available for 'nim cpp' (#13244)
* make goto based exceptions available for 'nim cpp'
* optimize seq.add to be comparable to C++'s emplace_back
2020-01-25 20:00:13 +01:00
Federico Ceratto
39290cf88c Fix spellings (#12277) [backport] 2019-09-27 07:02:54 +02:00
Andreas Rumpf
15e681ce66 fixes 'e' command handling; now only does what advopt.txt claims it does (#11961)
* fixes 'e' command handling; now only does what advopt.txt claims it does
* address Timothee's remark
2019-08-16 18:19:30 +02:00
Araq
9526009e0e fixes #9120 2018-12-16 20:34:07 +01:00
Araq
d91d1865b8 fixes #9420 2018-12-16 20:11:04 +01:00
Araq
d66eb04ce9 fixes #8991, fixes #4446 2018-12-16 19:22:49 +01:00
Araq
bae662fa8a restore the old .nims processing behaviour; fixes #9989; fixes #9995 2018-12-16 18:44:29 +01:00
Andreas Rumpf
39ae55e6e4 fixes #9995 2018-12-15 14:01:18 +01:00
Araq
32c6b35d97 fixes yet another NimScript regression 2018-12-14 12:00:57 +01:00
Araq
f551b72fba fixes #9965 2018-12-14 09:56:59 +01:00
Neelesh Chandola
bb85869237 Undefine some symbols and globalOptions when processing nimscript (#9945) [backport]
* Undefine some symbols when processing nimscript
* Undefine taintMode when processing nimscript
* Reload .cfg configuration
2018-12-13 09:05:24 +01:00
Andreas Rumpf
86556ebfdb compiler refactoring; use typesafe path handing; docgen: render symbols between modules 2018-09-07 19:21:16 +02:00
Timothee Cour
ed0cb7b85d make config.nims behave like nim.cfg in terms of where these scripts are searched / run (#8682)
* run project config.nims if exists, then inputfile.nims if exists
* ~/.config/nim/config.nims can now be used
* also check in getSystemConfigPath for config.nims
* refactor handleCmdLine for nim and nimsuggest
2018-08-30 13:52:32 +02:00