Commits on May 19, 2022

  1. bump NimVersion to 1.6.7

    narimiran committed May 19, 2022
    Configuration menu
    Copy the full SHA
    7d120b8 View commit details
    Browse the repository at this point in the history
  2. Remove volatiles when compiling with ARC/ORC (#19545)

    This removes volatiles on ARC/ORC targets in NimMain and PreMainInner.
    This avoids an issue where they couldn't be optimised out on
    microcontrollers leading to larger code. Since the stack bottom doesn't
    have to be initialised this way when using ARC or ORC (or None, which is
    also covered by this PR) these can be safely removed.
    
    (cherry picked from commit 9a49451)
    PMunch authored and narimiran committed May 19, 2022
    Configuration menu
    Copy the full SHA
    62d1d05 View commit details
    Browse the repository at this point in the history
  3. Fix punycode.decode function (#19136)

    * Refactor: rename proc to func
    
    * Fix punycode.decode function
    
    This function could only properly decode punycodes containing a single
    encoded unicode character. As soon as there was more than one punycode
    character group to decode it produced invalid output - the number of
    characters was correct, but their position was not.
    
    * Update tpunycode.nim
    
    Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>
    (cherry picked from commit ade85ee)
    2 people authored and narimiran committed May 19, 2022
    Configuration menu
    Copy the full SHA
    02d9496 View commit details
    Browse the repository at this point in the history

Commits on May 22, 2022

  1. enable style:usages for stdlib tests [backport: 1.6] (#19715)

    * enable style:usages for stdlib tests
    
    * freeAddrInfo
    
    * more tests
    
    * importc
    
    * bufSize
    
    * fix more
    
    * => parseSql and renderSql
    
    (cherry picked from commit 98cebad)
    ringabout authored and narimiran committed May 22, 2022
    Configuration menu
    Copy the full SHA
    0b44840 View commit details
    Browse the repository at this point in the history

Commits on May 24, 2022

  1. testament: include extra options in test name (#19801)

    there's currently no (simple) way to disambiguate which option failed
    
    (cherry picked from commit 63cca93)
    arnetheduck authored and narimiran committed May 24, 2022
    Configuration menu
    Copy the full SHA
    26707a6 View commit details
    Browse the repository at this point in the history
  2. Fix default testament target in docs and cli help (#19796)

    Co-authored-by: quantimnot <quantimnot@users.noreply.github.com>
    (cherry picked from commit a8426fc)
    2 people authored and narimiran committed May 24, 2022
    Configuration menu
    Copy the full SHA
    c6e3ad4 View commit details
    Browse the repository at this point in the history
  3. Fix typo in sequtils documentation (#19789)

    Found another small typo.
    
    (cherry picked from commit 19001c0)
    AnthonyDario authored and narimiran committed May 24, 2022
    Configuration menu
    Copy the full SHA
    28af1e5 View commit details
    Browse the repository at this point in the history
  4. varargs example erroneously transformed "abc" to "def" (#19781)

    (cherry picked from commit 85bc832)
    Zectbumo authored and narimiran committed May 24, 2022
    Configuration menu
    Copy the full SHA
    3e39f5b View commit details
    Browse the repository at this point in the history

Commits on May 25, 2022

  1. tests: Fix warnings in tstrscans (#19082)

    (cherry picked from commit 2e0db98)
    kaushalmodi authored and narimiran committed May 25, 2022
    Configuration menu
    Copy the full SHA
    64689f9 View commit details
    Browse the repository at this point in the history
  2. std/tasks: fix spelling (#19691) [backport]

    why aren't these not being caught by style check options?
    --styleCheck:usages finds it.
    
    Co-authored-by: flywind <xzsflywind@gmail.com>
    (cherry picked from commit cb6ce80)
    2 people authored and narimiran committed May 25, 2022
    Configuration menu
    Copy the full SHA
    b0cbc9a View commit details
    Browse the repository at this point in the history
  3. style usages part one (openarray => openArray) (#19321)

    * style usages (openArray)
    
    * revert doc changes
    
    (cherry picked from commit 9df195e)
    ringabout authored and narimiran committed May 25, 2022
    Configuration menu
    Copy the full SHA
    1368316 View commit details
    Browse the repository at this point in the history

Commits on Jun 9, 2022

  1. fix #19862; make widestrs consistent between refc and orc (#19874) [b…

    …ackport]
    
    fix #19862; make widestrs consistent in refc and orc
    
    (cherry picked from commit 1972005)
    ringabout authored and narimiran committed Jun 9, 2022
    Configuration menu
    Copy the full SHA
    06f1828 View commit details
    Browse the repository at this point in the history

Commits on Jun 19, 2022

  1. Initial implementation of nimsuggest v3 (#19826) [backport] (#19892)

    * Initial implementation of nimsuggest v3 (#19826)
    
    * Initial implementation of nimsuggest v3
    
    Rework `nimsuggest` to use caching to make usage of ide commands more efficient.
    Previously, all commands no matter what the state of the process is were causing
    clean build. In the context of Language Server Protocol(LSP) and lsp clients
    this was causing perf issues and overall instability. Overall, the goal of v3 is
    to fit to LSP Server needs
    
    - added two new commands:
      - `recompile` to do clean compilation
      - `changed` which can be used by the IDEs to notify that a particular file has been changed.
    The later can be utilized when using LSP file watches.
      - `globalSymbols` - searching global references
    
    - added `segfaults` dependency to allow fallback to clean build when incremental
    fails. I wish the error to be propagated to the client so we can work on fixing
    the incremental build failures (typically hitting pointer)
    
    - more efficient rebuild flow. ATM incremental rebuild is triggered when the
    command needs that(i. e. it is global) while the commands that work on the
    current source rebuild only it
    
    Things missing in this PR:
    
    - Documentation
    - Extensive unit testing.
    
    Although functional I still see this more as a POC that this approach can work.
    
    Next steps:
    - Implement `sug` request.
    - Rework/extend the protocol to allow better client/server communication.
    Ideally we will need push events, diagnostics should be restructored to allow
    per file notifications, etc.
    - implement v3 test suite.
    - better logging
    
    * Add tests for v3 and implement ideSug
    
    * Remove typeInstCache/procInstCache cleanup
    
    * Add ideChkFile command
    
    * Avoid contains call when adding symbol info
    
    * Remove log
    
    * Remove segfaults
    
    * Fixed bad cherry-pick resolve
    
    * modulegraphs.dependsOn does not work on transitive modules
    
    - make sure transitive deps are marked as dirty
    yyoncho authored Jun 19, 2022
    Configuration menu
    Copy the full SHA
    ab0d068 View commit details
    Browse the repository at this point in the history

Commits on Jun 20, 2022

  1. not generate initStackBottomWith in arc/orc [backport] (#19875)

    not generate initStackBottomWith in arc/orc
    
    (cherry picked from commit eefca1b)
    ringabout authored and narimiran committed Jun 20, 2022
    Configuration menu
    Copy the full SHA
    4873221 View commit details
    Browse the repository at this point in the history
  2. Pass headers and body correctly to FetchOptions (#19884) [backport]

    * Pass headers to FetchOptions
    
    Don't pass body if method is HttpGet or HttpHead
    
    * Syntax fixes
    
    * Restart CI
    
    (cherry picked from commit 8fa2c0b)
    ire4ever1190 authored and narimiran committed Jun 20, 2022
    Configuration menu
    Copy the full SHA
    efe5a33 View commit details
    Browse the repository at this point in the history
  3. [semfold] fix #19199; properly fold uint to float conversion (#19890)…

    … [backport]
    
    fix #19199; properly fold float conversion
    
    (cherry picked from commit ab47707)
    ringabout authored and narimiran committed Jun 20, 2022
    Configuration menu
    Copy the full SHA
    2064fda View commit details
    Browse the repository at this point in the history
  4. Windows: enable nimRawSetjmp by default [backport] (#19891)

    * Windows: enable nimRawSetjmp by default
    
    See #19197. The default setjmp can randomly segfault on windows
    
    * Attempt to disable the flag for bootstraping
    
    * Disable styleCheck for c_setjmp
    
    (cherry picked from commit 251bdc1)
    Menduist authored and narimiran committed Jun 20, 2022
    Configuration menu
    Copy the full SHA
    a1f413b View commit details
    Browse the repository at this point in the history
  5. Fix nimRawSetjmp for VCC [backport: 1.2] (#19899)

    (cherry picked from commit 40464fa)
    Menduist authored and narimiran committed Jun 20, 2022
    Configuration menu
    Copy the full SHA
    1561a83 View commit details
    Browse the repository at this point in the history

Commits on Jun 23, 2022

  1. [vm]fixes #15974 #12551 #19464 #16020 #16780 #16613 #14553 #19909 #18641

     (#19902) [backport]
    
    * revert #12217 since the root problem seems to have been fixed; fix #15974;fix #12551; fix #19464
    
    * fix #16020; fix #16780
    
    * fix tests and #16613
    
    * fix #14553
    
    * fix #19909; skip skipRegisterAddr
    
    * fix #18641
    
    (cherry picked from commit 3cb2d7a)
    ringabout authored and narimiran committed Jun 23, 2022
    Configuration menu
    Copy the full SHA
    6f290fa View commit details
    Browse the repository at this point in the history

Commits on Jun 30, 2022

  1. dec inLoop after exiting the while scope in computeLiveRanges [backpo…

    …rt] (#19918)
    
    * dec inLoop after exiting the while scope in computeLiveRanges
    
    * add testcase
    
    (cherry picked from commit bcff13d)
    ringabout authored and narimiran committed Jun 30, 2022
    Configuration menu
    Copy the full SHA
    c9a5297 View commit details
    Browse the repository at this point in the history
  2. once C++, always C++ [backport] (#19938)

    * once C++, always C++
    
    When using `{.compile: "file.cc".}` in a nim module, even when compiling
    with `nim c` the C++ compiler should be used - once any C++ file has
    been compiled, the C++ linker also needs to be used.
    
    * more strict C++ check
    
    * simplify code
    
    (cherry picked from commit ad430c0)
    arnetheduck authored and narimiran committed Jun 30, 2022
    Configuration menu
    Copy the full SHA
    7c78154 View commit details
    Browse the repository at this point in the history

Commits on Jul 7, 2022

  1. sysrand: fix syscall signature [backport] (#19982)

    sysrand: fix syscall signature
    
    `syscall` is a `C` varags function
    
    (cherry picked from commit ad0aee5)
    arnetheduck authored and narimiran committed Jul 7, 2022
    Configuration menu
    Copy the full SHA
    b1f325d View commit details
    Browse the repository at this point in the history

Commits on Jul 11, 2022

  1. Fix nested finally handling in closureiters [backport] (#19933)

    * Fix nested finally handling in closureiters
    
    * Fix CI
    
    * review comment
    
    * third time the charm
    
    * Update compiler/closureiters.nim
    
    Co-authored-by: Dominik Picheta <dominikpicheta@googlemail.com>
    
    Co-authored-by: Dominik Picheta <dominikpicheta@googlemail.com>
    (cherry picked from commit fb5fbf1)
    2 people authored and narimiran committed Jul 11, 2022
    Configuration menu
    Copy the full SHA
    9508b06 View commit details
    Browse the repository at this point in the history

Commits on Jul 15, 2022

  1. [Orc] fixes "streams.readDataStr segafaults" when accepting a string …

    …literal (#20019) [backport]
    
    fixes streams.readDataStr accept a string literal
    
    (cherry picked from commit 286fcef)
    ringabout authored and narimiran committed Jul 15, 2022
    Configuration menu
    Copy the full SHA
    e9d5a9d View commit details
    Browse the repository at this point in the history

Commits on Jul 16, 2022

  1. Correct emscripten shortcoming (#19987)

    emscripten reports infinity for every getrlimit() requests, which does
    not work when requesting the max number of file descriptors (prlimit64
    syscall). This patch provides a default of 1024 which is common on Linux.
    
    This is used in particular in ioselectors_poll.nim and te invalid value
    makes it crash.
    mildred authored Jul 16, 2022
    Configuration menu
    Copy the full SHA
    0e71384 View commit details
    Browse the repository at this point in the history

Commits on Jul 17, 2022

  1. Implement type command (#19944)

    * Implement type command
    
    - this will be mapped to textDocument/typeDefinition in LSP protocol. It will be
    very useful for `nim` in particular because typically most of the time the type
    is inferred.
    
    * Update nimsuggest/nimsuggest.nim
    
    Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
    (cherry picked from commit e636c21)
    2 people authored and narimiran committed Jul 17, 2022
    Configuration menu
    Copy the full SHA
    46f0f6e View commit details
    Browse the repository at this point in the history
  2. Use module actual file instead of PSym.info (#19956)

    After this you can do goto module from module import
    
    (cherry picked from commit b0b9a3e)
    yyoncho authored and narimiran committed Jul 17, 2022
    Configuration menu
    Copy the full SHA
    a3c2eb0 View commit details
    Browse the repository at this point in the history
  3. fix #18735; genDepend broken for duplicate module names in separate f…

    …olders (#19988)
    
    (cherry picked from commit 0180c61)
    ringabout authored and narimiran committed Jul 17, 2022
    Configuration menu
    Copy the full SHA
    3fd11d7 View commit details
    Browse the repository at this point in the history
  4. testament: use full test name in skips [backport] (#19937)

    testament: use full test name in skips
    (cherry picked from commit 094d86f)
    arnetheduck authored and narimiran committed Jul 17, 2022
    Configuration menu
    Copy the full SHA
    8786e7d View commit details
    Browse the repository at this point in the history

Commits on Jul 18, 2022

  1. Refactor and doc package handling, module name mangling (#19821)

    * Refactor and doc package handling, module name mangling
    
    * Consolidate, de-duplicate and extend package handling
    * Alter how duplicate module names of a package are handled
    * Alter how module names are mangled
    * Fix crash when another package is named 'stdlib' (test case added)
    * Doc what defines a package in the manual
    
    Modules with duplicate names within a package used to be given 'fake'
    packages to resolve conflicts. That prevented the ability to discern if
    a module belonged to the current project package or a foreign package.
    They now have the proper package owner and the names are mangled in a
    consistent manner to prevent codegen clashes.
    
    All module names are now mangled the same. Stdlib was treated special
    before, but now it is same as any other package. This fixes a crash
    when a foreign package is named 'stdlib'.
    
    Module mangling is altered for both file paths and symbols used by the
    backends.
    
    Removed an unused module name to package mapping that may have been
    intended for IC. The mapping was removed because it wasn't being used
    and was complicating the issue of package modules with duplicate names
    not having the proper package owner assigned.
    
    * Fix some tests
    
    * Refactor `packagehandling`
    
    * Remove `packagehandling.withPackageName` and its uses
    * Move module path mangling from `packagehandling` to `modulepaths`
    * Move `options.toRodFile` to `ic` to break import cycle
    
    * Changed import style to match preferred style
    
    Co-authored-by: quantimnot <quantimnot@users.noreply.github.com>
    (cherry picked from commit d30c641)
    2 people authored and narimiran committed Jul 18, 2022
    Configuration menu
    Copy the full SHA
    fd76c00 View commit details
    Browse the repository at this point in the history
  2. fix pthread_mutex_t size (#20055)

    (cherry picked from commit c6264ed)
    arnetheduck authored and narimiran committed Jul 18, 2022
    Configuration menu
    Copy the full SHA
    8a98177 View commit details
    Browse the repository at this point in the history
  3. fixes #19404 by protecting the memory we borrow from. this replaces c…

    …rashes with minor memory leaks which seems to be acceptable. In the longer run we need a better VM that didn't grow hacks over a decade. (#19515)
    
    Co-authored-by: flywind <xzsflywind@gmail.com>
    (cherry picked from commit ed0dce7)
    2 people authored and narimiran committed Jul 18, 2022
    Configuration menu
    Copy the full SHA
    ac7efa1 View commit details
    Browse the repository at this point in the history
  4. [cleanup] remove unnecessary procs in vm (#19888)

    remove unused procs
    
    (cherry picked from commit 2f49006)
    ringabout authored and narimiran committed Jul 18, 2022
    Configuration menu
    Copy the full SHA
    c9e7798 View commit details
    Browse the repository at this point in the history
  5. [Tiny] correct comment opcDeref => opcLdDeref (#19908)

    correct comment opcDeref => opcLdDeref
    
    (cherry picked from commit a65db5e)
    ringabout authored and narimiran committed Jul 18, 2022
    Configuration menu
    Copy the full SHA
    62ac3a0 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    5f61f15 View commit details
    Browse the repository at this point in the history

Commits on Jul 25, 2022

  1. epoll: correct mapping [backport] (#20058)

    * epoll: correct mapping
    
    `epoll_data` is a union and `epoll_event` is packed on `amd64`
    
    * names
    
    (cherry picked from commit f2e4407)
    arnetheduck authored and narimiran committed Jul 25, 2022
    Configuration menu
    Copy the full SHA
    5771a0f View commit details
    Browse the repository at this point in the history
  2. fix #20067, fix #18976 [backport] (#20069)

    (cherry picked from commit 685bf94)
    metagn authored and narimiran committed Jul 25, 2022
    Configuration menu
    Copy the full SHA
    7d0bfc6 View commit details
    Browse the repository at this point in the history
  3. Use passc and passl consistently with compiler checking (#20068)

    (cherry picked from commit 1a9123e)
    tersec authored and narimiran committed Jul 25, 2022
    Configuration menu
    Copy the full SHA
    d53a057 View commit details
    Browse the repository at this point in the history
  4. Correctly detect major version of GCC (#20059)

    We were doing a very poor job detecting the major version of GCC by
    parsing the output of --version.
    
    This patches uses -dumpversion to make this parsing straightforward and
    it also fixes a bunch of compiling issues on different platforms with
    custom output for --version switches. For example, openSUSE first line
    of the output includes the revision number and the parsing that was
    being done did mix that number with the major version and breaks
    building the nim compiler (as it doesn't find the 3 dots for an X.Y.Z semver
    format, hence returning "false").
    
    In this patch, we simply use -dumpversion (which has been at least from
    1993, so we are safe :)
    
    (cherry picked from commit efcb89f)
    kraptor authored and narimiran committed Jul 25, 2022
    Configuration menu
    Copy the full SHA
    621061d View commit details
    Browse the repository at this point in the history
  5. Revert "Correct emscripten shortcoming" (#20082)

    Revert "Correct emscripten shortcoming (#19987)"
    
    This reverts commit 0e71384.
    ringabout authored Jul 25, 2022
    Configuration menu
    Copy the full SHA
    0277cd5 View commit details
    Browse the repository at this point in the history

Commits on Jul 27, 2022

  1. fixes #20031; uint64 is an ordinal type since 1.0 (#20094)

    * fixes #20031; uint64 is an ordinal type since 1.0
    
    * Update compiler/semstmts.nim
    
    (cherry picked from commit 5bbc5ed)
    ringabout authored and narimiran committed Jul 27, 2022
    Configuration menu
    Copy the full SHA
    17e61c7 View commit details
    Browse the repository at this point in the history

Commits on Jul 28, 2022

  1. fixes broken CI; bump macOS version to macos-11 (#20098)

    * bump macOS image on Azure CI to macos-11
    
    ##[warning]The macOS-10.15 environment is deprecated, consider switching to macos-11(macos-latest), macos-12 instead. For more details see actions/runner-images#5583
    
    * fix CI error
    
    (cherry picked from commit 8ef509b)
    ringabout authored and narimiran committed Jul 28, 2022
    Configuration menu
    Copy the full SHA
    000e687 View commit details
    Browse the repository at this point in the history

Commits on Aug 2, 2022

  1. Change styleCheck to ignore foreign packages (#19822)

    * Change `styleCheck` to ignore foreign packages
    
    * Symbols from foreign packages are now ignored.
    * Fixed `styleCheck` violations in `compiler` package.
    * Added symbol ownership to custom annotation pragmas.
    * Minor refactors to cleanup style check callsites.
    * Minor internal documentation of reasons why a symbol isn't checked.
    
    Style violations were fixed in the compiler after thet were exposed by
    the changes. The compiler wouldn't compile otherwise.
    
    Symbol ownership for custom pragma annotations is needed for checking
    the annotation's style. A NPE was raised otherwise.
    
    Fixes #10201
    See also nim-lang/RFCs#456
    
    * Fix a misunderstanding about excluding field style checks
    
    I had refactored the callsites of `styleCheckUse` to apply the DRY
    principle, but I misunderstood the field access handling in a template
    as a general case. This corrects it.
    
    * Fix some `styleCheck` violations in `compiler/evalffi`
    
    The violations were exposed in CI when the compiler was built with
    libffi.
    
    * Removed some uneeded transitionary code
    
    * Add changelog entry
    
    Co-authored-by: quantimnot <quantimnot@users.noreply.github.com>
    (cherry picked from commit 800cb00)
    2 people authored and narimiran committed Aug 2, 2022
    Configuration menu
    Copy the full SHA
    c484943 View commit details
    Browse the repository at this point in the history

Commits on Aug 3, 2022

  1. Fixed compilation of void closureiters with try stmt (#20138) [backport]

    (cherry picked from commit 0d734d7)
    yglukhov authored and narimiran committed Aug 3, 2022
    Configuration menu
    Copy the full SHA
    65e0906 View commit details
    Browse the repository at this point in the history

Commits on Aug 15, 2022

  1. Don't require blank line before Markdown code (1.6) (#20216)

    Don't require blank line before Markdown code
    
    Fixes bug reported in #20189
    affecting nimforum.
    (manually backported version to 1.6 from devel)
    a-mr authored Aug 15, 2022
    Configuration menu
    Copy the full SHA
    831fed1 View commit details
    Browse the repository at this point in the history

Commits on Aug 23, 2022

  1. fixes #20132; fixes the broken jsondoc comand [backport] (#20135)

    * fixes #20132; fixes the broken jsondoc comand
    
    * add testcase
    
    (cherry picked from commit 2aeb0d5)
    ringabout authored and narimiran committed Aug 23, 2022
    Configuration menu
    Copy the full SHA
    33a1e3a View commit details
    Browse the repository at this point in the history
  2. fixes #20153; do not escape _ for mysql [backport] (#20164)

    * 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>
    (cherry picked from commit 3bd935f)
    2 people authored and narimiran committed Aug 23, 2022
    Configuration menu
    Copy the full SHA
    d79f61e View commit details
    Browse the repository at this point in the history
  3. fixes #20107 (#20246) [backport]

    (cherry picked from commit b1fe169)
    Araq authored and narimiran committed Aug 23, 2022
    Configuration menu
    Copy the full SHA
    dda6181 View commit details
    Browse the repository at this point in the history
  4. fixes #20162; locals doesn't work with ORC [backport] (#20163)

    fixes #20162; locals doesn't work with ORC
    
    (cherry picked from commit 25c6491)
    ringabout authored and narimiran committed Aug 23, 2022
    Configuration menu
    Copy the full SHA
    a9485f1 View commit details
    Browse the repository at this point in the history
  5. Build compiler with --noNimblePath (#20168)

    - Fixes #18840
    
    (cherry picked from commit ec2bc2a)
    yyoncho authored and narimiran committed Aug 23, 2022
    Configuration menu
    Copy the full SHA
    5ea0e56 View commit details
    Browse the repository at this point in the history