Commit graph

20,168 commits

Author SHA1 Message Date
Andreas Rumpf
4920b06973
fixes #18543 (#18601)
* fixes #18543

* make tests green again
2021-07-27 19:04:55 +02:00
Andreas Rumpf
6dc34757b6
fixes #18579 (#18600) 2021-07-27 14:32:56 +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
GordonBGood
37f5f0d7d0
Clarify use of import via pseudo dir... (#18569) 2021-07-27 09:38:30 +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
konsumlamm
22776c410a
Update documentation for dynlib (#17356)
* Update documentation for dynlib

* Apply suggestions

* Improve error handling in example
2021-07-26 19:15:21 -04:00
Miran
4eca84cff7
don't use plus instead of space (#18589) 2021-07-26 19:13:47 -04:00
Andreas Rumpf
664dbb6bfb
atlas tool: testing via mocking (#18588)
* atlas: refactoring
* Atlas: do some basic testing via mocking
2021-07-26 18:00:03 +02:00
Antonis Geralis
d4c3a09286
optimize for the non-throwing case (#18587) 2021-07-26 15:22:42 +02: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 `&lt;`)
2021-07-25 23:01:19 +02:00
Timothee Cour
5f7db65257
followup #18453 (#18582) 2021-07-25 12:55:33 -07:00
Juan Carlos
e08ec0c674
Documentation only, Sugar arrow and semicolons (#18574)
* Document that sugar arrow do not support semicolon as argument separator
2021-07-25 18:07:43 +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
Timothee Cour
76f74fae88
std/random: fix overflow bugs; fixes #16360; fixes #16296; fixes #17670 (#18456) 2021-07-23 13:41:16 +02:00
Caden Haustein
f62f4159f8
Replace calls to putenv with setenv (#18530)
* Replace calls to C `putenv` with C `setenv` to remove possible memory leaks

* Add test of correct behaviour on invalid input

* Fix style in tests/stdlib/tos.nim

Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>

* Update tests/stdlib/tos.nim

Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>

* Update tests/stdlib/tos.nim

Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>

* Add comment with bug number to tests/stdlib/tos.nim

Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>

* Fix possible msvc arch issues

Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
2021-07-23 10:04:29 +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
itsumura-h
58080525a1
add [1..2] for JArray (#18525)
* add [1..2] for JArray
* fix BackwardsIndex to int
* fix for BackwardsIndex
* fix for assert node kind check
* fix variable name
* Update lib/pure/json.nim
* fix for when x.a is BackwardsIndex

Co-authored-by: itsumura-h <dumblepy@mail.com>
Co-authored-by: Dominik Picheta <dominikpicheta@googlemail.com>
2021-07-21 15:03:48 +02:00
IterableTrucks
880353c0ad
complement notes of two doc strings of tables module (#18527)
* complement notes of two doc strings warning the deprecated  procedure's side effect

* Update lib/pure/collections/tables.nim

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>

* Update lib/pure/collections/tables.nim

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>

Co-authored-by: BillyZee <billyzee@localhost.localdomain>
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
2021-07-21 14:13:50 +02:00
flywind
6f34829ee5
clean unused imports on runnableExamples (#18551) 2021-07-21 13:46:17 +02:00
Andreas Rumpf
f86a530214
breaking changes policies (#18541)
* document some std library evolution policies

In wanting to improve the standard library, it's helpful to have a set
of principles and guidelines to lean back on, that show how to introduce
such improvements while at the same time considering existing users of
the language.

A key idea behind documentation of this sort is that it should highlight
a path forwards in making changes rather than trying to prevent them,
and although the current snippet does include some language for what one
shouldn't do, it also shows a few options for what one can do.

This is a riff on https://github.com/nim-lang/Nim/pull/18468 mainly
based on what helps enable to the use of Nim productively in
environments and teams where the priority and focus is not always on the
tool (Nim in this case) but rather on the codebase itself, and its use
by end users.

We use similar guidance documentation to help coordinate the code of the
teams using Nim in https://status-im.github.io/nim-style-guide/ where it
is applied not as law, but rather as recommendations for the default
approach that should be considered first.

* document the new policies

* typo

* Update doc/contributing.rst

Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>

* Update doc/contributing.rst

* Update doc/contributing.rst

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>

* Update doc/contributing.rst

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>

* Update doc/contributing.rst

* Update doc/contributing.rst

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>

* clarify some things

* Update doc/contributing.rst

Co-authored-by: Dominik Picheta <dominikpicheta@googlemail.com>

Co-authored-by: Jacek Sieka <arnetheduck@gmail.com>
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
Co-authored-by: Dominik Picheta <dominikpicheta@googlemail.com>
2021-07-21 10:22:30 +02:00
flywind
f048dad7c3
add testcase for #6499 #12229 #7172 (#18547) 2021-07-21 09:47:06 +02:00
Andreas Rumpf
9c2442af94
unary slices get a deprecation period (#18549) 2021-07-21 09:46:18 +02:00
Araq
b6f9f7a33e atlas: minor changes 2021-07-21 09:09:58 +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
flywind
a8b3e7c059
follow up #18517 (#18537)
* follow up #18517

* Update lib/pure/os.nim

Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>

* Update lib/pure/os.nim

Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
2021-07-20 15:32:55 +02:00
flywind
dbf8d0b894
use more .} (#18542) 2021-07-20 20:12:15 +08:00
Paul Roberts
6286b5599c
termux ssl (#18520) 2021-07-20 12:50:43 +02:00
Andreas Rumpf
5e011e8e42
updated the changelog (#18539) 2021-07-20 10:37:36 +02:00
Araq
e38388eb4e use .} instead of } for code highlighters 2021-07-20 08:36:02 +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
flywind
44c5afe448
[std/os]document checkDir and use runnableExamples (#18517)
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
2021-07-19 20:14:04 -07:00
Timothee Cour
db6e7fffba
minor clenup in vmops (#18529) 2021-07-19 20:07:47 -07:00
konsumlamm
73ce40aaf7
Revert #17321 (#18521)
Use better names in example
2021-07-19 12:45:13 +02:00
ynfle
1e7a10001a
Docs(manual): add clarification for default params (#18522)
* Docs(manual): add clarification for default params

* Docs(manual): fix wording to refer to call time

* Docs(manual): Clarify default parameter wording

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
2021-07-19 12:44:06 +02:00
flywind
bdfee32dc8
close #18489 (#18524) 2021-07-19 12:43:31 +02:00