Commit Graph

20357 Commits

Author SHA1 Message Date
ringabout
db8a62d480 fixes #20285; prevent oid time overflow at year 2038 (#20338)
* Revert "fixes  #20285; prevent oid time overflow at year 2038"

This reverts commit dfcdb6ec2a.

* increase time to 64 bits and clean up

* add testcase

* inline consts

* add a changelog

* fixes  #20285; prevent oid time overflow at year 2038
2022-09-22 21:15:27 +08:00
Andrey Makarov
ae3dd759c4 Extract markdown/rst doc into separate file (#20404)
* Extract Markdown & Rst doc into separate file

This documentation should be extracted into separate file
as it's user's documentation, which can be used as a separate
utility for compiling `.md/.rst` files.

* Restructure: move markup info into markdown_rst.md

+Markdown link migration
2022-09-22 12:05:53 +02:00
Bung
2afce84616 Improve error message when instantiating generics with object constructor (#20358)
* Improve error message when instantiating generics with object constructor

* follow suggestion

* Update compiler/semobjconstr.nim

Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>

* Update tests/errmsgs/t19882_2.nim

Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>
2022-09-21 21:11:39 -04:00
Bung
de089d7fdb contentLength default to -1 if not present (#19835)
* contentLength default to -1 if not present

* `httpclient.contentLength` changelog
2022-09-21 18:01:22 -04:00
ringabout
70c25c45d6 fixes #20397; fixes stylecheck regression (#20398)
* fixes  #20397; fixes stylecheck

* add testcase
2022-09-21 15:04:33 -04:00
Judd
4133698f2d Update manual.md (#20394)
* Update manual.md

update outdated information on `ObservableStores`.

* Update manual.md

add `base` pragma to fix the warning.

* Update doc/manual.md

accept.

Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>

* Update manual.md

update example code.

* Update manual.md

1. more updates to help keeping readers on track.
1. fix typos.

Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>
2022-09-21 15:00:55 -04:00
Juan Carlos
ebb1b7af23 RFC-460 implemented (#19771)
* RFC-460 implemented

* RFC-460 implemented

* RFC-460 implemented

* Fix dumb GitHub autoupdate on changelog
2022-09-21 10:37:13 +02:00
ringabout
e0c1159fb3 fixes #20391; make of operator work with generics for ORC (#20395) 2022-09-21 10:29:39 +02:00
ringabout
de70128fcc follow up #19968; add more tests (#20396) 2022-09-20 16:14:01 -04:00
ringabout
4a1bda667c turn nimIncrSeqV3 into deadcode (#20388) 2022-09-20 14:59:50 +02:00
metagn
3dc302662e clarify distinct pointer type nil change (#20376)
* clarify distinct pointer type `nil` change

* Update changelog.md [skip ci]

Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>

* remove extra quote [skip ci]

Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>
2022-09-20 14:58:22 +02:00
Bung
08c02f0236 report expression has no type other than has to be used (or discarded… (#20392)
report expression has no type other than has to be used (or discarded) when typ is tyNone in discardCheck
2022-09-20 14:50:48 +02:00
Bung
a302b26e0e fix #19882 Improve error message when instantiating generics that lac… (#20356)
* fix #19882 Improve error message when instantiating generics that lack a type

* Update tests/errmsgs/t19882.nim

Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>
2022-09-19 18:31:40 -04:00
Andrey Makarov
c4ba4f06f8 Markdown link migration part 2 (#20371) 2022-09-19 18:24:40 -04:00
Juan Carlos
2147b116a1 Add missing proc to dom (#20378)
* Add missing proc from dom

* Add missing proc from dom

* Add missing proc from dom

Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>
2022-09-19 17:51:47 -04:00
Juan Carlos
c8000b1025 Add missing symbols to regex (#20383)
* Add missing attribute to jsre

* Add missing attribute to jsre
2022-09-19 17:47:39 -04:00
Amjad Ben Hedhili
7023176dcb Recommend mapIt in some cases (#20347)
* Recommend `mapIt` in some cases

* Remove runnableExample
2022-09-19 17:43:46 -04:00
Amjad Ben Hedhili
7a756bfaef Shorten JS block code (#20370) 2022-09-19 15:09:41 +02:00
ringabout
97259a5ab3 fixes #19713; Revert "Remove tlsEmulation enabled from Windows + GCC config" (#19119) (#20327)
* Revert "Remove tlsEmulation enabled from Windows + GCC config (#19119) [backport:1.6]"

This reverts commit 77b696c2c9.

* increase nimTlsSize to 48000

* enable for windows

* fixes tests

* fixes tlsEmulation:on
2022-09-19 09:16:54 +02:00
ringabout
f6dc30e52d fixes Thread initializer for ARC/ORC on Macos (#20368)
* fixes Thread initializer for ARC/ORC

* another try

* fix

* use int
2022-09-16 16:35:53 -04:00
Tanguy
3a5e38ab9d Allow custom pragma on iterators [backport] (#20344)
Allow custom pragma on iterators
2022-09-17 02:10:47 +08:00
ringabout
d44b547144 add docs to copyNimNode and copyNimTree (#20357)
* add docs to copyNimNode and copyNimTree

* Apply suggestions from code review

Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>

Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>
2022-09-16 00:35:44 -04:00
metagn
c7ee4ab509 don't run azure on other branches either (#20365)
* don't run azure on other branches either

refs #20184

Azure is more prone to clogging & it's especially bad with the timeouts (some PRs haven't rebased).

* allow all version- branches

Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>

* add closing quote

Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>
2022-09-16 10:48:47 +08:00
Judd
758598dd3e more minor updates to manual.md (#20360)
* fix typos in manual.md

1. remove redundant `(`
1. 'System module' -> 'system module'.

* Update manual.md

"However" is not easy to understand. Suggest changing to the word into "In this version" to make the comparison explicite.
2022-09-15 22:38:06 +02:00
ringabout
cd9290818a add testcase for #19020 (#20363) 2022-09-15 23:18:14 +08:00
metagn
3e83c4a168 only run github CI on latest commit of branch/PR (#20361)
based on [this](https://stackoverflow.com/a/72408109/10633874)
2022-09-15 23:17:35 +08:00
ringabout
2b80ff2374 fixes #19104; peg Incorrect captures [backport:1.6] (#20352)
* fixes #19104; peg Incorrect captures [backport:1.6]

* add tests

Co-authored-by: khchen <khchen@gmail.com>
2022-09-15 07:54:53 +02:00
metagn
79afee868d partial revert and redesign of #19814, changelog (#20341)
* conservative partial revert of #19814

* fix

* revert tssl

* revert azure CI change

* keep azure, revert version range

* fully revert CI, add changelog

* useOpenssl3 as separate define, .3 is a version
2022-09-14 14:14:58 -04:00
metagn
a73ae3e066 minor improvements to follow up recent PRs (#20342)
put mOpenArrayToSeq in compile-time evaluation whitelist
(it was mNone before which was whitelisted), homogenize
"ordinal type expected" errors, put overloadable enums
in non-experimental manual
2022-09-14 18:30:15 +02:00
Andrey Makarov
2140d05f34 nimgrep: add --inContext and --notinContext options (#19528)
* nimgrep: add `--matchContext` and `--noMatchContext` options

* Rename options for uniformity

* Revise option names, add `--parentPath` options

* Revert --bin deprecation

* Copy-paste an original test from quantimnot

The origin was:
96544656d5/tnimgrep.nim

* Change ! to n

* Attempt to fix test

* Fix test on Windows

* Change --contentsFile -> --inFile, add more tests

* Bump

* Change --parentPath to --dirpath
2022-09-14 18:28:01 +02:00
Bung
08faa04d78 fix #20233 Float ranges in case statement in JS crash compiler (#20349) 2022-09-14 17:16:34 +02:00
ringabout
2e8c016799 disable tlsEmulation for ic tests (#20345) 2022-09-14 12:06:05 +08:00
Antonis Geralis
7c85b500df Add testcase for bug #20305 (#20323)
* add testcase for bug #20305

* Update tcaseobj.nim

Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>
2022-09-13 19:10:08 +08:00
ringabout
c9a92117f9 Revert "add fromChar" (#20336)
Revert "add `fromChar` (#20332)"

This reverts commit 846cc746a2.
2022-09-12 13:33:47 -04:00
Andreas Rumpf
6bf21e7b3d fixes #19724; don't be aggressive when you infer sink parameters (#20314)
* fixes #19724; don't be aggressive when you infer sink parameters

* better logic and updated tests

* wip

* fixes tests (#20330)

* restore tests

* try splitPath

Co-authored-by: xflywind <43030857+xflywind@users.noreply.github.com>

* Apply suggestions from code review

* Apply suggestions from code review

Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
Co-authored-by: xflywind <43030857+xflywind@users.noreply.github.com>
2022-09-12 00:58:29 +02:00
Clay Sweetser
8850644cb7 Revert "fixes #20155; repr range with distinct types is broken with ORC" (#20334)
Revert "fixes #20155; repr range with distinct types is broken with ORC (#20158)"

This reverts commit 37b3f62eef.
2022-09-11 16:56:11 -04:00
ringabout
37b3f62eef fixes #20155; repr range with distinct types is broken with ORC (#20158)
* fixes #20155; repr range with distinct types is broken with ORC

* skipRanges
2022-09-11 16:55:22 -04:00
random-bites
9b9f24f01b Replace word 'param(s)' with 'parameter(s)'. (#20331)
Replace word 'params(s)' with 'parameter(s)'.
2022-09-11 16:52:56 -04:00
havardjohn
68f92af17c Fix cannot create Windows directory in root (#20311)
* Fix cannot create Windows directory in root

Fixes #20306, a regression bug with `createDir` caused by
`23e0160af283bb0bb573a86145e6c1c792780d49`.

The issue is that, if the path consists only of a drive and a single
directory (e.g. "Y:\nimcache2" in the original issue), then no
directories will be created. This works fine if there are multiple
directories (e.g. "Y:\nimcache2\test").

In the case of "Y:\nimcache2", `omitNext` in `createDir` is `false` on
the last condition in `createDir`. This means that the "nimcache2"
directory will not be created, and no exception will be raised.

Fixed by refactoring to use `parentDirs` iterator instead of iterating
over the string characters. Motivation is reduced code complexity.

Will not test the specific "C:\test" `createDir` case, since there is no
standard Windows drive with write permissions in the root. Creating a
custom drive-mapping to Windows Temp is a non-option. That could mess
up some users running the test.

Added `parentDirs` tests since they are lacking on for POSIX paths.

* Fix `createDir("")` causing error

The change to `createDir` caused `createDir("")` to raise an error,
where it previously didn't. Fixed so `createDir("")` does not fail, and
added test case.
2022-09-11 16:51:39 -04:00
Andrey Makarov
088487f652 Implement Markdown definition lists (+ migration) (#20333)
Implements definition lists Markdown extension adopted in a few
implementations including:
* [Pandoc](
  https://pandoc.org/MANUAL.html#definition-lists)
* [kramdown](
  https://kramdown.gettalong.org/quickref.html#definition-lists)
* [PHP extra Markdown](
  https://michelf.ca/projects/php-markdown/extra/#def-list)

Also affected files have been migrated.
RST definition lists are turned off for Markdown: this solves the
problem of broken formatting mentioned in
https://github.com/nim-lang/Nim/pull/20292.
2022-09-11 13:52:43 -04:00
Hamid Bluri
846cc746a2 add fromChar (#20332)
`fromChar` converts `char` to `SomeInteger`, related to `isDigit`
2022-09-11 13:50:06 -04:00
metagn
58e6d439d8 fix #13515 [backport] (#20315)
* fix #13515

* only compile test

* no idea why this PR is unlocking this

* don't rope in symchoices

* even more restrictive
2022-09-11 08:33:24 +02:00
Andreas Rumpf
884f1f6b11 SSL: Allow the same range of versions for OSX (#20324) 2022-09-10 09:58:40 +02:00
Andrey Makarov
f6ee066ee2 Markdown links migration part 1 (#20319)
Markdown link migration part 1

Also the warning is improved a bit.

Local links (targeting inside its document) which had had a full anchor
were turned into concise form.
The very fact that they existed may be due to the bug in
reference to subsections fixed https://github.com/nim-lang/Nim/pull/20279,
now they are working well (both in RST syntax and
new Pandoc Markdown syntax implemented in
https://github.com/nim-lang/Nim/pull/20304)
2022-09-09 10:45:54 -04:00
Judd
89e6540fd3 update manual (#20325)
1. remove two redundant `.`;
1. add information on format string for `importc` just as `exportc`
2022-09-09 15:02:15 +02:00
ringabout
1699ba1c93 fixes nightlies build regression (#20322)
fixes nightlies build
2022-09-08 22:30:03 +02:00
Judd
918ae16919 Update manual.md (#20321)
* Update manual.md

add explanation for $#.

* Update manual.md

add explanation.
2022-09-08 17:33:29 +02:00
ringabout
3ea8219d73 Revert "clarify that char may not be unsigned" (#20320)
Revert "clarify that `char` may not be unsigned (#20308)"

This reverts commit f433d9cccf.
2022-09-08 15:52:30 +08:00
ringabout
bbbfde7341 fixes #20303; wasMoved expressions with side effects for ORC (#20307) [backport]
fixes #20303; wasMoved expressions with side effects
2022-09-08 08:07:28 +02:00
ringabout
f433d9cccf clarify that char may not be unsigned (#20308) 2022-09-06 23:06:32 +02:00