summary refs log tree commit diff stats
path: root/compiler/msgs.nim
Commit message (Collapse)AuthorAgeFilesLines
* special handlings for nimble packages to shorten function names (#23891)ringabout2024-08-111-25/+0
| | | | | | | | | | | | | | | | | | | If we need keep readabilities for functions' names, we might put the original names in the comments or in the identifiers like what currently has been done. The new nimble having been shipped since Nim 2.0.0 uses a directory ending with a full hash of a commit for cloned repos, the function names are burderen by this. This PR strips these from package paths and prepends "pkg" for readability. Before: raiseNilAccess__OOZOOZOnimbleZpkgs2Zthreading450O2O045288108d1dfa34d5ade5ce4d922af51909c83cebfZthreadingZsmartptrs_u4 After: raiseNilAccess__pkgZthreadingZsmartptrs_u4
* improve mangling packages version names with checksums (#23888)ringabout2024-07-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | follow up https://github.com/nim-lang/Nim/pull/19821 dights cannot clash with letters 'Z' and 'O' For `threading-0.2.0-288108d1dfa34d5ade5ce4d922af51909c83cebf` Before: raiseNilAccess__OOZOOZOnimbleZpkgs50Zthreading4548O50O4845505656494856d49dfa5152d53ade53ce52d575050af5349574857c5651cebfZthreadingZsmartptrs_u4 After: raiseNilAccess__OOZOOZOnimbleZpkgs2Zthreading450O2O045288108d1dfa34d5ade5ce4d922af51909c83cebfZthreadingZsmartptrs_u4 <del> nimble or something might use `git rev-parse --short HEAD` to shorten the length of package version names ref https://github.com/nim-lang/nimble/pull/913 </del>
* * fix for the debug line info code generation (#23488)Nikolay Nikolov2024-04-221-4/+7
| | | | Previously, in certain cases, the compiler would generate debug info for the correct line number, but for the wrong .nim source file.
* fixes addr/hiddenAddr in strictdefs (#23477)ringabout2024-04-101-2/+2
|
* fix: use `ErrorColor` for hints marked as errors (#23430)Igor Sirotin2024-03-211-1/+2
| | | | | | | | | | | | # Description When using `--hintAsError`, we want some red color to appear in the logs. Same is already done for `warningAsError`. # Cherry-picking to Nim 1.6 Would be nice to cherry-pick this and the `warningAsError` log highlight to 1.6 branch, as it's used in status-desktop.
* Fixes #23337; When NimScript errors prevents NimSuggest from Init (#23338)Juan M Gómez2024-02-221-1/+5
|
* * fixed nimsuggest crash when opening a .nim file, that contain a {.fatal: ↵Nikolay Nikolov2024-02-201-1/+2
| | | | "msg".} pragma. (#23325)
* fixes yet another strictdefs bug (#23069)ringabout2023-12-151-8/+6
|
* Fix using `--stdout` with `jsondoc` (#22925)Jake Leahy2023-11-091-0/+2
| | | | | | | | | | | Fixes the assertion defect that happens when using `jsondoc --stdout` (There is no outfile since its just stdout) ``` Error: unhandled exception: options.nim(732, 3) `not conf.outFile.isEmpty` [AssertionDefect] ``` Also makes the output easier to parse by ending each module output with a new line.
* use strictdefs for compiler (#22365)ringabout2023-08-061-1/+5
| | | | | | | | | | | | | | | * wip; use strictdefs for compiler * checkpoint * complete the chores * more fixes * first phase cleanup * Update compiler/bitsets.nim * cleanup
* Tolerate markup errors for doc comments (#19607) (#22235)Andrey Makarov2023-07-071-2/+4
| | | | | | | | | | | | | | | | | Follow-up to #21576 (for solving #19607). 1) errors in Markdown mode for `.nim` doc comments are reported with red color but allow to generate `.html` with the comment represented by literate block (monospaced text). We suppose that it's what people want for (supposedly) small doc comments. And this behavior is also a bit more Markdown-ish in the sense that Markdown generally does not have the concept of parsing error. - However, for standalone `.md` it's **not** applied because for large files the consequences are way bigger. (In {.doctype: rst.} mode the behavior is the same as before -- report the error and stop.) In future, when our parser can handle Markdown without errors according to the spec, this code will most probably be not needed.
* adds an experimental `mm:atomicArc` switch (#21798)ringabout2023-05-081-2/+2
|
* 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.".