summary refs log tree commit diff stats
path: root/compiler/commands.nim
Commit message (Collapse)AuthorAgeFilesLines
* fixes #20426; remove `maincommand` and `m` options since they are a no op ↵ringabout2022-09-261-1/+1
| | | | | | | | | | | | | | | | | 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
* defaults to ORC (#19972)ringabout2022-09-231-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * defaults to Orc * bootstrap using refc * use gc * init orc defines * unregister orc * fix gc * fix commands * add prepareMutation for orc * enable deepcopy for orc * prepareMutation * more fixes * some cases * bug #20081 * partial fixes * partial fixes * fixes command line * more fixes * build Nim with refc * use gc * more fixes * rstore * orc doesn't support threadpool * more shallowCopy * more fixes * fixes unsafeNew * workarounds * small * more fixes * fixes some megatest * tcodegenbugs1 refc * fxies megatest * build nimble with refc * workaround tensordsl tests * replace shallowCopy with move * fixes action * workaround * add todo * fixes important packages * unpublic unregisterArcOrc * fixes cpp * enable windows Co-authored-by: xflywind <43030857+xflywind@users.noreply.github.com>
* Fix #16937; --clib option pass library name to backend C compiler correctly ↵Tomohiro2022-09-011-1/+1
| | | | | | | | | | | | | (#19754) * Fix 16937: Make --clib option works * Make tests/compiler/tcmdlineclib.nim works from any current dir * Try to fix link error on macosx * Add a comment to tests/compiler/tcmdlineclib.nims Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>
* defines the `gcRefc` symbol which allows writing specific code for refc (#20009)flywind2022-07-171-0/+1
| | | | | | | | | | | | | | | | | | * define gcRefc symbols * add comments * add a changelog item * Update changelog.md Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> * Update changelog.md Co-authored-by: Yardanico <tiberiumk12@gmail.com> Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> Co-authored-by: Yardanico <tiberiumk12@gmail.com>
* Improve Markdown code blocks & start moving docs to Markdown style (#19954)Andrey Makarov2022-07-151-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - add additional parameters parsing (other implementations will just ignore them). E.g. if in RST we have: .. code:: nim :test: "nim c $1" ... then in Markdown that will be: ```nim test="nim c $1" ... ``` - implement Markdown interpretation of additional indentation which is less than 4 spaces (>=4 spaces is a code block but it's not implemented yet). RST interpretes it as quoted block, for Markdown it's just normal paragraphs. - add separate `md2html` and `md2tex` commands. This is to separate Markdown behavior in cases when it diverges w.r.t. RST significantly — most conspicously like in the case of additional indentation above, and also currently the contradicting inline rule of Markdown is also turned on only in `md2html` and `md2tex`. **Rationale:** mixing Markdown and RST arbitrarily is a way to nowhere, we need to provide a way to fix the particular behavior. Note that still all commands have **both** Markdown and RST features **enabled**. In this PR `*.nim` files can be processed only in Markdown mode, while `md2html` is for `*.md` files and `rst2html` for `*.rst` files. - rename `*.rst` files to `.*md` as our current default behavior is already Markdown-ish - convert code blocks in `docgen.rst` to Markdown style as an example. Other code blocks will be converted in the follow-up PRs - fix indentation inside Markdown code blocks — additional indentation is preserved there - allow more than 3 backticks open/close blocks (tildas \~ are still not allowed to avoid conflict with RST adornment headings) see also https://github.com/nim-lang/RFCs/issues/355 - better error messages - (other) fix a bug that admonitions cannot be used in sandbox mode; fix annoying warning on line 2711
* remove noop option `gc:v2` (#19810)flywind2022-06-101-2/+0
| | | | | * remove noop option gc:v2 * changelog
* Add 'usages' option to the --stylechecks error msg (#19759)Zoom2022-05-041-2/+2
|
* add warnings for gc:option (#19722)flywind2022-04-251-42/+49
|
* fix nim check nimscript [backport: 1.6] (#19444)flywind2022-03-231-0/+2
| | | | fix #19440; fix #3858
* move assertions out of system (#19599)flywind2022-03-231-0/+3
|
* support useVersion:1.6 (#19601)flywind2022-03-101-0/+4
|
* make compileOption("panics") work (#19568)solarizedalias2022-02-271-0/+1
|
* setjump => setjmp [backport: 1.2] (#19496)flywind2022-02-061-1/+1
|
* undefine C symbols in JS backend [backport:1.6] (#19437)flywind2022-02-041-2/+3
| | | fix #19330; fix #19059
* support set other GCs after `mm = orc` or `mm = arc` is set in the global ↵flywind2022-01-271-20/+34
| | | | | | | | | config (#19455) * support set other GCs after arc/orc in global config fix #15535 * set before
* nimscript ignore the threads option (#19370)flywind2022-01-131-1/+1
| | | because nimscript doesn't support threads and causes troubles when the threads option is on
* added --nimMainPrefix switch; fixes #15955; refs #16945 [backport:1.6] (#19235)Andreas Rumpf2021-12-101-0/+1
|
* renamed 'gc' switch to 'mm'; [backport:1.6] (#19187)Andreas Rumpf2021-11-241-2/+2
| | | | * renamed 'gc' switch to 'mm'; [backport:1.6] * better docs
* fixes #18921 [backport] (#18930)Andreas Rumpf2021-09-301-9/+11
|
* strict effects (#18777)Andreas Rumpf2021-09-021-2/+1
| | | | | | | | | | | | | | | | | * fixes #17369 * megatest is green for --cpu:arm64 * docgen output includes more tags/raises * implemented 'effectsOf' * algorithm.nim: uses new effectsOf annotation * closes #18376 * closes #17475 * closes #13905 * allow effectsOf: [a, b] * added a test case * parameters that are not ours cannot be declared as .effectsOf * documentation * manual: added the 'sort' example * bootstrap with the new better options
* move PNode.comment to a side channel, reducing memory usage during ↵Timothee Cour2021-08-291-1/+2
| | | | | | | | | | | | | | | | | compilation by a factor 1.25x (#18760) * move PNode.comment so a side channel, reducing memory usage * fix a bug * fixup * use sfHasComment to speedup comment lookups * fix for IC * Update compiler/parser.nim Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* fix #18674 --nimcache now works better with --os:windows (#18675)Timothee Cour2021-08-111-0/+4
|
* followup #17852, disallow all:on for now (#18311)Timothee Cour2021-06-201-0/+2
|
* support `--hint:all:off --hint:x` (ditto with `--warnings` + friends) (#17852)Timothee Cour2021-06-201-30/+29
| | | | | * select all hints via `--hint:all:on|off`, etc * simplify code with setutils * address comment
* docgen: move to shared RST state (fix #16990) (#18256)Andrey Makarov2021-06-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * docgen: move to shared RST state (fix #16990) * Update lib/packages/docutils/rst.nim Co-authored-by: Andreas Rumpf <rumpf_a@web.de> * Update lib/packages/docutils/rst.nim Co-authored-by: Andreas Rumpf <rumpf_a@web.de> * Update lib/packages/docutils/rst.nim Co-authored-by: Andreas Rumpf <rumpf_a@web.de> * Update compiler/docgen.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Update compiler/docgen.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Update compiler/docgen.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Update lib/packages/docutils/rst.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * rename `cmdDoc2` to `cmdDoc` * fix (P)RstSharedState convention * new style of initialization * misc suggestions * 1 more rename * fix a regression Co-authored-by: Andreas Rumpf <rumpf_a@web.de> Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
* fixes #18058 (#18162)Andreas Rumpf2021-06-031-0/+2
|
* config system: special case -d:release and -d:danger [backport:1.4] (#18051)Andreas Rumpf2021-05-201-4/+15
|
* `doc2tex`: generate docs to Latex (#17997)Andrey Makarov2021-05-141-0/+1
| | | | | * `doc2tex`: generate docs to Latex * address some comments
* fixes #15848 [backport:1.2] (#17959)Andreas Rumpf2021-05-071-1/+2
|
* system.nim cleanup some exported constants which should never have be… ↵Andreas Rumpf2021-05-011-4/+1
| | | | | | (#17909) * system.nim cleanup some exported constants which should never have been exported
* add `--processing:dots|filenames|off` to customize `hintProcessing` (#17817)Timothee Cour2021-04-231-0/+10
|
* `--filenames:abs|canonical|legacyRelProj` for filenames in compiler msgs ↵Timothee Cour2021-04-211-1/+17
| | | | | | | (replaces `--listfullpaths:on|off`) (#17746) * use canonicalImport for filename_magicSauce * --filenames:abs|canonical|magic * rename: magic => legacyRelProj
* IC navigator: added support for include files (#17784)Andreas Rumpf2021-04-191-24/+45
| | | | | | | | | | | | | | | | | * ic fixed navigator crash when track wrong/missed Also fixed an issue with getNimcacheDir not observing the outDir. * closer, but not sure how to test[skip ci][ci skip] * IC navigator: added support for include files * update * make posix happy via expandFilename * update Co-authored-by: Saem Ghani <saemghani+github@gmail.com>
* IC: first steps towards 'nim check --def --ic:on' (#17714)Andreas Rumpf2021-04-141-0/+3
| | | | | | | | | * IC: first steps towards 'nim check --def --ic:on' * IC navigator: deduplicate output lines * IC navigator: progress * IC navigator: use a different nimcache entry * IC navigator: special logic for templates/macros * IC navigator: proper error messages * IC navigator: prepare for testing code; document only what currently works somewhat
* fix #2844 #3911; add --spellsuggest to suggest symbols in scope with similar ↵Timothee Cour2021-03-161-0/+4
| | | | | | | spellings on undefined symbol error (#16067) * add --spellsuggest to suggest symbols in scope with similar spellings on undefined symbol errors * implement --spellsuggest with 0 arguments
* fix #17267 (#17273)flywind2021-03-071-2/+5
| | | | | | | | | | | | | | | | | * remove unnecessary when statement * remove outdated codes * reuse jsffi * move js json coverage * fix #17267 * address comments * Update compiler/main.nim * Update tests/threads/tjsthreads.nim
* follow #17245 deprecate refchecks (#17261)flywind2021-03-051-2/+6
| | | | | * follow #17245 deprecate refchecks * changelog * address comments
* deprecate newruntime (#17245)flywind2021-03-041-0/+1
| | | | | | * deprecate newruntime * tests * Update compiler/commands.nim
* followup #17225: simplify code after removing gc2, generational (#17242)Timothee Cour2021-03-031-6/+5
|
* fix #16731: using deprecated flags triggers a warning (#17225)Timothee Cour2021-03-021-23/+19
| | | | | | * using deprecated flags triggers a warning * cleanups * fixup * address comments
* `--nilseqs` is now a deprecated noop (#17211)Timothee Cour2021-03-011-2/+4
| | | | | * --nilseqs is now a deprecated noop * fix tests; fix: future => sugar
* document `since` (#17048)Timothee Cour2021-02-161-5/+3
| | | | * document `since` * address comment
* `--hintAsError` (#16763)Timothee Cour2021-01-201-4/+6
| | | | | | | * --hintAsError * add test, changelog * condsyms
* Deprecate TaintedString (#15423)Juan Carlos2021-01-151-2/+2
| | | | Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> Co-authored-by: Dominik Picheta <dominikpicheta@googlemail.com>
* IC: next steps (#16632)Andreas Rumpf2021-01-121-3/+3
| | | | | | | | | | | | | * removed dead code * beginnings of a rodfile reader * IC: record global VM state changes and pragma state changes * IC: replay pragmas and VM state changes * implemented rod load file simuation for easier, extensive testing * critical bugfix * IC: stress test logic; should also help with recursive module dependencies; WIP * IC: loading from .rod files begins to work reliably * removed ugly hacks * yet another silly mistake
* IC: next steps (#16550)Andreas Rumpf2021-01-071-8/+9
| | | | | | | | | | | | | | | | | | * cleanups * ast.nim: cleanups * IC: no more sym.tab field, stored externally in the module graph * nimble compiles again * rodfiles: store bitwidth of integers and the endianness in the cookie because we serialize 'int' directly * rodfiles: added compilerproc and export sections * rodfiles: added all the missing sections * rodfiles: track the missing information * IC: architecture for lazy loading of proc bodies * make tests green again * completed the lazy loading of proc bodies * symbol lookup integration, part 1 * symbol lookup integration, part 2 * symbol lookup integration, part 3 * make tcompilerapi work again * rodfiles: fixed config change handling
* make --gc:arc --exceptions:quirky work again [backport:1.4] (#16583)Andreas Rumpf2021-01-041-0/+4
| | | | | * make --gc:arc --exceptions:quirky work again [backport:1.4] * fixes #16404 [backport:1.4]
* big steps torwards an efficient, simple IC implementation (#16543)Andreas Rumpf2021-01-021-5/+0
| | | | | | | | | | | | | | | | | | | * reworked ID handling * the packed AST now has its own ID mechanism * basic serialization code works * extract rodfiles to its own module * rodfiles: store and compare configs * rodfiles: store dependencies * store config at the end * precise dependency tracking * dependency tracking for rodfiles * completed loading of PSym, PType, etc * removed dead code * bugfix: do not realloc seqs when taking addr into an element * make IC opt-in for now * makes tcompilerapi green again * final cleanups Co-authored-by: Andy Davidoff <github@andy.disruptek.com>
* fix #16346 rst2html now honors SuccessX (#16347)Timothee Cour2020-12-261-0/+7
| | | | | | | | | | | * fix #16346 SuccessX rst2html * cleanups * _ * _ * _
* add test for --eval; fix a minor bug (#16224)Timothee Cour2020-12-011-0/+1
|