Closed haxscramper closed 3 years ago
The relevant issue is https://github.com/nim-lang/Nim/issues/17199 by the way so this is a workaround I guess?
might not be needed if https://github.com/nim-lang/Nim/pull/17348 works and will be merged
Reverting this is a simple find-replace for fullCopy
calls, but it would make it work for current version (because even if https://github.com/nim-lang/Nim/pull/17348 is merged, it would still take quite some time until next release). And it also contains more tests and small fixup for the API (some procs like findItFirstOpt
that were meant for internal use were exported)
This PR is done - aside from adding missing support for opt
pattern for fields it does not implement any new functionality, only fixes some documentation inconsistencies and fixes https://github.com/nim-lang/fusion/issues/82 and https://github.com/nim-lang/fusion/issues/76
CI failure unrelated to fusion/matching
implementation - linux-i386 (version-1-2)
test for fusion CI fails because "could not load: libpcre.so(.3|.1|)"
CI failure unrelated - all the failures happened on "install dependencies" stage.
Enabling
--gc:{orc,arc}
caused macro to behave differently, by somehow mutating immutable access path passed to the match expression generator. I wasn't able to reliably reproduce the bug, but it wasn't related to implementation itself.Fixed that by explicitly copying path each time it is passed around - usually it is a sequence of 3-4 access elements, and copying only happens during macro evaluation.
Related: https://github.com/nim-lang/fusion/issues/76