summary refs log tree commit diff stats
path: root/compiler/msgs.nim
Commit message (Collapse)AuthorAgeFilesLines
* Use `ErrorColor` when a warning that is turned into an error is raised (#21131)Jake Leahy2022-12-221-1/+2
| | | Use ErrorColor when a warning that is turned into an error is raised
* Implement setLineInfo (#21153)Peter Munch-Ellingsen2022-12-221-0/+7
| | | | | * Implement setLineInfo * Add tests
* remove compiler/strutils2.nim (#20748)Bung2022-11-051-7/+7
| | | | | | | | | * use std strutils toLowerAscii char * avoid additional call and assign * remove compiler/strutils2.nim * canonical
* Make rstgen work with gcsafe (#20534)ringabout2022-10-101-1/+1
| | | | | | | | | | | * Make rstgen work with gcsafe Co-authored-by: Danil Yarantsev <tiberiumk12@gmail.com> * add tests and fixes * if nimHasWarningAsError Co-authored-by: Danil Yarantsev <tiberiumk12@gmail.com>
* no ropes WIP (#20433)Andreas Rumpf2022-09-271-7/+7
| | | | | | | | | | | | | * refactorings in preparation for ropes elimination of the C code generator; mostly the usual ': Rope' -> 'result: var Rope' rewrite * rewrote ccgcalls.nim * refactored ccgexprs.nim * ccgliterals: refactoring * refactoring: code dealing with name mangling * refactoring: getRecordFieldsAux * ropes are strings (insert obscene joke here) * optimize JS code gen * optimizations and code improvements * more optimizations * final cleanups
* remove `shallow` usages for ORC (#20109)ringabout2022-08-231-1/+2
|
* fixes #20149; fixes #16762; hintAsError and warningAsError now ignore ↵ringabout2022-08-191-7/+5
| | | | | | | | | | | | | | | | | | | foreign packages (#20151) * fixes #20149; hintAsError/warningAsError ignores foreign packages * add changelog * fixes the test * remove * fixes tests again * fix * I'm careless Co-authored-by: xflywind <43030857+xflywind@users.noreply.github.com>
* remove shallowCopy for ARC/ORC (#20070)ringabout2022-07-261-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | * remove shallowCopy for ARC/ORC * use move * fix * more fixes * typo * Update lib/system.nim * follow * add nodestroy * move * copy string * add a changelog entry Co-authored-by: xflywind <43030857+xflywind@users.noreply.github.com> Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* Change `styleCheck` to ignore foreign packages (#19822)quantimnot2022-07-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Change `styleCheck` to ignore foreign packages * Symbols from foreign packages are now ignored. * Fixed `styleCheck` violations in `compiler` package. * Added symbol ownership to custom annotation pragmas. * Minor refactors to cleanup style check callsites. * Minor internal documentation of reasons why a symbol isn't checked. Style violations were fixed in the compiler after thet were exposed by the changes. The compiler wouldn't compile otherwise. Symbol ownership for custom pragma annotations is needed for checking the annotation's style. A NPE was raised otherwise. Fixes #10201 See also nim-lang/RFCs#456 * Fix a misunderstanding about excluding field style checks I had refactored the callsites of `styleCheckUse` to apply the DRY principle, but I misunderstood the field access handling in a template as a general case. This corrects it. * Fix some `styleCheck` violations in `compiler/evalffi` The violations were exposed in CI when the compiler was built with libffi. * Removed some uneeded transitionary code * Add changelog entry Co-authored-by: quantimnot <quantimnot@users.noreply.github.com>
* rename gc to mm (#19971)flywind2022-07-051-1/+1
|
* move assertions out of system (#19599)flywind2022-03-231-0/+4
|
* [wip]better hint message for JS (#18704)flywind2021-08-181-10/+21
| | | | | * better hint message for JS * both
* added missing .inline for toCCharAraq2021-07-261-1/+1
|
* followup #18252: show special flags -d:danger, -d:release when given (#18451)Timothee Cour2021-07-081-0/+4
|
* refs #18278: do not gag fatal msgs (#18290)Timothee Cour2021-06-181-4/+11
|
* merge BuildMode into SuccessX, remove code duplication w drnim, add useful ↵Timothee Cour2021-06-141-4/+39
| | | | | | | | | | | info to successx, add gc to compilesettings (#18252) * merge BuildMode into SuccessX, add more info * refactor duplicated with drnim * fixup * address comment
* fixes #18058 (#18162)Andreas Rumpf2021-06-031-8/+4
|
* add astmsgs; add `declared in` msg for usage lint errors (#17961)Timothee Cour2021-05-081-2/+2
| | | | | | | | | * add astmsgs; add `declared in` msg for usage lint errors * fix test * fix tests/tools/tlinter.nim * std prefix
* fix #17853 (ascii message separator broke json nim dump) (#17887)Timothee Cour2021-04-291-0/+1
|
* add `--processing:dots|filenames|off` to customize `hintProcessing` (#17817)Timothee Cour2021-04-231-1/+1
|
* Revert localErrorNode param order changes (#17809)Clyybber2021-04-211-3/+0
| | | | | | | * Revert localErrorNode param order changes * Remove unused globalError overload * heh
* `--filenames:abs|canonical|legacyRelProj` for filenames in compiler msgs ↵Timothee Cour2021-04-211-15/+9
| | | | | | | (replaces `--listfullpaths:on|off`) (#17746) * use canonicalImport for filename_magicSauce * --filenames:abs|canonical|magic * rename: magic => legacyRelProj
* fix `hintMsgOrigin` regression + simplify msgs code (#17805)Timothee Cour2021-04-211-4/+1
|
* unit separator (#17730)Andreas Rumpf2021-04-201-26/+35
| | | | | * use the ASCII Unit Separator so that error messages can be handled precisely by the tooling * updated testament
* IC navigator: added support for include files (#17784)Andreas Rumpf2021-04-191-0/+3
| | | | | | | | | | | | | | | | | * 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>
* -d:nimDebug: calls doAssert false instead of quit (#17739)Timothee Cour2021-04-171-1/+2
|
* IC: first steps towards 'nim check --def --ic:on' (#17714)Andreas Rumpf2021-04-141-1/+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
* nnkArglist => nnkArgList + special case stylecheck:error (#17529)Timothee Cour2021-03-271-3/+3
| | | | | * nnkArglist => nnkArgList * special case stylecheck:error
* IC: green tests (#17311)Andreas Rumpf2021-03-191-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * IC: renamed to_packed_ast module to ic module * IC: don't store the --forceBuild flag, makes it easier to test * IC: enable hello world test * Codegen: refactorings for IC; changed the name mangling algorithm * fixed the HCR regressions * life is too short for HCR * tconvexhull is now allowed to use deepCopy * IC exposed a stdlib bug, required a refactoring * codegen: code cleanups * IC: even if a module is outdated, its dependencies might come from disk * IC: progress * IC: better name mangling, module IDs are not stable * IC: another refactoring helping with --ic:on --gc:arc * disable arraymancer on Windows for the time being * disable arraymancer altogether * IC: make basic test work with 'nim cpp' * IC: progress on --ic:on --gc:arc * wip; name mangling for type info
* `--nilseqs` is now a deprecated noop (#17211)Timothee Cour2021-03-011-0/+3
| | | | | * --nilseqs is now a deprecated noop * fix tests; fix: future => sugar
* IC: next steps (#16729)Andreas Rumpf2021-01-231-1/+1
| | | | | | | | | | | * IC: dead code elimination pass * preparations for a different codegen strategy * added documentation to the newly written code * IC: backend code * IC: backend adjustments * optimized the compiler a bit * IC: yet another massive refactoring * fixes regressions * cleanups
* `--hintAsError` (#16763)Timothee Cour2021-01-201-2/+6
| | | | | | | * --hintAsError * add test, changelog * condsyms
* fix `hintProcessing` dots interference with `static:echo` and `hintCC`; add ↵Timothee Cour2020-12-301-5/+7
| | | | | | | | | | tests for `nim secret`, add tests for hintProcessing, misc other bug fixes (#16495) * fix dots interfering with static:echo * add tests * fix hintProcessing dots for hintCC * improve trunner tests * fix bug: readLineFromStdin now writes prompt to stdout, consistent with linenoise and rdstdin * disable a failing test for windows
* fix `nim secret` dots interfering with prompt (#16491)Timothee Cour2020-12-281-2/+2
| | | | | * fix nim secret dots * cleanups
* fix #16334 (#16335)RSDuck2020-12-141-5/+9
| | | | | | | | | * fix #16334 * rename isstdout -> isStdout * separate lastMsgWasDot for stdout and stderr * simplify logic
* fix #16265; fix #13999 (HCR on OSX); cgen now does not line wrap string ↵Timothee Cour2020-12-141-3/+5
| | | | | | | | | | | | | | | | | litterals (#16329) * fix #16265: cgen now does not line wrap string litterals which, in combination with other hacks, caused a really obscure looking bug * fix #13999; nimhcr_integration.nim now works for osx * try to make appveyor CI disappear * disable openbsd + add diagnostic for openbsd * enable for openbsd * PTEMP * re-disable openbsd
* remove unused and misleading FilenameOption.foShort (#15982)Timothee Cour2020-11-161-2/+0
|
* Correct all eggs (#15906)Miran2020-11-101-4/+4
| | | | * "eg" is a misspelled "egg", "e.g." is "exempli gratia" * Also, "ie" is "i.e.".
* new: `nim -e:cmd` to run a command directly; also fixes #15731 (#15687)Timothee Cour2020-11-091-0/+1
| | | | | | | | | | | | | | | * 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>
* Use modern enums in compiler (#15775)cooldome2020-11-021-3/+3
|
* Big compiler Cleanup (#14777)Clyybber2020-08-281-6/+3
|
* `hintMsgOrigin` now works in VM code (#14678)Timothee Cour2020-06-161-3/+3
| | | | | * `hintMsgOrigin` now works in VM code * remove a simplification for now
* misc cleanups in compiler msgs: use toHumanStr, etc (#14677)Timothee Cour2020-06-151-3/+4
|
* fix #14545 windows CI docs (#14590)Timothee Cour2020-06-101-3/+15
| | | | | | * fix #14545 windows paths * add lib/std/private/strutils2.nim * remove dependency strutils2 => strutils * address comment: lib/std/private/strutils2.nim => compiler/strutils2.nim
* bug fixes with sfMainModule, hints, mainPackageNotes, mainPackageId, ↵Timothee Cour2020-06-041-0/+2
| | | | | | | hintSuccessX (#14555) * SuccessX `out` now works with --compileOnly and jsonscript; fix bugs in jsonscript * several bug fixes; eg: `nim doc lib/system/io` now is sane * dummy edit to force docs CI
* Change severity of template instantiation message [backport] (#14526)Danil Yarantsev2020-06-011-1/+1
| | | | | | | * Change severity of template instatiation msg * Add a test * Trailing newline argh
* fixes --warningAsError implementation (#14538)Andreas Rumpf2020-06-011-1/+5
|
* fix #8871 runnableExamples now preserves source code comments, litterals, ↵Timothee Cour2020-05-281-8/+15
| | | | | | | | | | | and all formatting; other bug fix (#14439) * fix #8871 runnableExamples now preserves source code comments, litterals, and all formatting * remove orig deadcode from getAllRunnableExamplesImpl * fix expected examples * add test to close https://github.com/nim-lang/Nim/issues/14473 * correctly handle regular comments before 1st token inside runnableExamples * add test to answer https://github.com/nim-lang/Nim/pull/14439#discussion_r431829199 * update tests
* make it easier to figure out how to debug issues (#14477)Timothee Cour2020-05-281-3/+4
|
* fix #6583, fix #14376, index+search now generated for all projects, many bug ↵Timothee Cour2020-05-251-1/+9
| | | | | | | | | fixes with nim doc (#14324) * refs #6583 fix nim doc output * changelog * change default for outDir when unspecified * cleanups * --project implies --index