Commits on Oct 27, 2021

  1. allow converting static vars to openArray (#19047)

    When assigning constant output to a seq, and then passing that static
    seq to other functions that take `openArray`, the compiler may end up
    producing errors, as it does not know how to convert `static[seq[T]]`
    to `openArray[T]`. By ignoring the `static` wrapper on the type for
    the purpose of determining data memory location and length, this gets
    resolved cleanly. Unfortunately, it is relatively tricky to come up
    with a minimal example, as there are followup problems from the failing
    conversion, e.g., this may lead to `internal error: inconsistent
    environment type`, instead of the relevant `openArrayLoc` error message.
    
    (cherry picked from commit 490c422)
    etan-status authored Oct 27, 2021
    Configuration menu
    Copy the full SHA
    861b625 View commit details
    Browse the repository at this point in the history
  2. bump NimVersion to 1.6.1

    narimiran committed Oct 27, 2021
    Configuration menu
    Copy the full SHA
    ac89e06 View commit details
    Browse the repository at this point in the history
  3. use two underscores for easy demangling [backport:1.6] (#19028)

    (cherry picked from commit 1a45da9)
    Araq authored and narimiran committed Oct 27, 2021
    Configuration menu
    Copy the full SHA
    b18b636 View commit details
    Browse the repository at this point in the history

Commits on Nov 3, 2021

  1. Fix #19052; [backport:1.6.0] (#19053)

    * Fix #19052; [backport:1.6.0]
    
    Adds a compile flag to avoid a getrandom syscall, fixing #19052.
    
    This is neccesary when the getrandom syscall is missing, as noted in #19052, particularly in kernel versions < 3.17 when getrandom was introduced. Specifically relevant is this is missing from kernel 3.10, which is the supported kernel throughout RHEL 7 and CentOS 7, which is widely used at many organizations. Without this, versions of nim that include sysrand (i.e. versions >= 1.6.0) will not compile without modification, however with this change a compile flag may be used to fall back using /dev/urandom as done with any unknown Posix OS (preferred here as a fallback since it already supplies a cryptographically secure PRNG and existing code deals with entropy pool init, etc).
    
    The change is placed behind a compile flag, as discussed in github ticket #19052 (summed up here):
    * First, I can't seem to catch that a importc such as SYS_getrandom is declared without using it (the declared proc returns true, but compiler throws an undeclared identifier flag when referencing it).
    * Second, it seemed preferable to be behaviorally explicit vs implicit when considering this is intended to be a cryptographically secure PRNG.
    * Third, if I intend to compile on a kernel >= 3.17 while running the binary on at least one system < 3.17, I'll want to be able to target this without relying on a compile time determination if the getrandom syscall is available.
    
    * Documenting compile flag for -d:nimNoGetRandom and adding changelog entry
    Related to #19052 and comments in PR #19053. Also created a new changelog file since none currently exists.
    
    Co-authored-by: Timothy Alexander <talexander@midwestlabs.com>
    (cherry picked from commit dde5566)
    2 people authored and narimiran committed Nov 3, 2021
    Configuration menu
    Copy the full SHA
    1ac029c View commit details
    Browse the repository at this point in the history
  2. fix #18971 (#19070) [backport:1.6]

    since the example code return value from global variable, instead
    of first argument, the `n.len` is 1 which causes compiler crashes.
    
    (cherry picked from commit f755e45)
    derekdai authored and narimiran committed Nov 3, 2021
    Configuration menu
    Copy the full SHA
    97286db View commit details
    Browse the repository at this point in the history
  3. fix #18410 (Errors initializing an object of RootObj with the C++ bac…

    …kend) [backport] (#18836)
    
    * fix #18410
    
    * one line comment
    
    * typo
    
    * typo
    
    * cover cpp
    
    (cherry picked from commit 2f730af)
    ringabout authored and narimiran committed Nov 3, 2021
    Configuration menu
    Copy the full SHA
    233c6e9 View commit details
    Browse the repository at this point in the history
  4. [FIX] Do not break formatted string line (#19085) [backport]

    Otherwise, compiler produces broken error message - `$1` is not interpolated
    
    `Error: The $1 type doesn't have a default value. The following fields must be initialized: importGraph.`
    
    (cherry picked from commit 4c510d5)
    haxscramper authored and narimiran committed Nov 3, 2021
    Configuration menu
    Copy the full SHA
    a6e192f View commit details
    Browse the repository at this point in the history
  5. fixes #19078 [backport] (#19090)

    (cherry picked from commit 9d51197)
    Araq authored and narimiran committed Nov 3, 2021
    Configuration menu
    Copy the full SHA
    6a2baba View commit details
    Browse the repository at this point in the history

Commits on Nov 11, 2021

  1. fixes another effect inference bug [backport:1.6] (#19100)

    * fixes another effect inference bug [backport:1.6]
    
    (cherry picked from commit fce89cb)
    Araq authored and narimiran committed Nov 11, 2021
    Configuration menu
    Copy the full SHA
    575450d View commit details
    Browse the repository at this point in the history
  2. fixes #19013 [backport:1.6] (#19111)

    * fixes #19013 [backport:1.6]
    
    * added test case
    
    (cherry picked from commit b7c66ce)
    Araq authored and narimiran committed Nov 11, 2021
    Configuration menu
    Copy the full SHA
    f85e096 View commit details
    Browse the repository at this point in the history
  3. fixes #19011 [backport:1.6] (#19114)

    (cherry picked from commit 6ff6176)
    Araq authored and narimiran committed Nov 11, 2021
    Configuration menu
    Copy the full SHA
    95dce90 View commit details
    Browse the repository at this point in the history
  4. fix nimindexterm in rst2tex/doc2tex [backport] (#19106)

    * fix nimindexterm (rst2tex/doc2tex) [backport]
    
    * Add support for indexing in rst
    
    (cherry picked from commit 997ccc5)
    a-mr authored and narimiran committed Nov 11, 2021
    Configuration menu
    Copy the full SHA
    1334318 View commit details
    Browse the repository at this point in the history
  5. fixes #14470 [backport:1.2] (#19115)

    (cherry picked from commit 15157d0)
    Araq authored and narimiran committed Nov 11, 2021
    Configuration menu
    Copy the full SHA
    3f6de92 View commit details
    Browse the repository at this point in the history
  6. Remove tlsEmulation enabled from Windows + GCC config (#19119) [backp…

    …ort:1.6]
    
    This flag has a very significant performance impact on programs compiled with --threads:on. It is also apparently not needed anymore for standard circumstances. Can we remove the config? See #18146 (comment) for discussion and perf impact. [backport:1.6]
    
    (cherry picked from commit 77b696c)
    guzba authored and narimiran committed Nov 11, 2021
    Configuration menu
    Copy the full SHA
    1090b0c View commit details
    Browse the repository at this point in the history

Commits on Nov 17, 2021

  1. fixed colorNames sorting mistake (#19125) [backport]

    (cherry picked from commit 528ef6c)
    orthoplex authored and narimiran committed Nov 17, 2021
    Configuration menu
    Copy the full SHA
    cfee71e View commit details
    Browse the repository at this point in the history
  2. update manual (#19130) [backport]

    (cherry picked from commit 3aaa12d)
    ringabout authored and narimiran committed Nov 17, 2021
    Configuration menu
    Copy the full SHA
    73366c0 View commit details
    Browse the repository at this point in the history
  3. fixes #19051 [backport:1.6] (#19133)

    (cherry picked from commit c6fc3b2)
    Araq authored and narimiran committed Nov 17, 2021
    Configuration menu
    Copy the full SHA
    167881b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    c7920e9 View commit details
    Browse the repository at this point in the history

Commits on Nov 22, 2021

  1. Fix undeclared 'SYS_getrandom' on emscripten (#19144)

    (cherry picked from commit 270a5a3)
    Anuken authored and narimiran committed Nov 22, 2021
    Configuration menu
    Copy the full SHA
    ab6770e View commit details
    Browse the repository at this point in the history
  2. Merge file size fields correctly on Windows (#19141)

    * Merge file size fields correctly on Windows
    
    Merge file size fields correctly on Windows
    
    - Merge the two 32-bit file size fields from `BY_HANDLE_FILE_INFORMATION` correctly in `rawToFormalFileInfo`.
    - Fixes #19135
    
    * Update os.nim
    
    (cherry picked from commit 0a10498)
    Varriount authored and narimiran committed Nov 22, 2021
    Configuration menu
    Copy the full SHA
    0ba7662 View commit details
    Browse the repository at this point in the history
  3. fix marshal bugs in VM (#19161) [backport:1.6]

    (cherry picked from commit fe46c8b)
    ringabout authored and narimiran committed Nov 22, 2021
    Configuration menu
    Copy the full SHA
    1247043 View commit details
    Browse the repository at this point in the history

Commits on Nov 26, 2021

  1. renamed 'gc' switch to 'mm'; [backport:1.6] (#19187)

    * renamed 'gc' switch to 'mm'; [backport:1.6]
    * better docs
    
    (cherry picked from commit a0073d2)
    Araq authored and narimiran committed Nov 26, 2021
    Configuration menu
    Copy the full SHA
    2bb3a85 View commit details
    Browse the repository at this point in the history

Commits on Dec 6, 2021

  1. misc bugfixes [backport:1.2] (#19203)

    (cherry picked from commit 23c117a)
    Araq authored and narimiran committed Dec 6, 2021
    Configuration menu
    Copy the full SHA
    b614d97 View commit details
    Browse the repository at this point in the history
  2. fixes #19015 [backport:1.6] (#19204)

    (cherry picked from commit d584dd5)
    Araq authored and narimiran committed Dec 6, 2021
    Configuration menu
    Copy the full SHA
    56409c1 View commit details
    Browse the repository at this point in the history
  3. fixes #19198 [backport:1.6] (#19209)

    * fixes #19198 [backport:1.6]
    
    * added a test case
    
    (cherry picked from commit f90620f)
    Araq authored and narimiran committed Dec 6, 2021
    Configuration menu
    Copy the full SHA
    bfa8188 View commit details
    Browse the repository at this point in the history
  4. fixes #19159 [backport:1.6] (#19210)

    (cherry picked from commit 1cbdc15)
    Araq authored and narimiran committed Dec 6, 2021
    Configuration menu
    Copy the full SHA
    8ed903d View commit details
    Browse the repository at this point in the history

Commits on Dec 8, 2021

  1. allow HSlice bounded by constants of distinct types (#19219) [backp…

    …ort:1.2]
    
    When creating heterogenous slices of distinct types, the compiler does
    not initialize the internal type's `size` before accessing it.
    This then leads to this crash message:
    ```
    compiler/int128.nim(594, 11) `false` masking only implemented for 1, 2, 4 and 8 bytes [AssertionError]
    ```
    This patch initializes the `size` properly, fixing the problem.
    
    (cherry picked from commit 0213c73)
    etan-status authored and narimiran committed Dec 8, 2021
    Configuration menu
    Copy the full SHA
    ee876ae View commit details
    Browse the repository at this point in the history
  2. re-enable chronos testing once again [backport:1.2] (#19222)

    (cherry picked from commit 93c8427)
    Araq authored and narimiran committed Dec 8, 2021
    Configuration menu
    Copy the full SHA
    168a878 View commit details
    Browse the repository at this point in the history
  3. fix #19193 (#19195) [backport:1.2]

    (cherry picked from commit cd592ed)
    Menduist authored and narimiran committed Dec 8, 2021
    Configuration menu
    Copy the full SHA
    c14008d View commit details
    Browse the repository at this point in the history

Commits on Dec 10, 2021

  1. fixes a converter handling regression that caused private converters …

    …to leak into client modules; fixes #19213; [backport:1.6] (#19229)
    
    (cherry picked from commit 502ac4e)
    Araq authored and narimiran committed Dec 10, 2021
    Configuration menu
    Copy the full SHA
    7cf5e73 View commit details
    Browse the repository at this point in the history
  2. fixes an old ARC bug: the produced copy/sink operations don't copy th…

    …e hidden type field for objects with enabled inheritance; fixes #19205 [backport:1.6] (#19232)
    
    (cherry picked from commit 32d4bf3)
    Araq authored and narimiran committed Dec 10, 2021
    Configuration menu
    Copy the full SHA
    ac57c31 View commit details
    Browse the repository at this point in the history
  3. move toDeque to after addLast (#19233) [backport:1.0]

    Changes the order of procs definitions in order to avoid calling an undefined proc.
    
    (cherry picked from commit c989542)
    MichalMarsalek authored and narimiran committed Dec 10, 2021
    Configuration menu
    Copy the full SHA
    83c472c View commit details
    Browse the repository at this point in the history
  4. fixes a possible 'javascript:' protocol exploit [backport:1.0] (#19134)

    * fixes a possible 'javascript:' protocol exploit [backport:1.0]
    
    * add tests
    
    * Update tests/stdlib/trstgen.nim
    
    * add the same logic for hyperlinks
    
    * move the logic into a proc
    
    Co-authored-by: narimiran <narimiran@disroot.org>
    (cherry picked from commit 9338aa2)
    Araq and narimiran committed Dec 10, 2021
    Configuration menu
    Copy the full SHA
    4627512 View commit details
    Browse the repository at this point in the history
  5. added --nimMainPrefix switch; fixes #15955; refs #16945 [backport:1.6] (

    #19235)
    
    (cherry picked from commit 7ff43d0)
    Araq authored and narimiran committed Dec 10, 2021
    Configuration menu
    Copy the full SHA
    b7a0c08 View commit details
    Browse the repository at this point in the history
  6. let Nim support Nimble 0.14 with lock-file support [backport:1.6] (#1…

    …9236)
    
    (cherry picked from commit 908fc2a)
    Araq authored and narimiran committed Dec 10, 2021
    Configuration menu
    Copy the full SHA
    a3b370f View commit details
    Browse the repository at this point in the history

Commits on Dec 11, 2021

  1. nimRawSetjmp: support Windows (#19197)

    * nimRawSetjmp: support Windows
    
    Using `_setjmp()` directly is required to avoid some rare (but very
    annoying) exception-related stack corruption leading to segfaults on
    Windows, with Mingw-w64 and SEH.
    More details: status-im/nimbus-eth2#3121
    
    Also add "nimBuiltinSetjmp" - mostly for benchmarking.
    
    * fix for Apple's Clang++
    
    (cherry picked from commit 69aabda)
    stefantalpalaru authored and narimiran committed Dec 11, 2021
    Configuration menu
    Copy the full SHA
    a2f5e98 View commit details
    Browse the repository at this point in the history
  2. nimc.rst: fix table markup (#19239)

    (cherry picked from commit 1a92ede)
    stefantalpalaru authored and narimiran committed Dec 11, 2021
    Configuration menu
    Copy the full SHA
    bcf9448 View commit details
    Browse the repository at this point in the history
  3. Update uri.nim (#19148) [backport:1.0]

    (cherry picked from commit a3ef5df)
    dom96 authored and narimiran committed Dec 11, 2021
    Configuration menu
    Copy the full SHA
    e3a07f1 View commit details
    Browse the repository at this point in the history

Commits on Dec 14, 2021

  1. basicopt.txt: Unify the format (#19251)

    (cherry picked from commit 78b86b7)
    NanXiao authored and narimiran committed Dec 14, 2021
    Configuration menu
    Copy the full SHA
    7032048 View commit details
    Browse the repository at this point in the history
  2. [backport:1.0] json: limit recursion depth (#19252)

    * json: limit recursion depth
    
    * do not run this check for JS backend
    
    (cherry picked from commit c17baae)
    narimiran committed Dec 14, 2021
    Configuration menu
    Copy the full SHA
    48c62ca View commit details
    Browse the repository at this point in the history

Commits on Dec 16, 2021

  1. bump NimVersion to 1.6.2

    narimiran committed Dec 16, 2021
    Configuration menu
    Copy the full SHA
    9084d9b View commit details
    Browse the repository at this point in the history