Timothee Cour
adba5eb45e
deprecate strutils.delete and add an overload with saner semantics consistent with sequtils.delete; follows #18487 ( #18510 )
2021-07-18 11:10:08 +02:00
Miran
8091545f95
Revert #17398 and #17402 ( #18480 )
...
* Revert "followup #17398 : `getTempDir`, `getConfigDir` now do not have trailing DirSep (#17402 )"
This reverts commit 2356d0603f .
* Revert "fix #17393 getHomeDir and expandTilde should not include trailing `/` (#17398 )"
This reverts commit bebf2ce24a .
* fix test
2021-07-18 11:04:19 +02:00
Timothee Cour
923a1c6ea7
fix nativeToUnixPath ( #18501 )
2021-07-17 07:54:47 +02:00
Andreas Rumpf
25efb53862
make dragonbox opt-in via -d:nimFpRoundtrips ( #18504 )
...
* make dragonbox opt-in via -d:nimFpRoundtrips
* make tests green again
* make tests green again
2021-07-16 18:29:49 +02:00
Andreas Rumpf
96a7f9b31c
deprecate cuchar, don't redefine it ( #18505 )
2021-07-16 15:50:02 +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
Timothee Cour
1d6863a789
deprecate sequtils.delete and add an overload with saner semantics consistent with system.delete ( #18487 )
...
* deprecate sequtils.delete and add an overload with saner semantics
* AssertionDefect => IndexDefect
* improve tsequtils
* add tests; use splice in js for optimization
2021-07-15 20:54:07 +02:00
flywind
1b128ac045
close #17986 add testcase ( #18477 )
2021-07-12 18:18:07 -04:00
Andrey Makarov
0e44d137f9
rm redundant blank lines before literal blocks ( #18465 )
2021-07-08 20:24:57 -04:00
Aditya Siram
2d758795f0
Rename test variable due to unfortunate connotations ( #18453 )
2021-07-08 10:21:30 +08:00
Timothee Cour
d1447fe25d
major improvements to std/wrapnils: optimal codegen, case objects, lvalue semantics ( #18435 )
...
* wrapnils now generates optimal code; also handles case objects
* changelog
* unsafeAddr => addr
2021-07-07 06:04:36 +02:00
pyautogui
927a832dde
deprecate std/mersenne ( #18395 )
...
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com >
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
2021-07-05 10:12:58 -07:00
Mark Pointing
17911a116d
Removed hard coded ports from thttpclient_standalone.nim. ( #18374 )
...
Co-authored-by: Dominik Picheta <dominikpicheta@googlemail.com >
Co-authored-by: Mark Pointing <mark@futurepoint.com.au >
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
2021-06-30 10:22:38 -07:00
Clyybber
6e74fecb42
Simplify addInt, remove digits10 ( #18356 )
...
* Simplify addInt, remove digits10
Co-authored-by: Charles Blake <charlechaud@gmail.com >
* Fix bootstrapping
* Add noInit to tmp array
* noInit -> noinit
Co-authored-by: Charles Blake <charlechaud@gmail.com >
2021-06-28 15:00:14 +02:00
gemath
e720bbdd76
Peg captures get stack-like behavior ( #18369 )
...
* Implements reverse capture indexing.
* Now works for modified backrefs too.
* Changed reverse indexing syntax prefix for back-references to '$^'.
2021-06-28 12:33:20 +02:00
Andrey Makarov
1b9b806007
rst: fix bug 20 from #17340 ( #18360 )
...
and a leftover bug: priority of option list inside definition list
2021-06-26 18:10:46 +02:00
Timothee Cour
565e07a993
enable VM tracing in user code via {.define(nimVmTrace).} ( #18244 )
...
* enable VM tracing in user code via `{.define(nimVmTrace).}`
* add vmutils.vmTrace
* add vmTrace
2021-06-24 11:55:31 +02:00
Andrey Makarov
0c8d3ae985
rst: allow comment to continue on second line ( #18338 )
2021-06-24 10:28:28 +02:00
Andrey Makarov
9c43f05099
Markdown: allow to end URL with balanced parenthesis ( #18321 )
...
* Markdown: allow to end URL with balanced parenthesis
* Update lib/packages/docutils/rst.nim
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
* apply suggestion
* remove unnecessary if
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
2021-06-23 07:50:05 +02:00
Timothee Cour
5badeea170
followup #18318 : simplify dollarImpl and add a test ( #18330 )
2021-06-22 21:42:39 -07:00
Timothee Cour
d398c558a4
close #13196 now that we have dragonbox ( #18316 )
2021-06-21 12:51:00 +02:00
flywind
2deb7011f5
fixes #17768 [backport:1.4] ( #18317 )
...
* fixes #17768 [backport:1.4]
* tiny
2021-06-21 12:50:47 +02:00
Andrey Makarov
1b3c0f142d
validate rst field for :number-lines:, :status: ( #18304 )
2021-06-20 20:00:42 +02:00
Heiko Nickerl
92cb765714
Raise IndexDefect when deleting element at out of bounds index ( #17821 )
...
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
Co-authored-by: Heiko Nickerl <mail@hnicke.de >
Co-authored-by: Heiko Nickerl <heiko.nickerl@flipapp.de >
2021-06-20 08:56:33 -07:00
Andrey Makarov
590d457631
docgen: move to shared RST state ( fix #16990 ) ( #18256 )
...
* docgen: move to shared RST state (fix #16990 )
* Update lib/packages/docutils/rst.nim
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
* Update lib/packages/docutils/rst.nim
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
* Update lib/packages/docutils/rst.nim
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
* 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 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 >
* rename `cmdDoc2` to `cmdDoc`
* fix (P)RstSharedState convention
* new style of initialization
* misc suggestions
* 1 more rename
* fix a regression
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
2021-06-20 09:50:03 +02:00
Timothee Cour
7714ab468a
make privateAccess work with generic types and generic instantiations; fix a SIGSEGV ( #18260 )
...
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
2021-06-19 11:24:46 -07:00
flywind
c51680e701
fixes #17696 ( #18276 )
2021-06-16 11:31:20 +02:00
Mark Pointing
e80d7ff0f2
httpclient.nim Fixes #14794 and an issue where content-header is not set on postContent ( #18208 )
...
* Fixed missing newline after bound marker in mulipart post (#14794 ) and a problem where calling postContent with multipart data does not set content-length header.
* Update lib/pure/httpclient.nim
* Added comment outlining the reason for changes to httpclient.nim and added tests to ensure that multipart post has a newline at the end of the body, and that the content-length header is present.
* Fixed typo in comments.
* Removed redundant blank lines in thttpclient_standalone.nim.
Co-authored-by: Mark Pointing <mark@futurepoint.com.au >
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
2021-06-14 19:29:23 +02:00
flywind
6b97889f44
fix #9437(fix re.replace wrong behaviour) ( #17546 )
...
* fix nim js cmp fails at CT
* fix
2021-06-10 18:26:58 +02:00
Fröhlich A
7bf0404dd8
#18216 make moveDir work across partitions on windows ( #18223 )
...
* return false if AccessDeniedError in tryMoveFSObject - fixes #18216
* add moveDir & moveFile tests
* rename `isMoveDir` parameter to `isDir`
2021-06-10 14:28:00 +02:00
Timothee Cour
79ded694d7
avoid re-exporting options from std/wrapnils ( #18222 )
2021-06-10 07:00:34 +02:00
Bung
429b128632
change mimedb stroe stringtable to orderedtable ( #18065 )
...
* change mimedb stroe stringtable to orderedtable
* Update lib/pure/mimetypes.nim
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
2021-06-07 13:57:42 +02:00
Timothee Cour
3cc547f2df
macros.treeRepr + friends: collapse SymChoice ( #18072 )
...
* macros.treeRepr + friends: collapse SymChoice
* make repr+friends work with invalid symchoice nodes
* address comment
2021-06-05 06:58:26 +02:00
n5m
4ee6eddad4
add string-string tests for find and rfind ( #18137 )
...
* add string-string tests for find and rfind
* remove duplicate test cases
* remove more redundant test cases
2021-06-02 16:19:30 +02:00
Andrey Makarov
ba3ec7b049
docs: Latex generation improvements ( #18141 )
...
* docs: improve Latex generation
* make it work on Windows + fix ] escaping
* minor fixes with escapes and style
2021-06-01 20:47:23 +02:00
Timothee Cour
369a7d1246
jsonutils.toJson now serializes JsonNode as is by default ( #18097 )
...
* jsonutils.toJson now serializes JsonNode as is (without deep copy nor treating it as a regular ref object)
* JsonNodeMode
2021-05-31 22:17:52 +02:00
Timothee Cour
9559350e34
add os.getCacheDir ( #18126 )
...
* add `os.getCacheDir`
* fixup
* address comments
2021-05-31 22:16:33 +02:00
Timothee Cour
a36efb59b5
fix #16256 : nimout: <empty> should give error (vacuously true); improve a few tests ( #18089 )
...
* fix #16256 : nimout: <empty> should give error (vacuously true); improve some tests
* renamed: tests/stdlib/t9710.nim -> tests/misc/t9710.nim
* improve tests
* fix non-DRY tests
* improve $nim_prs_D/tests/stdlib/t9091.nim
* renamed: tests/stdlib/t9091.nim -> tests/misc/t9091.nim
* fixup
* address comment: doAssert => result.parseErrors
2021-05-31 13:39:19 +02:00
n5m
064fe18de6
improve fast returns of find and rfind ( #18127 )
2021-05-31 11:20:15 +02:00
Timothee Cour
18b4774311
document macros.unpackVarargs ( #18106 )
...
* deprecate macros.unpackVarargs
* un-deprecate unpackVarargs and add docs+runnableExamples
* update examples + tests with varargs[typed]
2021-05-31 10:51:20 +02:00
Miran
50e98e6efa
hashes for refs should be an opt-in feature ( #18098 )
2021-05-30 23:55:51 +02:00
vabresto
cfe19247e8
Disable tasynchttpserver_transferencoding on FreeBSD ( #18122 )
2021-05-29 12:44:39 -07:00
vabresto
9eae6b4fe3
fix #17456 flaky test tasynchttpserver_transferencoding ( #18052 )
2021-05-28 15:17:37 -07:00
Timothee Cour
d217888e56
close #18009 parseJson JInt vs JFloat; preserve -0.0 as JFloat to distinguish from 0.0 ( #18067 )
2021-05-23 23:06:14 +02:00
Andrey Makarov
9f7e2e3057
docs: make inline markup more compatible with Markdown ( #18053 )
...
fixes https://github.com/timotheecour/Nim/issues/739
2021-05-21 06:54:20 +02:00
Timothee Cour
7f077a76fe
jsonutils: add customization for toJson via ToJsonOptions; generalize symbolName; add symbolRank ( #18029 )
...
* jsonutils: add customization for toJson via `ToJsonOptions`
* add enumutils.symbolRank
* lookup table implementation for HoleyEnum
* cleanup
* changelog
* fixup
* Update lib/std/jsonutils.nim
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
2021-05-18 15:10:19 +02:00
Andrey Makarov
2096490b59
follow-up #17930 - inline syntax highlighting ( #18013 )
...
* follow-up #17930 - inline syntax highlighting
* make closure->nimcall
2021-05-16 23:55:14 +02:00
Timothee Cour
d83b25db1e
fix #18007 : std/json now serializes nan,inf,-inf as strings instead of invalid json ( #18026 )
...
* fix #18007 : std/json now serializes nan,inf,-inf as raw strings instead of invalid json
* fix roundtrip
* fix tests
* fix changelog
* simplify
* add runnableExamples
* fix typo [skip ci]
2021-05-16 23:54:10 +02:00
Andrey Makarov
3824fd3f9a
RST opt.list to have priority over def.list ( #17845 )
2021-05-15 08:12:26 +02:00
Andreas Rumpf
4857c462d5
Revert "fix #14873 properly by skipping abi field in importc type ( #17944 )" ( #17992 )
...
This reverts commit 98c29c01eb .
2021-05-15 06:50:39 +02:00