19762 Commits

Author SHA1 Message Date
narimiran
727c6378d2 bump NimVersion to 1.6.0 v1.6.0 2021-10-18 16:36:47 +02:00
Jason Beetham
f0af4a36b9 Added setGlobalValue to VM api (#19007) 2021-10-17 16:24:43 +02:00
Timothee Cour
f77dea01fd define nimVersion automatically and avoid needing -d:nimVersion140 (#18726)
* define `nimVersion` and avoid needing -d:nimVersion140

* fix changelog
2021-10-17 08:37:52 +02:00
Andrey Makarov
162b07d72c fix parsesql.treeRepr when nil is in input (#18974)
* fix parsesql.treeRepr when nil is in input

* return newNode(nkNone) as default value, not nil
2021-10-17 05:38:07 +02:00
ee7
3b1a601fe1 sequtils: fix errors from strictFuncs use (#18998)
Nim 1.4.x compiled the below code without error when using
`--experimental:strictFuncs`

    import std/sequtils

    type Foo = ref object

    let foo1 = Foo()
    let foo2 = Foo()
    let foos = @[foo1, foo2]
    let fooTuples = @[(foo1, 1), (foo2, 2)]

    discard repeat(foo1, 3)
    discard zip(foos, foos)
    discard unzip(fooTuples)

However, since 2020-12-09, devel Nim produced errors like

    /tmp/bar.nim(11, 15) template/generic instantiation of `repeat` from here
    /foo/nim/pure/collections/sequtils.nim(172, 6) Error: 'repeat' can have side effects
    an object reachable from 'x' is potentially mutated
    /foo/nim/pure/collections/sequtils.nim(183, 15) the mutation is here
    /foo/nim/pure/collections/sequtils.nim(183, 15) is the statement that connected the mutation to the parameter

This commit reverts some `proc` to `func` changes so that code that:

- calls `repeat`, `zip`, or `unzip`
- and instantiates them with types containing `ref`

can once again be compiled with `strictFuncs`. Otherwise, a user might
be forced to drop or alter their `strictFuncs` use when upgrading from
Nim 1.4.x, or when writing new code that uses these procedures (at least
for now, with the current `strictFuncs` implementation).

This commit also adds tests to assert that the remaining funcs in this
module can be compiled with `strictFuncs` when used with types
containing `ref`.

The original batch of `proc` to `func` changes in `sequtils.nim` was in
commit 6f57ebae34, which was partially reverted in 38eb021f81.

See also: https://github.com/nim-lang/Nim/issues/16305
2021-10-16 11:25:05 +02:00
ee7
f4525efcf3 changelog_1_6_0: mention breaking change in effect tracking (#18995) 2021-10-15 09:10:27 +02:00
flywind
73330711a3 make choosenim work on windows [backport] (#18993) 2021-10-14 23:55:05 +08:00
Miran
8a4eeba218 try to fix broken ssl test (#18991) 2021-10-14 09:56:58 +02:00
flywind
3493783d0f test whether it is unnecessary (#18893) 2021-10-14 09:23:36 +02:00
flywind
c4c9876785 fix a potential bug (#18900) 2021-10-14 09:23:01 +02:00
Miran
f93bfc0a32 [backport] add v1.6 changelog (#18932) 2021-10-13 20:31:04 +02:00
flywind
e2b19bb2de remove deprecated stuffs from std/times (#18937) 2021-10-13 14:58:31 +02:00
flywind
2ac3ba713b fix #18985 (#18988) 2021-10-13 14:57:25 +02:00
林亦恩
e645be4d0c add ghci like type annotation buildEchoStmt (1049) (#18875)
* add ghci like type annotation buildEchoStmt (1049)

* Update compiler/semexprs.nim

* Update compiler/semexprs.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-10-13 11:35:47 +02:00
Dominik Picheta
2aa97a228a Removes deprecated {.injectStmt.}. Fixes #18666 (#18984) 2021-10-13 11:09:45 +02:00
Juan Carlos
0ae2d1ea88 Improve error message when NodeJS is not installed and 'nim js -r' is run (#18978) 2021-10-12 15:41:30 +02:00
narimiran
83128f217f disable testing of fidget, to make CIs green 2021-10-11 14:38:59 +02:00
antonl05
787def271b add OpenIndiana to list (#18972)
* add OpenIndiana support

* point sunos to solaris
2021-10-09 10:47:07 +02:00
flywind
08107c2192 [minor] give more friendly description (#18973) 2021-10-07 18:54:21 +02:00
Andreas Rumpf
6f15af41a7 fixes a regression caused by overloadable enums even though they're opt-in (#18970) 2021-10-07 15:07:24 +02:00
quantimnot
19774a72e7 Fixed strictFuncs support for std/pegs (#18951)
* Fixed `strictFuncs` support for `std/pegs`

Enabled `std/pegs` in the `strictFuncs` import test.

Fixes #18057
Fixes #16892
See #18111

* Rebased from `devel`

* Conditionally compile `std/pegs` in `koch`

This is for supporting `csources` bootstrap.

Co-authored-by: quantimnot <quantimnot@users.noreply.github.com>
2021-10-07 12:16:58 +02:00
flywind
f8d6a53227 typo [backport] (#18967) 2021-10-07 12:01:27 +02:00
Andreas Rumpf
8eef557157 fixes a 'mixin' statement handling regression [backport:1.2] (#18968) 2021-10-07 12:01:06 +02:00
Miran
eede2bfb5d update csources hash (#18969) 2021-10-07 10:48:09 +02:00
Andrey Makarov
f03872d99e rst: minor fixes (#18960) 2021-10-06 13:53:01 +02:00
flywind
b2873f0f63 [tools] use the right parameter [backport:1.0] (#18957) 2021-10-06 12:47:46 +02:00
flywind
cb30dc5170 enable tests for #2710 (#18961) 2021-10-06 09:42:35 +02:00
quantimnot
9fc2918314 Document how to compile a reproducible build (#18953)
* Make compiler build more reproducible

Removed the compile time from the version output.
Added Git commit's author's datetime in UTC timezone.

Fixes #18508

See https://reproducible-builds.org/docs/timestamps/
See https://reproducible-builds.org/docs/source-date-epoch/

* Revert "Make compiler build more reproducible"

This reverts commit 2f9359ae89.

Documented how to use compile reproducible builds with the
`SOURCE_DATE_EPOCH` environment variable.

* Corrected `readme.md` formatting

Co-authored-by: quantimnot <quantimnot@users.noreply.github.com>
2021-10-06 09:41:42 +02:00
Andreas Rumpf
f1f1e85ec6 fixes #18954 (#18955) 2021-10-05 12:29:59 +02:00
flywind
e7bac91773 rename nimEnableHashRef [backport] (#18941)
* rename nimEnableHashRef [backport]
* Apply suggestions from code review

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
2021-10-04 21:28:13 +02:00
quantimnot
f017eadc97 Add support for strictEffects to std/pegs (#18949)
* Add support for `strictEffects` to `std/pegs`

* Fixed support of older Nim versions

Co-authored-by: quantimnot <quantimnot@users.noreply.github.com>
2021-10-04 21:27:13 +02:00
Andreas Rumpf
500d5f0f38 typo [backport] (#18948) 2021-10-04 12:34:29 +02:00
flywind
97c24dd548 correct changelog [backport] (#18940) 2021-10-04 09:19:20 +02:00
Dominik Picheta
6b0db5be1f Fixes build_all.sh failing on Nimble builds (#18945)
When running `build_all.sh` I was getting:

```
bin/nim c -o:bin/nimsuggest -d:danger --skipUserCfg --skipParentCfg --hints:off nimsuggest/nimsuggest.nim
bin/nim c -o:bin/nimgrep -d:release --skipUserCfg --skipParentCfg --hints:off tools/nimgrep.nim
bin/nim c -o:bin/nimpretty -d:release --skipUserCfg --skipParentCfg --hints:off nimpretty/nimpretty.nim
bin/nim c -o:bin/testament -d:release --skipUserCfg --skipParentCfg --hints:off testament/testament.nim
bin/nim c -o:bin/nim_dbg --opt:speed --stacktrace -d:debug --stacktraceMsgs -d:nimCompilerStacktraceHints --skipUserCfg --skipParentCfg --hints:off compiler/nim.nim
bin/nim c -o:bin/atlas -d:release --skipUserCfg --skipParentCfg --hints:off tools/atlas/atlas.nim
/home/dom/.choosenim/toolchains/nim-#devel/koch.nim(722) koch
/home/dom/.choosenim/toolchains/nim-#devel/koch.nim(149) bundleNimbleExe
/home/dom/.choosenim/toolchains/nim-#devel/tools/deps.nim(32) cloneDependency
/home/dom/.choosenim/toolchains/nim-#devel/lib/pure/os.nim(1438) setCurrentDir
/home/dom/.choosenim/toolchains/nim-#devel/lib/pure/includes/oserr.nim(95) raiseOSError
Error: unhandled exception: No such file or directory
Additional info: '/home/dom/.choosenim/toolchains/nim-#devel/dist/nimble' [OSError]
```

With this patch it builds.
2021-10-03 07:25:15 +02:00
flywind
45c4332c81 document -d:nimStrictDelete [backport] (#18939) 2021-10-03 07:22:53 +02:00
Andreas Rumpf
e9268b52d9 with this patch :idx: can be used for the index generation for LaTeX (#18946) 2021-10-03 07:21:08 +02:00
flywind
5c4692fad4 rename nimLegacyJsonutilsHoleyEnum [backport] (#18938)
* enable nimPreviewJsonutilsHoleyEnum [backport]

* docuement nimPreviewJsonutilsHoleyEnum
2021-10-01 20:26:29 +02:00
flywind
7577ea9e4c [std/tempfiles] docs improvement (#18936)
* unify comments

* more
2021-10-01 20:14:10 +02:00
flywind
2aeac26f08 correct licence header (#18935)
* rename licence

* spaces
2021-10-01 13:57:06 +02:00
flywind
4b764f4c7c close #17319; add testcase (#18934) 2021-10-01 16:19:02 +08:00
flywind
677969f6ea alternative to #18918 (#18927)
* fix #16558

* add testcase
2021-09-30 16:57:06 +02:00
Jason Beetham
f915b3aa86 Alternative to #18928 (#18931)
* fixed #18841

* Added test
2021-09-30 16:55:43 +02:00
Andreas Rumpf
c38ab3e257 fixes #18921 [backport] (#18930) 2021-09-30 12:09:42 +02:00
Andreas Rumpf
c3dd53bb2c typos [backport] (#18929) 2021-09-30 11:35:42 +02:00
flywind
6bb32da4ae [std/tasks] more gcsafe stuffs [backport] (#18926) 2021-09-30 07:46:30 +02:00
Jonas Schubert Erlandsson
f35e9a5752 Adds source to single tags list (#18920) 2021-09-29 18:14:31 +02:00
Miran
b74b914e4f [backport] use old style hints in .cfg files (#18917)
refs #18085
2021-09-29 11:14:47 +02:00
Timothee Cour
f061971a9b envPairs works in vm, nims (#18615)
* envPairs works in vm, nims

* fixup
2021-09-29 09:32:39 +02:00
flywind
08cf4cb1e5 test ord (#18909) 2021-09-28 11:35:04 +02:00
flywind
56bd5cbb87 fix a typo (canonilization => canonicalization) (#18914) 2021-09-28 03:05:22 -04:00