summary refs log tree commit diff stats
Commit message (Collapse)AuthorAgeFilesLines
* fixes #20162; locals doesn't work with ORC [backport] (#20163)ringabout2022-08-232-1/+2
| | | fixes #20162; locals doesn't work with ORC
* document compiler procs regarding `&` (#20257)ringabout2022-08-223-2/+8
|
* add comments back (#20256)ringabout2022-08-211-0/+3
| | | My bad, I shouldn't have removed it in the precedent PR.
* remove the merge pragma and obsolete comments (#20254)ringabout2022-08-211-7/+4
| | | remove the merge pragma which has been deprecated for seven years
* Docs auto dark mode (#20188)Amjad Ben Hedhili2022-08-218-174/+136
| | | | | | | | | | | | | * Implement auto dark mode * Rename class * Fix borders cutout * Apply suggestions from code review * Apply suggestions from code review Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
* fixes #11953; jsondoc creates no files unless the htmldocs dir is created ↵ringabout2022-08-202-0/+18
| | | | | | | | | (#20198) * fixes #11953; jsondoc creates no files unless the htmldocs dir is created * target * fixes runner
* Remove string == nil/nil == string error (#20222)metagn2022-08-201-23/+0
| | | | | | | * Remove string == nil/nil == string error This was to help migration for `nil` strings being removed, but `nil` strings have been gone for a while now. * remove isNil too
* Add use of Windows Wide CRT API for env. vars (#20084)havardjohn2022-08-206-45/+263
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add use of Windows Wide CRT API for env. vars Replaces use of CRT API `getenv` and `putenv` with respectively `_wgetenv` and `_wputenv`. Motivation is to reliably convert environment variables to UTF-8, and the wide API is best there, because it's reliably UTF-16. Changed the hack in `lib/std/private/win_setenv.nim` by switching the order of the Unicode and MBCS environment update; Unicode first, MBCS second. Because `_wgetenv`/`_wputenv` is now used, the Unicode environment will be initialized, so it should always be updated. Stop updating MBCS environment with the name of `getEnv`. It's not necessarily true that MBCS encoding and the `string` encoding is the same. Instead convert UTF-16 to current Windows code page with `wcstombs`, and use that string to update MBCS. Fixes regression in `6b3c77e` that caused `std/envvars.getEnv` or `std/os.getEnv` on Windows to return non-UTF-8 encoded strings. Add tests that test environment variables with Unicode characters in their name or value. * Fix test issues Fixes * `nim cpp` didn't compile the tests * Nimscript import of `tosenv.nim` from `test_nimscript.nims` failed with "cannot importc" * Fix missing error check on `wcstombs` * Fix ANSI testing errors * Separate ANSI-related testing to their own tests, and only executing them if running process has a specific code page * Setting locale with `setlocale` was not reliable and didn't work on certain machines * Add handling of a "no character representation" error in second `wcstombs` call * tests/newruntime_misc: Increment allocCount Increments overall allocations in `tnewruntime_misc` test. This is because `getEnv` now does an additional allocation: allocation of the UTF-16 string used as parameter to `c_wgetenv`. * Revert "tests/newruntime_misc: Increment allocCount" This reverts commit 4d4fe8bd3edb1bfc6d600f247af797c7552f5477. * tests/newruntime_misc: Increment allocCount on Windows Increments overall allocations in `tnewruntime_misc` test for Windows. This is because `getEnv` on Windows now does an additional allocation: allocation of the UTF-16 string used as parameter to `c_wgetenv`. * Refactor, adding suggestions from code review Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com> * Document, adding suggestions Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com> Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com> Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>
* fixes #20149; fixes #16762; hintAsError and warningAsError now ignore ↵ringabout2022-08-194-8/+14
| | | | | | | | | | | | | | | | | | | foreign packages (#20151) * fixes #20149; hintAsError/warningAsError ignores foreign packages * add changelog * fixes the test * remove * fixes tests again * fix * I'm careless Co-authored-by: xflywind <43030857+xflywind@users.noreply.github.com>
* make sure tools/heapdumprepl.nim continues to compile (#20146)ringabout2022-08-191-4/+2
|
* make implicit cstring conversions explicit (#19488)ee72022-08-1914-63/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Nim manual says that an implicit conversion to cstring will eventually not be allowed [1]: A Nim `string` is implicitly convertible to `cstring` for convenience. [...] Even though the conversion is implicit, it is not *safe*: The garbage collector does not consider a `cstring` to be a root and may collect the underlying memory. For this reason, the implicit conversion will be removed in future releases of the Nim compiler. Certain idioms like conversion of a `const` string to `cstring` are safe and will remain to be allowed. And from Nim 1.6.0, such a conversion triggers a warning [2]: A dangerous implicit conversion to `cstring` now triggers a `[CStringConv]` warning. This warning will become an error in future versions! Use an explicit conversion like `cstring(x)` in order to silence the warning. However, some files in this repo produced such a warning. For example, before this commit, compiling `parsejson.nim` would produce: /foo/Nim/lib/pure/parsejson.nim(221, 37) Warning: implicit conversion to 'cstring' from a non-const location: my.buf; this will become a compile time error in the future [CStringConv] /foo/Nim/lib/pure/parsejson.nim(231, 39) Warning: implicit conversion to 'cstring' from a non-const location: my.buf; this will become a compile time error in the future [CStringConv] This commit resolves the most visible `CStringConv` warnings, making the cstring conversions explicit. [1] https://github.com/nim-lang/Nim/blob/d2318d9ccfe6/doc/manual.md#cstring-type [2] https://github.com/nim-lang/Nim/blob/d2318d9ccfe6/changelogs/changelog_1_6_0.md#type-system
* Adds missing SEEK_ POSIX constants for FreeRTOS (#20241)jgirvin-venturi2022-08-191-0/+4
|
* fixes #20107 (#20246) [backport]Andreas Rumpf2022-08-192-0/+38
|
* Markdown code blocks part 5 (#20236)Andrey Makarov2022-08-1721-413/+486
| | | No logic was added, just a few more `*.md` files have been migrated.
* fix comment in the Nim manual (#20234)Judd2022-08-171-1/+1
| | | | | fix comment there is no `y` in the example.
* Don't require blank line before Markdown code (#20215)Andrey Makarov2022-08-154-9/+53
| | | | Fixes bug reported in https://github.com/nim-lang/Nim/pull/20189 affecting nimforum.
* Pass check condition directly to if (#20217)Dan Rose2022-08-151-2/+6
| | | | | | | | | | | | | | | | | | When checking conditions, pass `check` untyped argument directly to if. This results in better error messages when the condition is malformed. Previously `check 1` would fail at compile time with `Error: type mismatch: got 'int literal(-2)' for '-2' but expected 'bool'` Now it fails with `Error: type mismatch: got 'int literal(1)' for '1' but expected 'bool'`. Similarly `check "foo"` would fail with ``` Error: type mismatch: got <string> but expected one of: proc `not`(a: typedesc): typedesc first type mismatch at position: 1 required type for a: typedesc but expression '"somestring"' is of type: string ... ``` Now it fails with `Error: type mismatch: got 'string' for '"somestring"' but expected 'bool'`
* changelog fixes again (#20206)metagn2022-08-151-56/+56
| | | changelog fixes again [skip ci]
* closes #12955; add testcase (#20223)ringabout2022-08-152-0/+7
|
* add version-1-6 and version-1-2 to triggered branches (#20214)ringabout2022-08-141-1/+3
| | | | | | | * add version-1-6 and version-1-2 to triggered branches * Update .github/workflows/ci_packages.yml * use quote
* closes #15316; add testcase (#20213)ringabout2022-08-132-0/+7
|
* Markdown code blocks part 4 (#20189)Andrey Makarov2022-08-129-341/+365
| | | No logic was added, just 8 more files have been migrated.
* CI upgrade to ubuntu-20.04 (#20182)ringabout2022-08-121-1/+1
| | | | | | | * CI upgrade to ubuntu-20.04 The ubuntu-18.04 environment is deprecated, consider switching to ubuntu-20.04(ubuntu-latest), or ubuntu-22.04 instead. For more details see https://github.com/actions/virtual-environments/issues/6002 * Update azure-pipelines.yml
* closes #6559; add testcase (#20200)ringabout2022-08-121-0/+17
|
* Show beatutiful html instead of ugly markdown preview (#20196)ringabout2022-08-111-1/+1
|
* improve deprecation error messages (#20197)ringabout2022-08-111-4/+2
|
* fix broken runnableExamples for getWeeksInIsoYear (#20193)metagn2022-08-111-2/+2
| | | | | Based on what I understand from [Wikipedia](https://en.wikipedia.org/wiki/ISO_week_date#Weeks_per_year), 2001 does not have 53 weeks, but 2004, 2009, 2015, 2020 do. The years 2000 and 2001 seem to be copy pasted from the `getDaysInYear` example above. The result of `getWeeksInIsoYear` also seem to match up with Wikipedia. That means these runnableExamples were never tested. Why is this the case? I only discovered this in #20091.
* help our poor CI; don't run CI on other branches for push (#20184)ringabout2022-08-091-1/+5
|
* Build compiler with --noNimblePath (#20168)Ivan Yonchovski2022-08-094-5/+5
| | | - Fixes https://github.com/nim-lang/Nim/issues/18840
* docs: fix some spelling errors (#19816)ee72022-08-0910-141/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | * docs: fix some spelling errors * contributing: fix spelling error Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> * Update contributing.md * Update intern.md * Update manual.md * Update manual_experimental_strictnotnil.md * Update nimgrep_cmdline.txt * Update pegdocs.txt * Update testament.md * Update tut1.md Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>
* bootstrap the compiler with nimPreviewSlimSystem (#20176)ringabout2022-08-0919-1/+68
| | | | | * bootstrap the compiler with nimPreviewSlimSystem * threads
* fixes broken ssl tests (#20181)ringabout2022-08-091-2/+2
|
* update the docs of arc following up #19749 (#19752)ringabout2022-08-081-2/+2
| | | Co-authored-by: flywind <43030857+xflywind@users.noreply.github.com>
* fixes links in the readme (#20167)ringabout2022-08-071-2/+2
|
* [minor] don't find `"Hint: gc"` for action (#20170)ringabout2022-08-071-4/+2
|
* fixes #20153; do not escape `_` for mysql [backport] (#20164)ringabout2022-08-052-2/+5
| | | | | | | | | | | * fixes #20153; do not escape `_` for mysql * add a test * Update db_mysql.nim * Update tdb_mysql.nim Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>
* Improve error message for `strutils.addf` (#20157)konsumlamm2022-08-051-8/+8
| | | Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
* remove annoying dropdowns from the bug form (#20154)ringabout2022-08-051-147/+8
| | | | | | | * Update bug_report.yml * Update bug_report.yml * Update bug_report.yml
* Two broken links found (#20121)Sojin2022-08-041-2/+2
| | | Updated the two broken internal links: rebuilding the compiler, reproducible builds
* Add bug form (#19913)Juan Carlos2022-08-044-88/+287
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add Bug Form * Add Bug Form * Add Bug Form * Add Bug Form * https://github.com/nim-lang/Nim/pull/19913#issuecomment-1160663243 * https://github.com/nim-lang/Nim/pull/19913#issuecomment-1160663243 * Update .github/ISSUE_TEMPLATE/bug_report.yml Co-authored-by: Yardanico <tiberiumk12@gmail.com> * Update .github/ISSUE_TEMPLATE/bug_report.yml Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> * Update .github/ISSUE_TEMPLATE/bug_report.yml Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> * Update .github/ISSUE_TEMPLATE/bug_report.yml Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> * Update .github/ISSUE_TEMPLATE/feature_request.yml Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> * Update .github/ISSUE_TEMPLATE/feature_request.yml Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> * Do not Star Nim on Github * No backwards compat problems * Typo Co-authored-by: Yardanico <tiberiumk12@gmail.com> Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
* Markdown code blocks part 3 (#20117)Andrey Makarov2022-08-045-283/+409
| | | No logic was added, just 4 more files migrated.
* fixes #20132; fixes the broken jsondoc comand [backport] (#20135)ringabout2022-08-043-1/+30
| | | | | * fixes #20132; fixes the broken jsondoc comand * add testcase
* Add client.close() in httpclient examples. (#20118)gecko2022-08-041-9/+25
| | | | | Without this, the httpclient examples are essentially setting you up for failure. I was bitten by this when my app became unable to open any more sockets. I'm not entirely sure how long this will relevant, as I hope destructors will be added to an upcoming version of the stdlib. But figured it was worth submitting anyways!
* closes #20123; remove builds.sr.ht (#20131)ringabout2022-08-033-99/+0
|
* Revert "enable nimPreviewDotLikeOps" (#19919)ringabout2022-08-034-2/+3
| | | | | | | | | * Revert "enable nimPreviewDotLikeOps (#19598)" This reverts commit 6773ffa63d0b3ab8b8894e84ed417f4eaced9122. * add deprecated message Co-authored-by: flywind <43030857+xflywind@users.noreply.github.com>
* Fixed compilation of void closureiters with try stmt (#20138) [backport]Yuriy Glukhov2022-08-032-4/+15
|
* Edits to sections 'Open arrays' and 'varargs'. (#20140)random-bites2022-08-031-6/+6
|
* [Changelog] Add Wider Ascii Chars sets string formatting in strutils.nim ↵Sultan Al Isaiee2022-08-021-0/+1
| | | | | | | | | | | | | | | | | | | (#20137) * Add Wider Ascii Chars sets string formatting in strutils.nim Add Wider Ascii Chars sets for string formatting (#19994) (#20120): - Added `UppercaseLetters`, `LowercaseLetters` The set of UppercaseLetters and lowercase ASCII letters. - Added `PunctuationChars` The set of all ASCII punctuation characters. - Added `PrintableChars` The set of all printable ASCII characters (letters, digits, whitespace, and punctuation characters). * Update changelog.md Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> * Update changelog.md Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
* prevent cache thrashing (#20129)ringabout2022-08-021-1/+3
| | | | | | | | | | | | * prevent cache thrash Co-authored-by: Charles Blake <cb@cblake.net> * Update lib/pure/random.nim Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> Co-authored-by: Charles Blake <cb@cblake.net> Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
* Fix "Add Wider Ascii Chars sets and func for string formatting" (#20120)Clay Sweetser2022-07-311-3/+3
|