Commit Graph

66 Commits

Author SHA1 Message Date
ringabout
cca5e5ffb9 fixes #22065; do not search path for relative imports (#22073)
* fixes #22065; do not search path for "./"

* simplify

* fixes

* fixes

* allow ".."

* cleanup

* add a test case

* slightly modify the import

* adds a changelog
2023-06-13 13:23:11 +02:00
Jake Leahy
d3af0882cf BackwardsIndex overload for CacheSeq.[] (#22043)
* Add `BackwardsIndex` support for `CacheSeq`

* Add changelog entry

---------

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2023-06-10 14:43:32 +02:00
awr1
18462b1026 Add nested with to changelog (#22053)
Add nested with to changelog
2023-06-09 14:40:17 +02:00
metagn
20446b437b make proc not implicitly convert to pointer with a preview define (#21953)
* test `proc` not converting to `pointer`

* ignore define for now to test

* remove cstring

* fixes, changelog
2023-05-30 21:29:38 +02:00
ringabout
40f88da90b alternative to #21914; split, rsplit now forbid an empty separator (#21961) 2023-05-30 13:40:09 +02:00
Juan Carlos
b96c501836 Refactor pragma inline (#21930)
* Add __force_inline support
2023-05-27 20:52:08 +02:00
Juan Carlos
38fdf13982 Clean nimbase (#21927)
* .

* Clean out nimbase.h

* Clean out nimbase.h
2023-05-27 07:44:15 +02:00
Zoom
656706026b JS: Add some to-cstring converters for DateTime (#21912)
Add some to-cstring converters for DateTime

Changelog update
2023-05-26 16:40:53 +02:00
metagn
4d6be458a0 js -r defines nodejs & program result undeclared if unavailable (#21849)
* js -r defines nodejs & program result undefined if unavailable

fixes #16985, fixes #16074

* fix

* add changelog too

* minor word change
2023-05-24 17:55:09 +02:00
Juan Carlos
d372ad3ee6 Fix jsgen (#21880)
* .

* Fix jsgen FrameInfo

* Fix jsgen FrameInfo

* .

* Move to PProc
2023-05-23 09:59:21 +02:00
ringabout
b14043c39e revert #21808 (#21881) 2023-05-22 12:53:50 +08:00
metagn
161f50643a make deprecated statement a no-op (#21836) 2023-05-12 10:05:38 +02:00
Matt Wilson
ea39c600ab Add minmax to comparisons (#21820)
* Add `minmax` to sequtils

This adds a `minmax` proc to complement `min` and `max`; it computes
both results in a single pass for efficiency.

* Update lib/pure/collections/sequtils.nim

* Add minmax note to changelog.

---------

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2023-05-12 14:02:09 +08:00
Juan Carlos
3a08e2e6ac Remove LineTooLong (#21819)
* LineTooLong refactor to make it actually useful
* Improve error message
* changelog wording
* Fix typo
2023-05-11 10:10:51 +02:00
ringabout
71439c2891 fixes links of generic define pragma (#21828) 2023-05-11 15:00:30 +08:00
Juan Carlos
4ee70165f1 Add build-id=none for GCC when build for Release (#21808)
* Add build-id=none to GCC/Clang, unneeded metadata in binaries

* Add build-id=none to GCC/Clang, unneeded metadata in binaries

* Add build-id=none to Clang

* Fix

* Fix

* Add build-id=none to GCC
2023-05-08 18:53:32 +02:00
ringabout
724866b14f adds koch --skipIntegrityCheck boot support (#21795)
add `koch --skipIntegrityCheck boot` support
2023-05-05 13:58:29 +02:00
ringabout
f37ecbb994 closes #21778; document threading/channels (#21779) 2023-05-03 19:25:07 +08:00
ringabout
afc30ca879 fixes #19863; move sha1, md5 to nimble packages for 2.0 (#21702)
* move sha1, md5 to nimble packages

* boot the compiler

* fixes tests

* build the documentation

* fixes docs

* lol, I forgot koch.nim

* add `nimHasChecksums` define

* clone checksums but maybe copying is better

* bump nimble hash

* use ChecksumsStableCommit

* fixes tests

* deprecate them

* fixes paths

* fixes koch
2023-05-02 10:49:17 +02:00
Andreas Rumpf
220b450489 fixes #21245; warn about destructors that can raise (#21726)
* fixes #21245; warn about destructors that can raise

* doc update

* progress

* typo
2023-04-26 22:32:10 +02:00
ringabout
69c193e5e2 fixes #21731; fixes #21537; disable warnBareExcept by default [backport] (#21728)
* disable warnBareExcept for default

* fixes a typo
2023-04-26 08:04:13 +02:00
ringabout
d2d849db8e docuement case statement breaking changes in the changelog (#21686)
Reported on Discord 
follow up https://github.com/nim-lang/Nim/pull/20862
2023-04-19 14:19:30 +08:00
metagn
b0a98cc01e warn on set types bigger than max size, default to 0..255 for int literals (#21659)
* test implicitly huge set types

refs https://github.com/nim-lang/RFCs/issues/298

* oh my god

* boot at least

* don't error, fix remaining issues, no 2 len arrays

* fix runnable example

* test assuming 0..255 for int literal

* test refactor, add changelog, test
2023-04-17 20:55:22 +02:00
Andrey Makarov
a0da74ed4c Update nim 2.0 documentation for docgen & nimgrep (#21665)
* Update nim 2.0 documentation for docgen & nimgrep

* [skip ci] Update changelogs/changelog_2_0_0.md

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>

* [skip ci] expand section on Markdown migration and `doctype`

---------

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2023-04-17 10:57:51 +02:00
metagn
f05387045d int64/uint64 as bigint in JS (#21613)
* int64/uint64 as bigint in JS

* fix CI

* convert to compile option

* fix lie

* smaller diff, changelog entry
2023-04-11 21:20:20 +02:00
metagn
1bb117cd7a proc typeclass accounts for iterator, call conventions + nil fix + document typeclass AST (#21629)
* test fix #16546 #16548 + another issue

* please don't tell me other packages do this

* fix CI + test typeclass callconv pragma

* better logic in parser

* docs and changelog
2023-04-11 09:23:41 +02:00
ringabout
c71192043b fixes #21392; document nimble develop breaking changes (#21614) 2023-04-04 20:37:01 +02:00
ringabout
1c7fd71720 fixes changelog (#21590) 2023-03-31 15:51:37 +08:00
metagn
ecf9efa397 document general use of _, error message, fixes (#21584)
* document general use of `_`, error message, fixes

fixes #20687, fixes #21435

Documentation and changelog updated to clarify new universal behavior
of `_`. Also new error message for attempting to use `_`, new tests,
and fixes with overloadable symbols and
implicit generics.

* add test for #21435
2023-03-30 15:34:42 +02:00
metagn
2315b01ae6 tuple unpacking for vars as just sugar, allowing nesting (#21563)
* tuple unpacking for vars as just sugar, allowing nesting

* set temp symbol AST

* hopeful fix some issues, add test for #19364

* always use temp for consts

* document, fix small issue

* fix manual indentation

* actually fix manual

* use helper proc

* don't resem temp tuple assignment
2023-03-28 17:52:23 +02:00
ringabout
a137e50150 fixes #19291; implements wasMoved hook (#21303)
* fixes #19291; implements `wasMoved` hook

* basics

* checkpoint

* finish `wasMoved`

* add a test for #19291

* add documentation and changelog

* work `attachedWasMoved` with generics

* fixes optimizer

* register `=wasMoved`

* handle wasMoved magcis

* check another round

* some patches

* try `op == nil`

* nicer

* generate `wasMoved` before `destroy`

* try again

* fixes tests

* default wasMoved

* Update tests/destructor/tv2_cast.nim

* Update tests/destructor/tv2_cast.nim

* Update tests/arc/topt_refcursors.nim
2023-03-02 05:29:40 +01:00
PhilippMDoerner
425225119a Add mention of breaking change about [_] in generics to changelog (#21437)
Add mention of breaking change to changelog

As described by #21435 , generic proc declarations making use of `_` as generic
parameter are no longer possible. This is a change that was introduced by 
#21192 . During the debate over if this should be part of the intended spec in
#21435 we concluded that it is and thus should be mentioned as a breaking
change in the changelogs.
2023-02-26 16:57:51 +08:00
metagn
05c6db6500 underscores for routine parameters (#21192)
* underscores for routine parameters

fixes #13443, fixes #13804, refs #21121

* add changelog + more tests

* support generics and ensure inferred lambdas work
2023-01-08 06:49:49 +01:00
ringabout
b34412ff0f adds changelog for more architectures support and fixes a link (#21229) 2023-01-06 06:24:58 +01:00
ringabout
761c5a0830 less verbose type mismatch messages (#21191)
* less verbose type mismatch messages

* Update compiler/types.nim

* fixes i386

* fixes i386
2022-12-28 20:54:15 +01:00
ringabout
b08c50bb55 sync some changes from release notes (#21173) 2022-12-26 06:52:40 +01:00
ringabout
70c575095e add changelog for the new strict function checking algorithm (#21129)
add changelog for the new strict function checking
2022-12-19 17:56:49 +08:00
ringabout
100b304ac2 fixes misplaced changelog entries; pre-existing issue (#21125)
* move misplaced changelog entries to the right place

* fixes misplaced changelog
2022-12-17 21:42:29 +08:00
ringabout
ae4645e8df add 2.0 changelog (#21107)
[backport: 2.0] add v2.0 changelog
2022-12-17 09:28:59 +01:00
konsumlamm
46fb855425 Deprecate std/sharedlist and std/sharedtables (#19112) 2021-11-09 19:00:43 +01:00
Timothy Alexander
dde556665a 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>
2021-10-26 20:32:52 +02:00
ee7
f4525efcf3 changelog_1_6_0: mention breaking change in effect tracking (#18995) 2021-10-15 09:10:27 +02:00
Miran
f93bfc0a32 [backport] add v1.6 changelog (#18932) 2021-10-13 20:31:04 +02:00
flywind
dbf8d0b894 use more .} (#18542) 2021-07-20 20:12:15 +08:00
shirleyquirk
95e8ddabb2 followup #17700 put changelog in wrong file (#17729)
* Allow use of colons inside fmt

allowing colons inside fmt by replacing the format specifier delimiter lets arbitrary nim code be run within fmt expressions.

* oops

* Update strformat.nim

* one space.

* Update lib/pure/strformat.nim

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>

* Update lib/pure/strformat.nim

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>

* changed parser to ignore ':' within parens

* Update strformat.nim

* Update lib/pure/strformat.nim

Co-authored-by: flywind <xzsflywind@gmail.com>

* formatting,documentation,backslash escapes

Adding support for evaluating expressions by special-casing parentheses causes this regression: `&"""{ "(hello)" }"""` no longer parses.
In addition, code such as &"""{(if open: '(' else: ')')}""" wouldn't work.
To enable that, as well as the use of, e.g. Table constructors inside curlies, I've added backslash escapes.
This also means that if/for/etc statements, unparenthesized, will work, if the colons are escaped, but i've left that under-documented.

It's not exactly elegant having two types of escape, but I believe it's the least bad option.

* not sure about how this works

* changelog

* changelog

* added json strformat test

* pulled my thumb out and wrote a parser

* more escapes and string tests

* ok, now i'm sure it's broken but cant get a failing test

* found it

* ok, that'll do

* did i delete this?

* spcng

* spacing

* messed up where changelogs are supposed to go

* ocd

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
Co-authored-by: flywind <xzsflywind@gmail.com>
2021-04-15 22:45:51 +02:00
shirleyquirk
0bc943ad54 followup strformat PR. backslash escapes, tests, docs (#17700)
* Allow use of colons inside fmt
allowing colons inside fmt by replacing the format specifier delimiter lets arbitrary nim code be run within fmt expressions.

Co-authored-by: flywind <xzsflywind@gmail.com>

* formatting,documentation,backslash escapes

Adding support for evaluating expressions by special-casing parentheses causes this regression: `&"""{ "(hello)" }"""` no longer parses.
In addition, code such as &"""{(if open: '(' else: ')')}""" wouldn't work.
To enable that, as well as the use of, e.g. Table constructors inside curlies, I've added backslash escapes.
This also means that if/for/etc statements, unparenthesized, will work, if the colons are escaped, but i've left that under-documented.

It's not exactly elegant having two types of escape, but I believe it's the least bad option.

* changelog
* added json strformat test
* pulled my thumb out and wrote a parser

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
Co-authored-by: flywind <xzsflywind@gmail.com>
2021-04-12 07:32:37 +02:00
Timothee Cour
270964c487 implement RFCs/294 ; disallow enum <=> enum conversion (#16351)
* fix https://github.com/nim-lang/RFCs/issues/294 ; disallow enum <=> enum conversion
* fix the runnableExamples that was the instigator of this RFC
* legacy -d:nimLegacyConvEnumEnum
* use -d:nimLegacyConvEnumEnum in important_package nimgame2
* add test for enum cast
* improve changelog
* add changelog: Changes affecting backward compatibility
* cleanup changelog
* fix changelog
2021-04-03 07:15:21 +02:00
narimiran
6b8baab536 cosmetic fixes for the 1.4 changelog [ci skip] 2020-10-16 13:18:31 +02:00
narimiran
091ec916fd add bufixes for 1.4 in its changelog 2020-10-16 08:13:23 +02:00
narimiran
6349001879 create a changelog for 1.4.0 2020-10-16 07:16:46 +02:00