Commit Graph

17962 Commits

Author SHA1 Message Date
Tomáš Hübelbauer
725c7caa02 Remove bit about opening files not raising (#15654)
Resolved #473 

I am removing this bit because this advice to not throw on recoverable-from cases like a file failing to open is actually not respected by Nim standard library. `readFile` and `readLines` both throw and exceptions must be used as a method of control flow for the recovery from that. There are alternatives, like opening a file handle instead of using these helpers, but that's less convenient than these helper methods for cases where you really want to just slurp up a file to memory and use a fallback value if it doesn't exist or is for whatever reason not readable.
2020-10-20 13:36:19 +02:00
narimiran
5e9dd81baa more "eg" fixes 2020-10-20 10:51:50 +02:00
narimiran
0a686659d2 it is not "eg", it is "e.g." 2020-10-20 10:47:43 +02:00
Timothee Cour
4ab1bd7e33 workaround https://github.com/citycide/glob/issues/49 glob broken (#15647) 2020-10-19 20:06:06 -07:00
Clyybber
f20e485827 Fix commentOffsetA for doc comments (#15643) 2020-10-20 01:19:49 +02:00
Clyybber
0f4b1ed270 Fix #15639 (#15640) 2020-10-19 22:39:50 +02:00
n5m
436e1fa5b1 fix #15631 (#15632)
* trigger valgrind failure on memory leak

* remove non-malloc tests

* remove ORC test

is redundant because we already have an ARC test

* only run valgrind tests on 64-bit Linux

* disable freebsd and openbsd

* Remove tleak_refc

As to not test implementation details (or bug)

* Fix test failures by removing redundant test

Since this tests/shoulfail/tvalgrind.nim was specified here to fail this test
itself fails since it will be skipped on non-linux CI

* Remove test, reason detailed in the previous commit

* Remove redundant disables

* Revert removing disables

* Add and use valgrind: leaks

* Fix

Co-authored-by: Clyybber <darkmine956@gmail.com>
Co-authored-by: n5m
2020-10-19 22:25:43 +02:00
cooldome
833035bacd arc allocation method aligned (#15588)
* progress

* fix typo
2020-10-19 14:50:06 +02:00
Timothee Cour
67afe72e9c contributing docs: add instructions for economically restarting failed CI jobs, debugging failed CI (#15576)
* contributing docs: add instructions for economically restarting failed CI jobs, debugging failed CI

* fixup
2020-10-19 14:49:06 +02:00
Timothee Cour
7526472a6e add a section on naming new stdlib module names (#15590) 2020-10-19 14:14:43 +02:00
cooldome
04f8fcfbd0 Tables, use sink val arguments more actively (#15625) 2020-10-19 14:13:26 +02:00
Danil Yarantsev
d22ab0fb96 Add tests to #15363 (#15633) 2020-10-19 13:16:56 +02:00
Danil Yarantsev
b4c3bcd037 Merge pull request #15635 from nim-lang/discord-blue
Change discord's badge color to be consistent with other badges
2020-10-19 14:03:20 +03:00
Danil Yarantsev
528069a967 Change discord's badge color to be consistent with other badges 2020-10-19 14:02:51 +03:00
Danil Yarantsev
9c34d6ee09 Add discord to the README (#15634) 2020-10-19 12:58:33 +02:00
n5m
78cbb52fa0 add tests for #15584 (#15619)
* add test for #15584

* Rename userlocks.nim to trlocks.nim

* add bug comment

* improve cmd

* reference bugfix, not bug

* add test that runs rlocks

* disallow joining

joining with other test cases (e.g., a test case that invokes `RLock.initRLock()`) may cause this test to compile, when the goal is to test if these lines can be compiled in isolation
2020-10-18 12:57:13 -04:00
Euan
ba2a477e64 Fix FreeBSD build failures (#15613)
The FreeBSD is/was failing, due to a conflict with installing Git.

Git is guaranteed to be in the base image, so this removes that package from the package list. It also reverts back to the built-in `packages` tag since it's officially supported.

Should the build fail in the future, the best place to go is the #sr.ht channel on freenode.
2020-10-18 05:26:36 -04:00
n5m
b16b2eb06f document that Nim executable must be included (#15611) 2020-10-17 20:30:12 +02:00
Clyybber
66cd9c2e57 Fix #15599 (#15601)
* Fix #15599

* Add test
2020-10-16 18:03:01 +02:00
narimiran
6b8baab536 cosmetic fixes for the 1.4 changelog [ci skip] 2020-10-16 13:18:31 +02:00
narimiran
091ec916fd add bufixes for 1.4 in its changelog 2020-10-16 08:13:23 +02:00
narimiran
f8890a0804 change NimVersion to 1.5.1 2020-10-16 07:36:09 +02:00
narimiran
6349001879 create a changelog for 1.4.0 2020-10-16 07:16:46 +02:00
n5m
b50a0ee95c fix option formatting (#15591) 2020-10-15 16:43:20 -07:00
Andreas Rumpf
a43202ea57 fixes #15560 (#15587) 2020-10-15 15:49:00 +02:00
shirleyquirk
4ef255b69d fix rlock compilation failure (#15584)
* change SysLockType_Reentrant

fix edge case where using SysLockType_Reentrant doesn't trigger an #include pthread.h

* syslocktype_reentrant now a var
* remove nodecl to remove empty system_syslocks.c
* let is better than var.

in reality SysLockType = enum, maybe that would be a better fix
2020-10-15 12:54:01 +02:00
Andreas Rumpf
da4aa2e1fb renamed '=' to '=copy' [backport:1.2] (#15585)
* Assign hook name changed to `=copy`
* Adapt destructors.rst
* [nobackport] Duplicate tests for =copy hook
* Fix tests
* added a changelog entry

Co-authored-by: Clyybber <darkmine956@gmail.com>
2020-10-15 12:52:30 +02:00
Igor Ribeiro de Assis
42c180c665 Fix crash in parsexml (#15582) (#15583)
Co-authored-by: Igor Ribeiro de Assis <igor.ribeiro_de_assis@zeiss.com>
2020-10-15 12:45:55 +02:00
Andreas Rumpf
fd9ab2ce6d ORC: API extensions for 1.4 (#15581) 2020-10-15 11:51:40 +02:00
Andreas Rumpf
1bbc20010e harden the ORC asyncleak3 test case (#15580)
* harden the ORC asyncleak3 test case

* add another ORC stress test
2020-10-15 09:42:43 +02:00
genotrance
a4c28394be Bump nimble (#15573) 2020-10-14 22:26:44 +02:00
Andreas Rumpf
644eb4dd54 ORC: critical bugfix for the cycle analyser, introduce -d:nimStressOrc for easier stress testing (#15572) 2020-10-14 22:26:21 +02:00
alaviss
c2ba4ef979 suggest: try to find the implementation of a symbol when def is used (#15555)
* suggest: try to find the implementation of a symbol when def is used

* suggest: return all declarations of the symbol on `def`
2020-10-14 17:08:56 +02:00
Clyybber
977bccdbff Make useVersion:1.0 disable the proc arg sym change (#15570)
* Make useVersion:1.0 disable the proc arg sym change

* Also do this for useVersion:1.2
2020-10-14 16:07:25 +02:00
Andreas Rumpf
8978112457 fixes a C code generator regression, no need to backport, only the 1.4 line is affected (#15569) 2020-10-14 13:58:36 +02:00
Timothee Cour
09cad44be9 ci docs: add config/nimdoc.cfg to paths (#15566) 2020-10-14 12:04:14 +02:00
Benjamin Lee
12c8ef5949 Update the list of GC options when raising an error (closes #15547) (#15553) 2020-10-14 11:20:59 +02:00
Andreas Rumpf
c664fb2843 sigmatch: hotfix [backport] (#15565) 2020-10-14 09:55:47 +02:00
narimiran
fc90eb9f27 change case in nimdoc [ci skip] 2020-10-14 09:26:44 +02:00
Timothee Cour
0c0f86b2c5 reference fusion docs (#15562) 2020-10-14 09:25:28 +02:00
alaviss
d1af9587b8 terminal: fix fgColor/bgColor commands [backport] (#15554)
Since #8296, fgSetColor is no longer a global. These commands were
probably left out from the change as an oversight, so some tests have
been added to make sure this won't happen again.
2020-10-13 17:39:32 +01:00
Timothee Cour
0134e34e03 dup docs: add an example with addQuoted (#15548)
* dup docs: add addQuoted example

* fixup
2020-10-13 08:24:30 +02:00
Christopher Dunn
f1d81dc6e6 Fix doc for CountTable (#15561) [backport] 2020-10-13 06:33:53 +02:00
Christian Ulrich
1f51a33998 close socket in getPrimaryIPAddr even if exception occurs (#15558) 2020-10-12 22:02:17 +02:00
Timothee Cour
30b966bdf7 unbreak CI: fix logic for skipping ci (#15556) 2020-10-12 21:04:40 +02:00
cooldome
9668a1106d Fix 15543 (#15544)
* fix #15543

* fix spacing

* fix test

* simplify test for freebsd platform
2020-10-12 10:12:32 +01:00
Andreas Rumpf
d66e274e1a refactoring: moved setOutFile to where it belongs 2020-10-11 20:44:04 +02:00
Andreas Rumpf
3492178494 refactoring: removed cmdlinehelper.mainCommand callback 2020-10-11 20:44:04 +02:00
flywind
c2c7f60259 docs minor (#15550) 2020-10-11 20:43:44 +02:00
Timothee Cour
3eac9b2344 os: add overload copyFile*(source, dest: string, isDir = false) (#15537)
* os: add overload copyFile*(source, dest: string, isDir = false)
* renamed to copyFileToDir
2020-10-11 20:43:01 +02:00