Commit Graph

67 Commits

Author SHA1 Message Date
Timothee Cour
471aab86a0 fix #16526 run config.nims before foo.nim.cfg (#16557)
* fix #16526 run config.nims before foo.nim.cfg

* add test
2021-01-02 21:41:44 +01:00
Timothee Cour
52829fc8d1 cmdline: improve command processing (#16056) 2020-11-26 15:55:56 -08: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
Timothee Cour
da476a8723 fix #15740 --hint:conf now works more reliably (#15741) 2020-10-27 07:35:10 +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
Clyybber
13e659cfec Big compiler Cleanup (#14777) 2020-08-28 22:18:09 +02: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
Andy Davidoff
56fb909676 fix crash due to errant symbols in nim.cfg (#13073) [backport] 2020-01-08 22:25:25 +01:00
Clyybber
7e747d11c6 Cosmetic compiler cleanup (#12718)
* Cleanup compiler code base

* Unify add calls

* Unify len invocations

* Unify range operators

* Fix oversight

* Remove {.procvar.} pragma

* initCandidate -> newCandidate where reasonable

* Unify safeLen calls
2019-11-28 17:13:04 +01:00
Andy Davidoff
5544a13236 restore --define🔑val in nim.cfg and fix #12367 (#12611) 2019-11-06 21:26:03 +01:00
Andy Davidoff
61889c604a export nim.cfg parser (#12602) 2019-11-06 09:59:23 +01:00
Araq
07d465ca42 [refactoring] remove unused imports in the compiler and in some stdlib modules 2019-07-18 00:36:03 +02:00
Araq
af39f26a3a [bugfix] nimpretty: fixes #11468 2019-06-13 10:42:37 +02:00
Andreas Rumpf
7215341190 make fullpaths the default in error messages and stack traces for mor… (#11385)
* make fullpaths the default in error messages and stack traces for more convenient development
* split up -d:release into -d:release and -d:danger flags
* workaround a Nim config parser bug
* fixes an old nim config parser bug
* make megatest green again
* make nimpretty tests work again
* make nimsuggest green
2019-06-05 08:02:54 +02: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
Timothee Cour
56de4c81b2 fixes #8739; allow --hint:foo:on --warning:bar:off (#8757) 2018-08-25 07:55:05 +02:00
Kaushal Modi
d73b19e379 Look for user nim.cfg in "nim/" subdir in usual config dir locations (#8662)
Fixes https://github.com/nim-lang/Nim/issues/8661.
2018-08-17 10:52:10 +02:00
Andreas Rumpf
3ca8ebe778 fixes #8653 2018-08-16 18:49:22 +02:00
Araq
8e9551b1c7 fixex merge conflicts 2018-06-08 19:50:36 +02:00
WhiteDuke
59ba1e77af Wait until the end to print hint Conf (#7931) 2018-06-04 13:31:22 +02:00
Andreas Rumpf
545b1582cd refactoring: make projectMainIdx typesafe 2018-05-27 22:30:36 +02:00
Andreas Rumpf
669a564492 remove more global variables in the Nim compiler 2018-05-27 11:10:56 +02:00
Andreas Rumpf
c73cd5349e documentation generator works again 2018-05-15 10:03:06 +02:00
Andreas Rumpf
328e7a1005 options.nim: no global variables anymore 2018-05-13 17:52:21 +02:00
Andreas Rumpf
3c4ceea427 move more global variables into ConfigRef 2018-05-11 15:28:26 +02:00
Andreas Rumpf
a8a544a8f7 avoid more global variables 2018-05-11 15:01:28 +02:00
Andreas Rumpf
61e57cfa13 big refactoring: parser compiles again 2018-05-10 10:49:51 +02:00
Andreas Rumpf
b7116a28ee compiler refactoring, pass config around explicitly 2018-05-05 18:47:29 +02:00
Andreas Rumpf
ba86b09e69 remove obsolete nimrod.cfg configuration files 2018-04-24 09:34:29 +02:00
Andreas Rumpf
3862651d44 fixes #499 2017-07-22 16:52:58 +02:00
Andreas Rumpf
f04d21f279 refactoring: explict config state instead of globals 2017-02-01 23:39:40 +01:00
Araq
65801e4b6e make tests green again 2016-11-01 07:16:07 +01:00
Araq
773d17cd14 big refactoring: step 1 2016-10-31 15:34:44 +01:00
Araq
a373bdd0c9 improvements for NimScript support 2015-09-03 14:30:11 +02:00
Adam Strzelecki
14e6ff6780 Introduce NotesVerbosity defining verbosity levels
This solves two issues:

1. Some notes were enabled explicitly for some verbosity levels, so
   --hintName:on has no effect if verbosity level was too low.

2. Verbosity level for notes is not longer scattered across the source code,
   instead if now lives in msgs.nim NotesVerbosity array

3. Individual note settings have stronger effect than verbosity setting,
   so --hintName:off will disable hint regardless of high verbosity setting,
   and vice-versa --hintName:on will enable hint even on low verbosity setting.
2015-07-03 12:37:42 +02:00
Andreas Rumpf
31074e0015 Merge pull request #2058 from def-/nimrod-cfgs
Rename *.nimrod.cfg to *.nim.cfg
2015-02-07 18:11:00 +01:00
Araq
0b5c42f405 configuration system supports %= to access environment variables 2015-02-07 12:55:23 +01:00
def
2b9d7068cb Add support for nimcfg and warning for nimrod.cfg 2015-02-04 13:01:21 +01:00
def
12ad32e951 Typos 2015-02-04 13:01:11 +01:00
Araq
830e0c0009 the codegen doesn't emit deepCopy for parallel statements 2014-11-08 15:47:00 +01:00
Araq
cd2c6128d1 renamed babelcmd to nimblecmd; config files are now nim.cfg; other renamings 2014-08-29 09:03:00 +02:00
Araq
2781fea9e2 Nimrod renamed to Nim 2014-08-28 09:38:14 +02:00
Araq
73c6efdf66 'nil' as a statement is deprecated, use an empty 'discard' instead 2014-01-19 16:54:59 +01:00
Araq
b731e6ef1c case consistency: cs:partial bootstraps on windows 2013-12-29 03:19:10 +01:00
Araq
438703f59e case consistency: next steps 2013-12-29 01:13:51 +01:00
Araq
92b8fac94a case consistency part 4 2013-12-27 23:10:36 +01:00
Araq
a427648c48 case consistency part 2 2013-12-27 16:35:21 +01:00
Araq
2df9b442c6 case consistency part 1 2013-12-27 15:48:53 +01:00