Andreas Rumpf
562dde624f
fixes #18371 ( #18617 )
2021-07-30 12:05:14 +02:00
Timothee Cour
9a26f5059b
refs #16613 : check opcWrDeref for nil ( #18613 )
2021-07-30 09:30:22 +02:00
Andreas Rumpf
a273ea70e8
implements overloadable enum values; WIP ( #18470 )
...
* implements overloadable enum values
* simpler code
2021-07-28 12:46:28 +02:00
Timothee Cour
8d2f6bba3a
support same-line doc comments in routines ( #18595 )
...
* support same-line comments in routines
* remove assert as per review comment
2021-07-27 19:50:59 +02:00
Andreas Rumpf
c86f9590fb
fixes #18570 ( #18599 )
2021-07-27 12:48:27 +02:00
Timothee Cour
493721c16c
delEnv now works at CT ( #18568 )
2021-07-27 09:56:16 +02:00
Timothee Cour
3b3006ef16
add comment to astalgo.debug ( #18594 )
2021-07-27 09:37:11 +02:00
Jason Beetham
ed44618deb
Fixed const tuples in inferred generics ( #18598 )
2021-07-27 09:36:59 +02:00
Andreas Rumpf
fa0209609d
fixes #18565 ( #18593 )
...
* fixes #18565
2021-07-27 09:36:19 +02:00
flywind
9cb5ab0108
fix #18578 ( #18580 )
...
* fix #18578
* add tests
* tiny
* apply changes
* typo
* add removeStaticFile
2021-07-27 07:21:39 +02:00
Miran
4eca84cff7
don't use plus instead of space ( #18589 )
2021-07-26 19:13:47 -04:00
Andreas Rumpf
158d7c7a7a
fixes #18558 again ( #18586 )
2021-07-26 14:15:55 +02:00
Araq
ff280c0127
added missing .inline for toCChar
2021-07-26 09:57:19 +02:00
Andrey Makarov
10da888c07
docgen: sort symbols ( fix #17910 ) ( #18560 )
...
* docgen: sort symbols (fix #17910 )
* add workaround + change naming
* switch to a dedicated sort comparator
* fix numbers with unequal string lengths
* dedicated `sortName` instead of `plainNameEsc`:
* more compact names for non-overloaded symbols
* more predictable Ascii sort (e.g. `<` instead of `<`)
2021-07-25 23:01:19 +02:00
Saem Ghani
2cbfc1e514
fixes #18385 ( #18571 )
...
needs a more permanent fix by better incorporating IC, but fixes
nimsuggest highlighting for now.
2021-07-25 18:06:04 +02:00
Andreas Rumpf
f4ff276a90
refactoring: removed dead code ( #18567 )
2021-07-24 00:30:02 +02:00
Timothee Cour
cc0f02d57d
rename nimFpRoundtrips => nimPreviewFloatRoundtrip ( #18566 )
2021-07-23 14:57:47 -07:00
Andreas Rumpf
faabcfa643
fixes #18558 ( #18563 )
...
* fixes #18558
* better fix
2021-07-23 16:15:40 +02:00
Jason Beetham
5386ae75ba
Fixed template const tuple unpacking ( #18562 )
2021-07-23 08:46:13 +02:00
Andreas Rumpf
0c4582c665
mitigates #12815 ( #18557 )
...
* mitigates #12815
* Update doc/nimc.rst
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com >
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com >
2021-07-22 11:59:21 +02:00
Andreas Rumpf
58e27ebd4a
fixes #12815 ( #18554 )
2021-07-22 09:37:41 +02:00
Timothee Cour
d5b5827bc2
fix setCommand so it behaves like regular nim invocation ( #18555 )
2021-07-22 08:00:29 +02:00
Andreas Rumpf
01fc9e58ca
fixes #18550 ( #18553 )
...
* fixes #18550
* update the manual to reflect reality
2021-07-21 16:55:50 +02:00
Andreas Rumpf
70fb377e88
undo RFC #294 , it breaks code for no good reason, the compiler can wa… ( #18546 )
...
* undo RFC #294 , it breaks code for no good reason, the compiler can warn about the construct instead
* Update changelog.md
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com >
* enable test case
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com >
2021-07-21 08:51:03 +02:00
Andreas Rumpf
f8519657c4
fixes #18469 ( #18544 )
...
* fixes #18469
* Update compiler/injectdestructors.nim
2021-07-20 22:15:06 +02:00
Timothee Cour
cf0cf32d27
make -d:nimFpRoundtrips work consistently in vm vs rt, fix #18400 , etc ( #18531 )
...
* compiler/vmhooks: add getVar to allow vmops with var params
* addFloat vmops with var param
* cgen now renders float32 literals in c backend using roundtrip float to string
2021-07-20 22:13:52 +02:00
Andrey Makarov
8c7ee96457
rst: add missing line/column info for some warnings ( #18383 )
...
* rst: add missing line/column info for some warnings
* add workaround
* use TLineInfo/FileIndex for storing file names
* fix blank lines in include file (rm harmful strip)
* don't use ref TLineInfo
* return `hasToc` as output parameter for uniformity
* Update compiler/docgen.nim
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
* Update compiler/docgen.nim
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
* Update lib/packages/docutils/rst.nim
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
* address review - stylistic things
* Update compiler/docgen.nim
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
* unify RST warnings/errors names
* doAssert + minor name change
* fix a bug caught by doAssert
* apply strbasics.strip to final HTML/Latex
* rm redundant filename
* fix test after rebase
* delete `order` from rnFootnoteRef,
also display errors/warnings properly when footnote references are from
different files
* Update compiler/lineinfos.nim
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
* Update lib/packages/docutils/rstast.nim
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
* Update lib/packages/docutils/rstast.nim
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
* Update lib/packages/docutils/rstast.nim
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
* revert because of error:
Error: cannot prove that it's safe to initialize 'info' with the runtime value for the discriminator 'kind'
* Update lib/packages/docutils/rstgen.nim
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
* apply suggestion
* Update lib/packages/docutils/rst.nim
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
* add Table for string->file name mapping
* do not import compiler/lineinfos
* fix ambiguous calls
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
Co-authored-by: narimiran <narimiran@disroot.org >
2021-07-20 08:32:22 +02:00
Timothee Cour
db6e7fffba
minor clenup in vmops ( #18529 )
2021-07-19 20:07:47 -07:00
Timothee Cour
488e9c2991
nim doc now correctly renders deprecated pragmas for routines and types ( #18515 )
2021-07-19 12:42:45 +02:00
konsumlamm
ac5435ecd0
Make error message for empty new-styled concept more descriptive ( #18506 )
...
* Allow empty new-styled concept
Slightly improve error messages
* Make empty new-styled concepts an error
2021-07-18 10:49:03 +02:00
Ivan Bobev
5e6680406f
Add changes required by Nimble lock file support ( #12104 )
...
Implemented support for Nimble local cache with package directories with
a checksum of the package at the end of their names. Now the compiler
supports package paths in the form:
* /path_to_nimble_cache_dir/pkgs/package_name-1.2.3-
FEBADEAEA2345E777F0F6F8433F7F0A52EDD5D1B
* /path_to_nimble_cache_dir/pkgs/package_name-#head-
042D4BE2B90ED0672E717D71850ABDB0A2D19CD2
* /path_to_nimble_cache_dir/pkgs/package_name-#branch-name-
DBC1F902CB79946E990E38AF51F0BAD36ACFABD9
Related to nim-lang/nimble#127
2021-07-15 22:13:01 +02:00
quantimnot
a9701f6531
Extended side effect error messages ( #18418 )
...
* Extended side effect error messages
* Applied feedback:
- refactored `markSideEffect`
- refactored string interpolations
- single message
- skip diagnostics in `system.compiles` context
Other:
- started a test of diagnostic messages
[ci skip] Tests aren't updated yet because messaging isn't nailed down.
* - Added hints of where for side effect call locations.
- Tried to clarify the reasons.
* fix tests
* Applied PR review feedback:
- moved collection of side effects from TSym to TContext
- used pragma shorthand form `.sideEffect` and `.noSideEffect` in messages
- added leading '>' to structured messages for readability
- changed `sempass2.markSideEffect` to a proc
- replaced `system.echo` in the test to make the test compatible with Windows
* Applied NEP1 formatting suggestion
Co-authored-by: quantimnot <quantimnot@users.noreply.github.com >
2021-07-15 20:43:57 +02:00
Andreas Rumpf
12da32a891
fixes #17893 ( #18485 )
...
* fixes #17893
2021-07-13 14:17:59 +02:00
Andreas Rumpf
b3aca78e22
closes #18433 ( #18484 )
...
* beneficial refactoring; use system.Endianness
* closes #18433
2021-07-13 12:44:29 +02:00
Andreas Rumpf
4ec2f74246
ORC: support for custom =trace procs ( #18459 )
...
* ORC: support custom =trace procs (WIP)
* Update tests/arc/tcustomtrace.nim
Co-authored-by: Clyybber <darkmine956@gmail.com >
* =trace is now documented and seems to work
* make test green
Co-authored-by: Clyybber <darkmine956@gmail.com >
2021-07-09 15:15:49 +02:00
Timothee Cour
ae7e7756fe
runnableExamples now show originating location in stacktraces on failure ( #18457 )
...
* runnableExamples now show originating location in stacktraces on failure
* PRTEMP
* fix indentation inside multiline strings
2021-07-09 11:41:28 +02:00
Timothee Cour
836b061ae3
improve --declaredLocs to help disambiguate types (generics, aliases etc) ( #18389 )
...
* improve --declaredlocs to help disambiguate types (generics, aliases etc)
* avoid a cyclic deps
* fix test after rebase
2021-07-08 12:28:06 +02:00
Timothee Cour
5a42f4a53e
followup #18252 : show special flags -d:danger, -d:release when given ( #18451 )
2021-07-08 12:26:57 +02:00
Andreas Rumpf
3eb3e6b9a3
ORC: use =destroy instead of =dispose ( #18440 )
...
* ORC refactoring in preparation for further changes (=dispose must die)
* ORC: embrace =destroy, avoid =dispose
* ORC: no need for =dispose
* closes #18421
2021-07-07 09:39:01 +02:00
Jason Beetham
252eea8cae
Make procedure mismatch more informative with pragma/call convention mismatches ( #18384 )
...
* Added more concise calling convention/pragma mismatch messages
* Now only adds callConvMsg/lock message when sensible
* Fixed message formatting
* Added tests, and fixed some bugs
* Tests joined, and always indenting
* More tests and more bug fixes
* Fixed first test in tprocmismatch
* Using var param for writting mismatches
* Better logic for handling proc type rel and conv/pragma mismatch
* Refactored getProcConvMismatch
* Fixed callConv message formatting
* Fixed test for proper message
* Cleanup to address issues
* getProcConvMismatch now returns tuple, and reformatted code
2021-07-06 07:28:38 +02:00
flywind
60eac79f7f
[minor]remove unnecessary stringify ( #18419 )
2021-07-02 14:38:01 +02:00
Andreas Rumpf
3ceaf5c130
fixes #18030 ( #18415 )
2021-07-01 17:35:04 +02:00
Andreas Rumpf
41c29cb3a1
fixes #18130 ( #18407 )
2021-07-01 06:51:08 +02:00
Ștefan Talpalaru
eaa1c3a377
genDepend: fix for module names that are reserved DOT keywords ( #18392 )
...
(like "node" and "edge")
2021-06-30 07:29:10 +02:00
Timothee Cour
0483a5ffaf
improvements to hint:processing: show import stack, distinguish nims, show includes etc ( #18372 )
...
* improvements to hint:processing
* fix tests; do not show hintProcessing for nimscript unless given -d:nimHintProcessingNims
* fix trunner and avoid need for -d:nimHintProcessingNims
* fix some tests
2021-06-30 07:16:31 +02:00
Andreas Rumpf
97fc95012d
fixes #16270 ( #18388 )
2021-06-29 15:34:39 +02:00
Clyybber
dd2cbe3164
Cleanup lookups.nim again.. ( #18379 )
2021-06-28 19:25:30 +02:00
Clyybber
72d6a9c885
Fix #16426 ( #18377 )
2021-06-28 17:41:37 +02:00
Andreas Rumpf
0be17f5d9c
fixes #18319 ( #18375 )
2021-06-28 17:08:45 +02:00
Timothee Cour
0b7361e938
followup #18362 : make UnusedImport work robustly ( #18366 )
...
* warnDuplicateModuleImport => hintDuplicateModuleImport
* improve DuplicateModuleImport msg, add test
2021-06-27 20:39:16 +02:00