| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit attempts to improve testing of strictFuncs and views, and
prevent regressions like #16873 (resolved by 0b01eddace6a).
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.
|
|
|
|
|
|
|
|
|
| |
Previously, compiling a file containing just `import critbits` with
`nim c --experimental:strictFuncs` would produce the following error:
critbits.nim(529, 6) Error: 'toCritBitTree' can have side effects
This was introduced by 2aed4186989e (#16564).
Fixes: #16873
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
* sequtils.nim: proc -> func
* sequtils.nim: proc -> func in links
* sequtils.nim: proc -> func in non-link doc comments
* test: add `sequtils` to strictFuncs test
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* math.nim: procs with {.noSideEffect} -> funcs
* math.nim: procs without {.noSideEffect.} -> funcs
* math.nim: proc -> func in links
* math.nim: proc -> func in doc comments
* test: add `math` to strictFuncs test
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* strutils.nim: procs with {.noSideEffect.} -> func
* strutils.nim: procs without {.noSideEffect.} -> func
* strutils.nim: proc -> func for links
* strutils.nim: proc -> func in doc comments
* test: add strutils to strictFuncs test
* test: proc -> func in errmsg test
|
|
|
|
|
| |
* fix #15851
* {.cast(noSideEffect).}
|
|
|
|
|
| |
* fix #15756
* simplify test
|
| |
|
|
|
|
|
| |
swap() will never call any procs passed to it, and so it can be safely
excluded from the "assume indirect calls are taken" effects tracking
rule.
|
|
|
|
|
|
|
| |
* New hint for unused exceptions in .raises
* Fix effects test
* Further adapt teffects1.nim
|
|
|
|
|
|
|
|
|
| |
* implements https://github.com/nim-lang/RFCs/issues/258
* don't be too strict with custom pragma blocks
* cast pragmas: documentation
* added most missing inference query procs to effecttraits.nim
|
| |
|
|
|
|
|
|
|
| |
* views: yet another bugfix
* views: extended the spec
* views: take into account potential hidden mutations via proc calls
|
| |
|
|
|
|
|
|
| |
* moved view tests to tests/views
* refactoring
* more refactorings
* better support for system.toOpenArray for first class view types
|
|
|
|
| |
* testament support for inline error messages
* adapt teffects1.nim test to show the potential
|
|
|
| |
* added basic borrowing test
|
|
|
|
|
| |
* strict funcs: use control flow information for a more precise analysis
* cursor inference uses control flow information
|
|
|
|
|
| |
* strict func: much better error messages
* documented the 'strict funcs' mode
|
|
|
|
| |
https://github.com/nim-lang/RFCs/issues/234 (#15030)
|
|
|
|
|
|
|
|
|
|
|
| |
* I don't care about observable stores
* enforce explicit initializations
* cleaner code for the stdlib
* stdlib: use explicit initializations
* make tests green
* algorithm.nim: set result explicitly
* remove out parameters and bring the PR into a mergable state
* updated the changelog
|
|
|
|
|
|
|
|
|
| |
* do not track 'raise Defect' in the .raises: [] clause anymore
* --panics:on maps 'raise Defect' to an unrecoverable fatal error
* make tests green again
* update the documentation too
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Error -> Defect for defects
The distinction between Error and Defect is subjective,
context-dependent and somewhat arbitrary, so when looking at an
exception, it's hard to guess what it is - this happens often when
looking at a `raises` list _without_ opening the corresponding
definition and digging through layers of inheritance.
With the help of a little consistency in naming, it's at least possible
to start disentangling the two error types and the standard lib can set
a good example here.
|
| |
|
|
|
|
|
|
|
|
|
| |
* '.push raises: []' now also affects proc types
* fixes the regression
* less disruptive bugfix
* another attempt
|
| |
|
|
|
|
|
|
| |
* fixes a critical GC safety inference bug
* make nimsuggest compile again
* make Nimble compile again
|
| |
|
|
|
|
|
|
| |
This is the MVP in order not to get a completely useless error message
from the compiler.
Fixes #10579
|
|
|
|
|
|
|
|
| |
* move IO subsystem into its own module; refs #10385
* make standalone test compile again
* make C++ examples compile again
* make more tests green
* make sysAssert and gcAssert work again
|
|
|
|
|
|
| |
Exceptions raised inside a nkFinally/nkExcept block are not caught by
the block itself.
Fixes #3886
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
via OSX: find . -name '*.nim' -exec sed -i '' -E 's/[[:space:]]+$//' {} +
|
| |
|
| |
|
| |
|
| |
|
| |
|