-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pegs.nim now compiles with strictFuncs #18111
Conversation
That is intended, that's exactly the point of |
func/noSideEffects/strictFuncs need better error messages, so that they list out where the side effects come from. Going through a huge file looking for side effects is pretty annoying, and take out any advantage that they could provide. |
PR welcome some of the changes in this PR were useful ({. noSideEffect.} => func) other than that, I consider the current design for strictFuncs+views broken (#16305) so that's what should be fixed instead, not stdlib (there are better alternatives as discussed elsewhere) |
@nc-x Why was this closed? |
Enabled `std/pegs` in the `strictFuncs` import test. Fixes nim-lang#18057 Fixes nim-lang#16892 See nim-lang#18111
Enabled `std/pegs` in the `strictFuncs` import test. Fixes nim-lang#18057 Fixes nim-lang#16892 See nim-lang#18111
* Fixed `strictFuncs` support for `std/pegs` Enabled `std/pegs` in the `strictFuncs` import test. Fixes #18057 Fixes #16892 See #18111 * Rebased from `devel` * Conditionally compile `std/pegs` in `koch` This is for supporting `csources` bootstrap. Co-authored-by: quantimnot <quantimnot@users.noreply.github.com>
* Fixed `strictFuncs` support for `std/pegs` Enabled `std/pegs` in the `strictFuncs` import test. Fixes nim-lang#18057 Fixes nim-lang#16892 See nim-lang#18111 * Rebased from `devel` * Conditionally compile `std/pegs` in `koch` This is for supporting `csources` bootstrap. Co-authored-by: quantimnot <quantimnot@users.noreply.github.com>
Closes #18057
Closes #16892
The issue here is that with strictFuncs, if we are calling a function inside a noSideEffect function, then that called function must also be marked as noSideEffect. (I have never used noSideEffect/strictFuncs before so idk whether this is expected behaviour or not.)
This PR converts few procs to funcs so that pegs.nim compiles properly.
This PR also updates all noSideEffect procs in
pegs.nim
to use func instead.The changes for this are in a separate commit for easy review.