Commit Graph

19145 Commits

Author SHA1 Message Date
Timothee Cour
4742e6e1fd followup #16714: add -d:nimLegacyUnarySlice + changelog (#17794) 2021-04-20 00:25:28 -07:00
Timothee Cour
68e7ed9c57 important_packages: allowed_failures batch (#17757)
* important_packages: reserve batch 0 for allowed failures

* custom batch name: allowed_failures
2021-04-20 09:02:35 +02:00
Timothee Cour
fb02b56957 support skip ci in azure pipelines, and support it properly in github actions pipelines (#17561)
* support skip ci in azure pipelines

* [skip ci] example of a commit that skips CI

* example of a commit that does not skip CI

* fix github actions logic for ci skip handling

* [skip ci] example of a commit that skips CI for all pipelines

* example of a commit that does not skip CI for any pipeline
2021-04-20 09:01:53 +02:00
Timothee Cour
6852d091b3 changelog: document hash changes (#17792)
* changelog: document hash changes

* fixup
2021-04-20 06:54:25 +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
24abe10aa8 Small privateAccess improvement (#17786) 2021-04-19 17:51:00 +02:00
Clyybber
438afb4db9 Introduce localErrorNode (#17785) 2021-04-19 17:19:21 +02:00
Clyybber
6de5aa1971 Rename = to =copy in stdlib (#17781) 2021-04-19 13:16:10 +02:00
flywind
bae7b5b779 fix #17732(forward args... to megatest) (#17780) 2021-04-19 11:48:26 +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
flywind
dc89b21257 [std/locks]close #7998(complete condition variables) (#17711)
* close #7998
* workaround genode

* Update lib/system/syslocks.nim
2021-04-19 10:51:13 +02:00
flywind
cedbc7035d [std/locks]remove workaround for withLock (#17772)
Ref #6113 and #6049

The workaround for generics instantiation is unnecessary. It seems to be fixed by another PR I guess.

The test still works. So the changes should be harmless.
https://github.com/nim-lang/Nim/blob/devel/tests/stdlib/tlocks.nim

I also add some inline pragmas.
2021-04-19 10:33:56 +02:00
Juan Carlos
f8038af5ec Documentation only, dom (#17770)
* ReSync with Devel

* ReSync

* https://github.com/timotheecour/Nim/issues/674

* Update lib/js/dom.nim

Co-authored-by: flywind <xzsflywind@gmail.com>

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
Co-authored-by: flywind <xzsflywind@gmail.com>
2021-04-19 07:42:38 +02:00
flywind
172a5ab7f8 [std/rlocks]add inline pragma (#17773)
so that it can be used as the base of new locks module with destructors.
2021-04-19 07:41:50 +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
Dankr4d
6916faf83c Fix #17755 (#17766)
Signed-off-by: Dankr4d <dude569@freenet.de>
2021-04-18 23:39:05 +02:00
Andreas Rumpf
c7b77829fe IC: fixes a long standing bug about DCE set computations (#17763) 2021-04-18 23:38:07 +02:00
Timothee Cour
42c6eec4ef fix #17749 ignore SIGPIPE signals, fix nim CI #17748 (#17752)
* fix #17749 SIGPIPE

* fix for windows
2021-04-18 15:34:29 +02:00
flywind
ca3fe63bab remove jstin from important packages (#17765)
Ref https://github.com/nim-lang/Nim/pull/17759

https://github.com/LemonBoy/jstin/blob/master/src/jstin.nim is already archived and cannot pass CI anymore.
2021-04-18 15:30:30 +02:00
Andreas Rumpf
7b6ab5109f IC exposes typedesc implementation shenanigans (#17759)
* IC exposes typedesc implementation shenanigans; so I change system.default's definition to what it should have been to begin with
* Update lib/system.nim

Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
2021-04-18 07:27:03 +02:00
shirleyquirk
c8b8cb8458 make cuchar alias uint8 instead of char (#17738) 2021-04-17 17:27:10 +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
flywind
5c5f356347 replace defer with try ... finally (#17753) 2021-04-17 11:48:22 +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
201ac2b9c9 fix nim CI following #17455 (same postmortem as #17721) (#17740) 2021-04-16 11:26:05 -07:00
Andreas Rumpf
957478ce26 removed nimfind tool, succeeded by 'nim check --defusages' (#17737) 2021-04-16 15:23:17 +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
shirleyquirk
fdd4391534 Fix buffer-overrun bug in net (#17728) [backport:1.0] 2021-04-16 14:22:51 +02:00
Timothee Cour
d19e4310dc std/hashes: hash(ref|ptr|pointer) + other improvements (#17731) 2021-04-16 14:21:26 +02:00
Timothee Cour
611b88763f start using import {.all.} (#17736) 2021-04-16 12:54:49 +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
flywind
12783dbcf0 make the copy operation of Thread an error (#17734) 2021-04-16 08:50:44 +02:00
shirleyquirk
95e8ddabb2 followup #17700 put changelog in wrong file (#17729)
* Allow use of colons inside fmt

allowing colons inside fmt by replacing the format specifier delimiter lets arbitrary nim code be run within fmt expressions.

* oops

* Update strformat.nim

* one space.

* Update lib/pure/strformat.nim

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>

* Update lib/pure/strformat.nim

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>

* changed parser to ignore ':' within parens

* Update strformat.nim

* Update lib/pure/strformat.nim

Co-authored-by: flywind <xzsflywind@gmail.com>

* formatting,documentation,backslash escapes

Adding support for evaluating expressions by special-casing parentheses causes this regression: `&"""{ "(hello)" }"""` no longer parses.
In addition, code such as &"""{(if open: '(' else: ')')}""" wouldn't work.
To enable that, as well as the use of, e.g. Table constructors inside curlies, I've added backslash escapes.
This also means that if/for/etc statements, unparenthesized, will work, if the colons are escaped, but i've left that under-documented.

It's not exactly elegant having two types of escape, but I believe it's the least bad option.

* not sure about how this works

* changelog

* changelog

* added json strformat test

* pulled my thumb out and wrote a parser

* more escapes and string tests

* ok, now i'm sure it's broken but cant get a failing test

* found it

* ok, that'll do

* did i delete this?

* spcng

* spacing

* messed up where changelogs are supposed to go

* ocd

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
Co-authored-by: flywind <xzsflywind@gmail.com>
2021-04-15 22:45:51 +02:00
flywind
5c12c711f7 follow up #17518 (#17726) 2021-04-15 19:25:35 +02:00
flywind
3f56b9944e follow up #17536 (#17727) 2021-04-15 19:25:03 +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
Clyybber
51a40c1f38 Fix getCustomPragmaVal for some multi arg pragmas (#17723)
* Fix getCustomPragmaVal for some multi arg pragmas

* Bootstrap fix
2021-04-15 13:55:50 +02:00
Andrey Makarov
f8dce493d3 rst indentation fixes (ref #17340) (#17715) 2021-04-15 08:12:44 +02:00
Timothee Cour
ae9231cfeb fix CI tests/errmsgs/tgcsafety.nim (#17721) 2021-04-14 13:45:25 -07:00
Andreas Rumpf
eff9d75379 IC: rodfiles: no floats (#17720) 2021-04-14 22:35:18 +02:00
Timothee Cour
d6242d7fe1 simplify asyncfutures, asyncmacro (#17633) 2021-04-14 21:22:22 +02:00
Arne Döring
56c37759d6 getCustomPragma is split up in more usable chunks (#11526)
* getCustomPragma is split up in more usable chunks
* changelog entry
* fix for style checks
* shitty typedesc special casing
* Add since annotation and remove typedesc comments
* Fix typo
* Revert since annotation because it breaks bootstrapping
* Export getCustomPragmaNode conditionally
* Reduce code duplication
* Update since
* Update lib/core/macros.nim
* Apply suggestions from code review

Co-authored-by: Clyybber <darkmine956@gmail.com>
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2021-04-14 20:42:09 +02:00
flywind
44657b78c4 callback cannot be nil (#17718)
`Task.callback` cannot be nil, we need to raise it at debug and release mode

Situations:
- if users create a Task object without using `toTask` and invoke the Task
- if users already move the Task and invoke the Task
2021-04-14 19:14:14 +02:00