Commit Graph

6891 Commits

Author SHA1 Message Date
Andreas Rumpf
fb86271556 system.nim cleanup some exported constants which should never have be… (#17909)
* system.nim cleanup some exported constants which should never have been exported
2021-05-01 11:10:40 +02:00
Timothee Cour
d0485e326a bring back std/ prefix within compiler and ensure it works in bootstrap + bsd (#17902)
* [WIP] bring back std/ prefix within compiler and ensure it works in bootstrap + bsd

* refs https://github.com/nim-lang/Nim/pull/16282#discussion_r616846863
* sounds very similar to https://github.com/nim-lang/Nim/pull/14291
* more: vmops
* update tools/ci_generate.nim
* auto-generate freebsd.yml as well, to avoid duplication with openbsd.yml
* cleanup
* undo temporary CI removal
2021-04-30 22:27:53 +02:00
Timothee Cour
3192995ac9 close #16646; since now works with bootstrap nim post csources_v1 (#17895)
* revive #16627 now that csources_v1 was merged

* use dedent in rst.nim, refs https://github.com/nim-lang/Nim/pull/17257#discussion_r589025683

* fix test and improve rendering of a rst warning
2021-04-30 18:54:47 +02:00
Clyybber
76f93877cd Small parser loop fix (#17904)
* Fix loop on error with nim check in semiStmtList
* Add test
2021-04-30 17:17:29 +02:00
Andrey Makarov
1640508348 more strict RST inline markup parsing (#17827)
* more strict RST inline markup parsing
* add test for unexpected bonus
* introduce `roPreferMarkdown`
2021-04-29 17:31:15 +02:00
Timothee Cour
87229e272e fix #17853 (ascii message separator broke json nim dump) (#17887) 2021-04-29 02:25:08 -07:00
Timothee Cour
927ae26fad externalToLink: use quoteShell to avoid issues with spaces in paths for {.link.} pragmas (#17875) 2021-04-29 09:01:00 +02:00
c-blake
601c050fcb Implement https://forum.nim-lang.org/t/7848#50018 (#17874)
* Implement https://forum.nim-lang.org/t/7848#50018 with just the same
`SuccessX` hint category, build mode on a separate, final line, and
no change to how the mode is spelled for -d:release/-d:danger.

* Change to add a new BuildMode hint category and keep testament in sync
as per comment.

* Add "--hint:buildmode:off" to `defaultHintsOff`.

* Remove as requested.

* As requested for tests clean up.

* Address code review.

* Address code review.

* Mirror db45642311
2021-04-29 08:55:43 +02:00
Clyybber
b03d6c9b2f Fix #17712 (#17873) 2021-04-27 13:03:26 +02:00
flywind
68e522ecec Remove confusing <//> (#17830) 2021-04-26 09:04:52 +02:00
Saem Ghani
17db15f9b1 fix #17836 (typed macro isNil for proc params) (#17841)
thanks @alaviss for the test
2021-04-25 10:30:52 +02:00
Timothee Cour
ffe4328b35 --usenimcache (implied by nim r main) now caches some compile options to avoid recompiling when project was previously compiled with such options. (#17829)
* `--usenimcache` (implied by `nim r main`) now caches some compile options
to avoid recompiling when project was previously compiled with such options.

* works
* add test
* changelog
* use std/with
2021-04-25 10:25:31 +02:00
flywind
6e8f0f8cfc add colon (#17834) 2021-04-24 18:33:29 +01:00
Timothee Cour
80df21d9a3 --declaredlocs now shows location for T instead of static in proc fn(a: static T) (#17795) 2021-04-23 23:22:04 +02:00
Timothee Cour
2abc936d51 typeof(voidStmt) now works (#17807)
* `typeof(voidStmt)` now works
* remove typeOrVoid
* add condsyms, and reference cligen https://github.com/c-blake/cligen/pull/193
* fixup
* changelog [skip ci]
* fixup
2021-04-23 14:36:38 +02:00
Andreas Rumpf
511b6d2449 typos (#17824) 2021-04-23 13:50:27 +02:00
Timothee Cour
e4a3feeb92 add --processing:dots|filenames|off to customize hintProcessing (#17817) 2021-04-23 08:07:22 +02:00
Sivchari
fb32fff8dc js generates spurious >>> on shr (#17767)
* js generates spurious >>> on shr
* Add shr arithmetic test
* fix variables from const to let during testing
2021-04-21 19:47:01 +02:00
flywind
4471141a1d fix #7535(Poor error message for spawn when a procedure (without calling it)) (#17774) 2021-04-21 17:53:31 +02:00
Clyybber
80389b8053 Revert localErrorNode param order changes (#17809)
* Revert localErrorNode param order changes

* Remove unused globalError overload

* heh
2021-04-21 16:03:30 +02:00
Timothee Cour
da1c1a7117 --filenames:abs|canonical|legacyRelProj for filenames in compiler msgs (replaces --listfullpaths:on|off) (#17746)
* use canonicalImport for filename_magicSauce
* --filenames:abs|canonical|magic
* rename: magic => legacyRelProj
2021-04-21 15:26:27 +02:00
Timothee Cour
2951f89374 improve errmsg refs #17793 object ctor with generics (#17806) 2021-04-21 10:52:17 +02:00
Andreas Rumpf
a9b62de895 CIs: attempt to use csources_v1 (#16282)
* CIs: attempt to use csources_v1
* also updated the BSDs
* also updated azure pipelines
* std modules should not itself use the 'std/' import dir...
* compiler has to be careful with std/ for v1 booting
2021-04-21 07:41:33 +02:00
Timothee Cour
8de053d870 fix hintMsgOrigin regression + simplify msgs code (#17805) 2021-04-21 07:00:45 +02:00
Andreas Rumpf
0b116310bf unit separator (#17730)
* use the ASCII Unit Separator so that error messages can be handled precisely by the tooling
* updated testament
2021-04-20 16:30:17 +02:00
flywind
c776498170 close #9691 and close #10913('spawn'ed function cannot have a 'typed' or 'untyped' parameter) (#17775) 2021-04-20 15:39:58 +02:00
Andreas Rumpf
54fe44135e updated the documentation (#17796) 2021-04-20 15:24:20 +02:00
Timothee Cour
ad67bcf379 fix https://github.com/nim-lang/RFCs/issues/311 remove unary slice (#16714) 2021-04-19 19:02:52 -07:00
Andreas Rumpf
3b80f0dc8e IC navigator: added support for include files (#17784)
* 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>
2021-04-19 22:37:09 +02:00
Clyybber
438afb4db9 Introduce localErrorNode (#17785) 2021-04-19 17:19:21 +02:00
Andreas Rumpf
4b0b536419 ic refactoring (#17778)
* minor IC documentation update

* IC: refactoring: removed the 'shared' type and fields, these were a leftover from an earlier design
2021-04-19 11:48:06 +02:00
flywind
83fa0fc843 fix #12521(type alias for openArray) (#17593)
* fix nim js cmp fails at CT

* fix #12521

* address comments
2021-04-19 11:21:35 +02:00
Saem Ghani
5042cb956b [ci skip] document compiler/ic/rodfiles.nim (#17771)
* [ci skip] document compiler/ic/rodfiles.nim

Why?
* understand how rodfile module works and a bit of the format
* leave notes behind for others
* rather than Araq guess what others need, he can fix what other glean
* possible model for making the compiler more aproachable

Bonus:
* might have found a minor bug in `loadSection`

* Update compiler/ic/rodfiles.nim

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2021-04-19 07:40:08 +02:00
Timothee Cour
0a10af5a2c privateAccess now works with ref | ptr (#17760) 2021-04-19 00:15:58 +02:00
Timothee Cour
d6c8efa5d4 declaredlocs followup: handle cannot instantiate errors (#17745) 2021-04-19 00:03:24 +02:00
Andreas Rumpf
c7b77829fe IC: fixes a long standing bug about DCE set computations (#17763) 2021-04-18 23:38:07 +02:00
Tanguy Cizain
8e124da75d fix range to unsigned conversion (#17754) 2021-04-17 15:34:00 +02:00
Timothee Cour
5c9c1988f6 -d:nimDebug: calls doAssert false instead of quit (#17739) 2021-04-17 11:49:54 +02:00
Timothee Cour
7e94420847 cString => cSourceString; tyCString => tyCstring so that error msgs show cstring, not cString (#17744) 2021-04-17 11:14:09 +02:00
Andreas Rumpf
8e474fbb57 IC: yet another embarrassing omission (#17743)
* IC: yet another embarrassing omission

* VM: fewer hacks that kept IC from working
2021-04-17 01:12:12 +02:00
Timothee Cour
1b65b9cc19 refs #17292 fix repr: (discard) now does't render as discard which gave illegal code (#17455)
* refs #17292 fix `repr` with (discard)
* add tests
* add more tests
2021-04-16 14:55:51 +02:00
Andreas Rumpf
606288974f ic navigator tests (#17735)
* IC navigator: first basic test
2021-04-16 12:20:43 +02:00
Timothee Cour
8161b02897 import foo {.all.} reboot (#17706) 2021-04-16 09:16:39 +02:00
Tanguy Cizain
363467fc00 Fix array's high & low return type for empty arrays (#17705)
* fix array.high/low return type

* Add test for empty array low return type

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
2021-04-15 15:45:38 +02:00
Andreas Rumpf
eff9d75379 IC: rodfiles: no floats (#17720) 2021-04-14 22:35:18 +02:00
Andreas Rumpf
67e28c07f9 IC: first steps towards 'nim check --def --ic:on' (#17714)
* 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
2021-04-14 16:44:37 +02:00
Timothee Cour
840e13deb7 type with same name in different scope now works (#17710)
* type with same name in different scope now works
* fix tests/enum/tenum.nim which was wrong because it was affected by this bug
2021-04-14 08:50:15 +02:00
Andreas Rumpf
8e6b87a917 IC: code cleanup (#17708) 2021-04-13 10:43:16 +02:00
Andreas Rumpf
4f5709e326 IC: serialization bugfix (#17701) 2021-04-13 07:23:29 +02:00
Andreas Rumpf
4780b08b9d IC: integrity checking (#17695)
* IC: integrity checking: the plumbing code
* progress
* progress + bugfix (yes, the code already found a bug)
* implemented integrity checking
2021-04-11 17:37:32 +02:00