-
-
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
strictFuncs + views: cannot import pegs
#16892
Comments
@ee7 how about:
|
@timotheecour I see your argument, but at this moment I think it's cleanest to keep the issues separate. The issues differ in at least these ways:
I was guessing that the
As far as I can tell, there are only two stdlib modules affected - I hope that N is exactly 2. Furthermore, we can guarantee that N does not increase (due to the current stdlib modules at least) if something like #16878 is merged. However, if we find any more "cannot import X with strictFuncs/views" then I'm happy to do as you say and have one combined issue. Does that work for you? Edit: #16877 was merged, which closed #16873. If we find any new "cannot import X with strictFuncs/views" problems then I'm fine with tracking them in this issue. |
This commit attempts to improve testing of strictFuncs and views, and prevent regressions like nim-lang#16873 (resolved by 0b01edd). We previously only explicitly tested strictFuncs and views with a smaller number of stdlib modules, mostly in: - tests/effects/tstrict_funcs.nim - tests/views/tcan_compile_nim.nim Note that this commit leaves the `pegs` module commented out; it cannot currently be compiled with `--experimental:views` (see nim-lang#16892). Note also that this commit is not sufficient to test strictFuncs and views, but it does detect a subset of problems.
This commit attempts to improve testing of strictFuncs and views, and prevent regressions like #16873 (resolved by 0b01edd). We previously only explicitly tested strictFuncs and views with a smaller number of stdlib modules, mostly in: - tests/effects/tstrict_funcs.nim - tests/views/tcan_compile_nim.nim Note that this commit leaves the `pegs` module commented out; it cannot currently be compiled with `--experimental:views` (see #16892). Note also that this commit is not sufficient to test strictFuncs and views, but it does detect a subset of problems.
This commit attempts to improve testing of strictFuncs and views, and prevent regressions like nim-lang#16873 (resolved by 0b01edd). We previously only explicitly tested strictFuncs and views with a smaller number of stdlib modules, mostly in: - tests/effects/tstrict_funcs.nim - tests/views/tcan_compile_nim.nim Note that this commit leaves the `pegs` module commented out; it cannot currently be compiled with `--experimental:views` (see nim-lang#16892). Note also that this commit is not sufficient to test strictFuncs and views, but it does detect a subset of problems.
This still repro as of today. :( |
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>
Example
Compile the below with
nim c --experimental:strictFuncs --experimental:views
import pegs
Current Output
Expected Output
No error.
Additional Information
Note that the error does not occur with just
nim c --experimental:strictFuncs
To "solve" this issue by removing instances of
noSideEffect
, the minimal number ofnoSideEffect
that must be removed is shown in this commit: ee7@23945aa. I assume that this approach isn't what we want, but tell me otherwise and I'll make the PR for it.Apart than
critbits
(see #16873) andpegs
, it looks like every stdlib module can be imported when compiling withSee #16878.
Nim version
This issue occurs in:
The text was updated successfully, but these errors were encountered: