fixes broken importc for vcc [backport] (#20909)
fixes broken imports for vcc (cherry picked from commit b7d96cd)
Fix several memory leaks in the Postgres wrapper. (#20940)
(cherry picked from commit 5a848a0)
dom: remove X* = ref XObj [backport] (#20910)
dom: remove X* = ref XObj (cherry picked from commit ce97140)
fixes #20954; bounchecks for len(toOpenArray()) [backport] (#20956)
* bounchecks for len(toOpenArray()) * add a testcase (cherry picked from commit b83bd28)
fix #19580; add warning for bare except: clause (#21099)
* fix #19580; add warning for bare except: clause * fixes some easy ones * Update doc/manual.md * fixes docs * Update changelog.md * addition * Apply suggestions from code review Co-authored-by: Jacek Sieka <arnetheduck@gmail.com> * Update doc/tut2.md Co-authored-by: Jacek Sieka <arnetheduck@gmail.com> (cherry picked from commit 91ce8c3)
Revert "fix bare exceptions in excpt.nim"
This reverts commit babd80b.
Check file exists in {.compile.} pragma (#21105)
* Add test * Check file exists before adding it into compilation * Make error message look like other error messages i.e. following the format `error msg: file` (cherry picked from commit d00477d)
Allow std/macros.params to work with nnkProcTy (#19563)
* Allow std/macros.params to work with nnkProcTy * Add tests for proc params & pragma (cherry picked from commit ef3f343)
Implement setLineInfo (#21153)
* Implement setLineInfo * Add tests (cherry picked from commit 613829f)
Implicitly set noNimblePath when nimble.lock is present (#21266)
Fixes nim-lang/nimble#1004 (cherry picked from commit 7c6dcfd)
Add nkFastAsgn into semExpr (#20939)
* Add nkFastAsgn into case statement * Add test case (cherry picked from commit d26b123)
Add osx support for ODBC driver when linking libodbc (#21291)
Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>
Always use httpclient in nimgrab (#19767)
(cherry picked from commit 06f02bb)
Implemented basic macro expand functionality (#20579)
* Implemented level based macro expand functionality - it can handle single macro call or expand whole function/proc/etc and it - In addition, I have altered the parser to provide the endInfo for the node. The usefulness of the `endInfo` is not limited to the `expandMacro` functionality but also it is useful for `ideOutline` functionality and I have altered the ideOutline functionality to use `endInfo`. Note `endInfo` most of the time is lost during the AST transformation thus in `nimsuggest.nim` I am using freshly parsed tree to get the location information. * Make sure we stop expanding correctly * Test CI * Fix tv3_outline.nim (cherry picked from commit 7031ea6)
Fix the nimble build on Windows (#21314)
Fix the build on Windows - `nimble install` fails on Windows, the `./` is not needed. (cherry picked from commit 43b1b9d)
fixes #21317; 1.6.4 regression; etyBaseIndex should return fat pointe…
fixes SSL version check logic [backport] (#21324)
* fixed version check logic [backport] * add ciphersuites * debug nimble * fixes returns omission * finally * remove debug message * add ciphersuites --------- Co-authored-by: Araq <rumpf_a@web.de> (cherry picked from commit 17115cb)
fixes #21333; bad codegen for the at operator; [backport:1.6] (#21344)
(cherry picked from commit 9fb4c2b)
This adds parseutils.parseSize, an inverse to strutils.formatSize (…
…#21349) * This adds `parseutils.parseSize`, an inverse to `strutils.formatSize` which has existed since 2017. It is useful for parsing the compiler's own output logs (like SuccessX) or many other scenarios where "human readable" units have been chosen. The doc comment and tests explain accepted syntax in detail. Big units lead to small numbers, often with a fractional part, but we parse into an `int64` since that is what `formatSize` stringifies and this is an inverse over partial function slots. Although metric prefixes z & y for zettabyte & yottabyte are accepted, these will saturate the result at `int64.high` unless the qualified number is a small fraction. This should not be much of a problem until such sizes are common (at which point another overload with the parse result either `float64` or `int128` could be added). Tests avoids `test()` because of a weakly related static: test() failure as mentioned in #21325. This is a more elemental VM failure. As such, it needs its own failure exhibition issue that is a smaller test case. (I am working on that, but unless there is a burning need to `parseSize` at compile-time before run-time it need not hold up this PR.) * This worked with `int` but fails with `int64`. Try for green tests. * Lift 2-result matching into a `checkParseSize` template and format as a table of input & 2 expected outputs which seems nicer and to address #21349 (review) * Fix (probably) the i386 trouble by using `int64` consistently. * Improve documentation by mentioning saturation. * Improve documentation with `runnableExamples` and a little more detail in the main doc comment based on excellent code review by @juancarlospaco: #21349 (review) * Address some more @juancarlospaco code review concerns. * Remove a stray space. * Mention milli-bytes in docs to maybe help clarify why wild conventions are so prone to going case-insensitive-metric. * Add some parens. (cherry picked from commit 1d06c2b)
Fix closeHandle bug, add setFileSize, make resize work on Windo…
…ws (#21375) * Add general purpose `setFileSize` (unexported for now). Use to simplify `memfiles.open` as well as make robust (via hard allocation, not merely `ftruncate` address space allocation) on systems with `posix_fallocate`. As part of this, fix a bad `closeHandle` return check bug on Windows and add `MemFile.resize` for Windows now that setFileSize makes that easier. * Adapt existing test to exercise newly portable `MemFile.resize`. * Since Apple has never provided `posix_fallocate`, provide a fallback. This is presently written in terms of `ftruncate`, but it can be improved to use `F_PREALLOCATE` instead, as mentioned in a comment. (cherry picked from commit c91ef1a)
fixes #1027; disallow templates to use ambiguous identifiers (#21405)
* Add `nkFastAsgn` into `semExpr` (#20939) * Add nkFastAsgn into case statement * Add test case * fixes #1027; disallow templates to use ambiguous identifiers (#20631) * test qualifiedLookUp in templates * check later * add testcase * add 4errormsg * Update tests/template/m1027a.nim Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com> * Update tests/template/m1027b.nim Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com> Co-authored-by: Andreas Rumpf <rumpf_a@web.de> Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com> --------- Co-authored-by: Jake Leahy <jake@leahy.dev> Co-authored-by: Andreas Rumpf <rumpf_a@web.de> Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>
fixes #20422; emit nimPrepareStrMutationV2 for toOpenArray to keep th… (
Backport #20466 - macOS use SecRandomCopyBytes instead of getentropy (#…
…21389) * On macOS use SecRandomCopyBytes instead of getentropy (which is only available on macOS 10.12+) * Change passL to passl --------- Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com> Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
fixes #20139; hash types based on its path relative to its package pa…