Closed arnetheduck closed 1 week ago
@ringabout @tersec Did you maybe have some time to go through this list to see if there are things that shouldn't be backported?
I was planning to start with backports tomorrow (in about 24 hours from now), so if you could check the bottom-most (the oldest) 20-ish items on this list, I would really appreciate it.
@narimiran Btw https://github.com/nim-lang/Nim/commit/4071b3fad8222fb797475d34478f13eb0a99e31a has broken the version-1-6 CI
@narimiran Btw https://github.com/nim-lang/Nim/commit/4071b3fad8222fb797475d34478f13eb0a99e31a has broken the version-1-6 CI
Ah, my error. I've just pushed a fix.
@narimiran looked through all the remaining ones and they look okay for me. Many are just added test cases, which can't break anything, and only a couple are nontrivial in the compiler per se, but those are also quite useful.
Many are just added test cases, which can't break anything
That's what I thought too, but..... ;)
To clarify: sometimes it is adding a test for stuff which wasn't backported, so the CIs fail.
But I use a "helper branch" to test everything (and remove failing ones) before merging into version-1-6
, so the official branch will be kept clean.
I threw the test case PR:s in there because many were written for fixes whose status was "unknown" on the 1.6 branch but they tested things that would be useful to have fixed - if something doesn't work, it would be good to write it down so as to investigate when the fix happened and consider its inclusion in 1.6 as well
if something doesn't work, it would be good to write it down so as to investigate when the fix happened and consider its inclusion in 1.6 as well
I agree, and my plan was (and after your comment still is) to go through those once I finish going through this list and backport the "easy ones".
https://github.com/nim-lang/Nim/pull/21448(Allow futureLogging in release builds) needs to be backported too. See also https://github.com/nim-lang/Nim/issues/21758
https://github.com/nim-lang/Nim/pull/21448 futureLogging in release builds) needs to be backported too. See also https://github.com/nim-lang/Nim/issues/21758
Done
These are the remaining, currently not backported, commits from the original list:
@[]
and {}
type inference as returns in generics (#21475)formatBiggestFloat
in VM (#21299)genLineDir
before assignment (#21201)isLocalVarSym
; an implicit global is a global nonetheless (#21025)exit
function now takes cint
type (#20775)method
requires explicit {.gcsafe.}
to be GC-safe (#20574)gcRefc
symbol which allows writing specific code for refc (#20009)Originally I didn't backport those because they either added a test for a feature/fix which was not backported, or fixed something that isn't present in the 1.6 line, or similar.
@arnetheduck, are any of the commits in this list a "must have" and should I retry backporting those?
Very nice! Going through the list, here are a few high-value targets remaining - cc @ringabout that was involved in many of them:
Finally, in the category of surprises, it's odd that this fix doesn't compile clean, it's kind of trivial:
https://github.com/nim-lang/Nim/commit/0bacdf5fdf86a01132d2817599ad0a7f155a101e
This one compiles and runs without an error (when it shouldn't).
https://github.com/nim-lang/Nim/commit/841d9d59755f805245d862456d53e4fd8a426813 This one in particular is very nasty!
It must have been fixed at some point but the issue was not refferrenced in the bugfix, so I didn't find what I need to backport to make this work.
https://github.com/nim-lang/Nim/commit/ecc8f61fe48515ac35360b88d7bb72f76bc7ed68
Running the test produces the following error:
error: ‘T3_’ is a pointer; did you mean to use ‘->’?
186 | T3_.x = (*T4_);
| ^
| ->
https://github.com/nim-lang/Nim/commit/c814c4d993675551ecf388b6a583c471a1b8bc5e
Nim 1.6 doesn't have nfUseDefaultField
(which in this PR was changed to nfSkipFieldChecking
, and I was reluctant to introduce it.
https://github.com/nim-lang/Nim/commit/16f42084d32144d5afb2a5cc3a5a833e5295a8bc
Same as above.
Finally, in the category of surprises, it's odd that this fix doesn't compile clean, it's kind of trivial:
https://github.com/nim-lang/Nim/commit/705da9d452d19536689a32a8d4378bcce2ec320a
Oh! Now I see it was just a matter of wrong line number in the error message. Fixing now and backporting.
I was reluctant to introduce it.
I think introducing it might be the way to go here - nfUseDefaultField
is a new feature in 2.0 so it's natural it didn't exit in the 1.6 branch
I think introducing it might be the way to go here - nfUseDefaultField is a new feature in 2.0 so it's natural it didn't exit in the 1.6 branch
Ok, I found the PR that introduces it: https://github.com/nim-lang/Nim/pull/20480
I've backported it too, and it is "mostly fine": one test in tests/objects/tobject_default_value.nim
fails — the commented out lines below are the ones that are failing:
block:
var x: Ref2
new(x, proc (x: Ref2) {.nimcall.} = discard "call Ref")
# doAssert x.value == 12, "Ref.value = " & $x.value
proc call(x: RefInt2) =
discard "call RefInt"
var y: RefInt2
new(y, call)
# doAssert y.value == 12
# doAssert y.data == 73
@ringabout, do you maybe recognize this, i.e. is there some other commit/PR that I'm missing which should also be backported for this to work? (The other, very possible, option is that I wrongly resolved merge conflicts)
I don't think it's a good idea to backport https://github.com/nim-lang/Nim/pull/20480, it's not safe to have it into 1.6.x
https://github.com/nim-lang/Nim/commit/841d9d59755f805245d862456d53e4fd8a426813 This one in particular is very nasty!
After some bisecting in devel
, I managed to find that this bug was fixed in https://github.com/nim-lang/Nim/pull/19972, "defaults to ORC", which is also something that shouldn't be backported, IMO.
I managed to find that this bug was fixed in https://github.com/nim-lang/Nim/pull/19972,
It was not, actually - devel
with --refc
still has the bug - essentially, it's fixed for orc but not for refc
It was not, actually - devel with --refc still has the bug - essentially, it's fixed for orc but not for refc
Correct. It was poor wording on my side. I should have said: "....this bug 'disappeared' because of....".
https://github.com/nim-lang/Nim/commit/c814c4d993675551ecf388b6a583c471a1b8bc5e
Thanks to @ringabout, this is now backported to 1.6!
...and the previous backport (c814c4d
), also allowed https://github.com/nim-lang/Nim/commit/16f42084d32144d5afb2a5cc3a5a833e5295a8bc to be cleanly backported!
a few more :)
parseFloat
behave like strtod
(#21854)styleCheck
bugs (#20095)checksums/md5
and checksums/sha1
(#21791) lent
can be used in the fields or the cast type as a parameter (#21684)
Created by:
then filtering by simplicity vs impact
https://github.com/nim-lang/Nim/commit/16f42084d32144d5afb2a5cc3a5a833e5295a8bc fixes #20900; Calling template through from generic function across module fails to build (#21649)fromJson
should support empty objects (#21641)for
loop expression can now have generatediterator
's called (#21627)https://github.com/nim-lang/Nim/commit/a37a83cbff89867be9cbc5ba2f50c37e99efe0f1 fixes #21617; createTypeBoundOps with PContext in order to instantiate generics (#21619)system.any
by accident. (#21562)https://github.com/nim-lang/Nim/commit/c814c4d993675551ecf388b6a583c471a1b8bc5e fixes #3770; templates with untyped parameters resolve private fields wrongly in generics (#21554)https://github.com/nim-lang/Nim/commit/64a0355f3f95c9ec8ca3597f8028819b489f08c8 fixes #21377; fixes@[]
and{}
type inference as returns in generics (#21475)https://github.com/nim-lang/Nim/commit/fc068ee06d058b35d2d5890cf1fa3c356e549d1f fixes #18134; registersformatBiggestFloat
in VM (#21299)https://github.com/nim-lang/Nim/commit/9afb466d733bc16f5ac0fef7477c2ac919046eb2 Force lambda lifting for getImplTransformed. Hacky. Fixes #19818 (#21031)https://github.com/nim-lang/Nim/commit/705da9d452d19536689a32a8d4378bcce2ec320a fixes #14444; addgenLineDir
before assignment (#21201)https://github.com/nim-lang/Nim/commit/56840931355fdf8ce12a59ad085d90b04404f831 fix for bad error message with const in case statement (#21182)https://github.com/nim-lang/Nim/commit/40b5c4c4c340d44ee724183306716286e40002cb fix #20248;fix #6215;turns into simple CT error (#21141)https://github.com/nim-lang/Nim/commit/d83f66a24d990f2e4a135a4a64e1c464702b953d fixes #21116; always mangles the param (#21121)https://github.com/nim-lang/Nim/commit/2564b5c938602e4f8820d2ed2b778c6d4f1d0cd5 Fix #20416. Enable the recursion limit for ref/ptr types. (#21092)multisync
now allows tuples in return type (#21074)https://github.com/nim-lang/Nim/commit/b59c657be3e9049f936c0c6cc6083a41a343737a fixes #21062 (#21068)exprList
fortkOf
(#20930)https://github.com/nim-lang/Nim/commit/c5eb3fd4f0798eaa31b834f5dbe3f563e55c2b03 fixes #9839; fixes noReturn pragma doesn't work for non-simple templates (#21048)https://github.com/nim-lang/Nim/commit/5d469686b05ba0435690fccf6fb6f7d95cf09c73 fix #20829 Regression in int64 type matching since (#21019)https://github.com/nim-lang/Nim/commit/e98efdcc5eb5679fed5540a0a7c5a12e5d23f826 fix #16639 (#21017)https://github.com/nim-lang/Nim/commit/a8090f7d650a5d7ef51416c9fe2708be0de50e95 fixesisLocalVarSym
; an implicit global is a global nonetheless (#21025)nkWhileStmt
(#20947)https://github.com/nim-lang/Nim/commit/77e58bf573040cc081a58046a97f1ddfb61f27fe fixes #20807, refs #20450, regression with seq inference (#20818)https://github.com/nim-lang/Nim/commit/15bffc20ed8da26e68c88bb776b18d19e959453f fixes tests for quit (#20813)https://github.com/nim-lang/Nim/commit/66b0c843c34dba2a8f28e1c02ff996516a3c5c2a fixes #20694; theexit
function now takescint
type (#20775)https://github.com/nim-lang/Nim/commit/93b085a57ad28c71056dd3da6c4daa56ef4713c4 closes #12589; add testcase (#20769)https://github.com/nim-lang/Nim/commit/d5cc2085eae85ad922dfafc1dca81860d94d1731 ref #20694; quit value gets saturated to ranges (#20753)https://github.com/nim-lang/Nim/commit/ecc8f61fe48515ac35360b88d7bb72f76bc7ed68 Fix #18079 Illegal storage access compiling call with nested ref/deref (#20738)https://github.com/nim-lang/Nim/commit/841d9d59755f805245d862456d53e4fd8a426813 closes #16331; add testcase (#20730)https://github.com/nim-lang/Nim/commit/eec1543baf10715c7107133aaf6aa1e4932f53fe fix semcase on tySequence and tyObject #20283 #19682 (#20339)https://github.com/nim-lang/Nim/commit/39f925b95d57a429a808cfa1b96d6fae12a72dbf fixes #20715; range[a..b] inside object variant fails (#20716)https://github.com/nim-lang/Nim/commit/2d3e3ab5277beaa1cfcb746ea3f37b91fea42e59 closes #6213 #11777; add testcase (#20656)https://github.com/nim-lang/Nim/commit/0bacdf5fdf86a01132d2817599ad0a7f155a101e fixes #20515; basemethod
requires explicit{.gcsafe.}
to be GC-safe (#20574)https://github.com/nim-lang/Nim/commit/07b645342abd06b2323df042c170eb847f51880d fixes #3748 (#20563)https://github.com/nim-lang/Nim/commit/e13cd40e21dbfa7d9981e2eeb2aa09625d3deda5 fix #2614 improve error message when array of proc calling convention… (#20379)var
for ref parameters instd/tables
(#20175)https://github.com/nim-lang/Nim/commit/01ad0cdc5212a05ac31c968facdc94b732dd48ef defines thegcRefc
symbol which allows writing specific code for refc (#20009)