Commit Graph

18615 Commits

Author SHA1 Message Date
Clyybber
cccf219ceb Allow strings for -- in config.nims (#16934) 2021-02-04 13:59:55 +01:00
ee7
14c61ecf24 strictFuncs+views: add test that imports stdlib modules (#16878)
This commit attempts to improve testing of strictFuncs and views, and
prevent regressions like #16873 (resolved by 0b01eddace).

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.
2021-02-03 16:00:29 +01:00
Timothee Cour
6f1289b80c remove .github/workflows/ci_ssl.yml; instead run via trunner_thirdparty (#16221) 2021-02-02 18:32:33 -08:00
konsumlamm
f4449a897d Sugar tests (#16820) 2021-02-02 18:11:59 -08:00
Clyybber
e4ad0ae5c4 Add testcase for #16897 (#16917) 2021-02-02 21:43:02 +01:00
Timothee Cour
7b9b76d840 tests/tuples/ttuples_issues.nim: test on all backends + various improvements (#16907)
* improve tests/tuples/ttuples_issues.nim: test on all backends

* address comments
2021-02-02 20:17:13 +01:00
Andreas Rumpf
fb80d2ff85 IC: bugfixes (WIP) (#16836)
* minor improvements
* IC: added the required logic for compilerProcs
* LazySym ftw
* we need this testing logic
* reimplement the old way we use for module package creation
* fixes a regression; don't pick module names if you can avoid it
2021-02-02 19:24:55 +01:00
narimiran
1d1c831efa [ci skip] CountTable, remove link to unexisting proc 2021-02-02 09:52:39 +01:00
n5m
f87b9866af link compile-time options together in docs (#16879)
* link similar compiler option proc together

* fixup links

* fix formatting and links

* example formatting

* drop declared

* link to compilesettings

* only link define pragmas once

* drop another declared

* backlink to compileOptions from compilesettings

* remove newline
2021-02-02 09:44:21 +01:00
Timothee Cour
4b2054a7bf dumpToString: improves on sugar.dump (#16841)
* dumpToString
* _
* fixup
* changelog
* address comment: removed the word "Deprecated"
2021-02-02 07:41:33 +01:00
konsumlamm
15d6be52a1 Improve doc comments (#16902)
Add runnableExamples
Use `reduce` in `initRational` and `//`
Add static tests
2021-02-02 07:04:30 +01:00
Timothee Cour
917f12ae52 2.5x- 3x faster copyFile on osx (#16883) 2021-02-01 17:38:17 -08:00
zetashift
fa9dc31899 fix #16885: nimdoc css warning (#16893)
* fix #16885

* Fixup nimdoc for the CSS filter change

* Use the same Nim devel versions

* Revert "Use the same Nim devel versions"

This reverts commit 8559308f9b.

* Revert "Fixup nimdoc for the CSS filter change"

This reverts commit 99ec00a4bd.

* Fixup nimdoc.out.css

Co-authored-by: zetashift <rishi2@laptop.localdomain>
2021-02-01 20:18:37 +01:00
flywind
777888fdea add widestrs.newWideCString overload (#16860) 2021-02-01 20:16:50 +01:00
hlaaftana
def1f99289 add finally as post expr block [backport:1.4] (#16896) 2021-02-01 20:14:20 +01:00
Andreas Rumpf
91ace2188a fixes #16897 [backport:1.2] (#16900) 2021-02-01 16:56:02 +01:00
flywind
de4f2604c2 fix #16822 (#16884)
* see whether it breaks

* fix #16884

* correct

* fix #14574
2021-02-01 13:31:04 +01:00
flywind
a2855b66ae JS: make hash float support IE/Safari (#16872) 2021-02-01 13:19:25 +01:00
Don-Duong Quach
206ad43cdc Updated nimsuggest doc to explain connection to nim compiler and use of config files (#16869) 2021-02-01 13:17:19 +01:00
ee7
0b01eddace critbits: fix error from strictFuncs (#16877)
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 2aed418698 (#16564).

Fixes: #16873
2021-02-01 13:14:23 +01:00
flywind
74f8a8e38a let's assume littleEndian in JS backend (#16886)
* let's assume littleEndian in JS and VM backend

* Update compiler/platform.nim
2021-02-01 13:11:35 +01:00
Timothee Cour
1a74576854 distinctBase now is identity instead of error for non distinct types (#16891) 2021-02-01 13:10:52 +01:00
Miran
25c75752d0 remove quotation marks around imports - fixes links in the docs (#16888) 2021-02-01 06:50:23 +01:00
konsumlamm
c05d1aab13 Add more runnableExamples (#16864)
Add more links
2021-01-31 18:53:22 +00:00
konsumlamm
13640c08a2 Minor docs improvement for oids (#16882) 2021-01-31 01:29:50 -08:00
konsumlamm
eef2948ec2 Fix #12595 (#16874) 2021-01-31 01:00:18 +01:00
flywind
111092e8aa refactor hash in JS backend (#16863) 2021-01-30 14:14:38 +01:00
Juan Carlos
b8e8eaae66 BigInt runnableExamples: octal, binary, hex constructor (#16868)
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
2021-01-29 17:48:47 -08:00
Antonis Geralis
2c70734913 Add StorageEvent and correct Storage object (#16865)
There is no `LocalStorage` type, it's `Storage`
2021-01-29 20:37:31 +01:00
Saem Ghani
1097cc4173 nimsuggest prioritize non-deprecated suggestions (#16816)
* penalizes the quality score of deprecated symbols
* uses quality more pervasively in order to reflect deprecation impact
* impacts both sug and con

additional notes:
* linux i386 CI was failing
* this is because the suggested results differ slightly in their sort
* 64 bit tables.getOrDefault:441 was returned, while 32 bit returned 422
* for now simply removing the last line is good enough
2021-01-29 15:15:35 +01:00
flywind
296cf9657c add lost functions (#16843) 2021-01-29 15:14:19 +01:00
flywind
f09d97d6d3 close #16844 (#16852)
* close #16844
* better
* comment
* Update compiler/renderer.nim
2021-01-29 14:31:41 +01:00
Timothee Cour
6e267d28b3 remove conditionals on nimHasUserErrors, nimNoNilSeqs2, nimNoNilSeqs (#16861)
* cleanup docs for type(nil) | type(nil); simplify nimHasUserErrors

* simplify nimNoNilSeqs2

* simplify nimNoNilSeqs

* fixup
2021-01-29 14:30:24 +01:00
flywind
4e1e231e29 fix floats slice (#16853)
* see whether it breaks

* fix

* fix

* minor

* fix

* add enum

* use Ordinal types

* fix tests

* fix

* another style

* fix remainning cases
2021-01-29 12:26:36 +01:00
Timothee Cour
44f672a515 fix #9102 docgen: sidebar now shows proc signatures instead of encoding (#16857) 2021-01-29 08:42:19 +01:00
Timothee Cour
478d15f7f4 improve code in categories.nim; add std/private/gitutils; fix flakyness in nim CI (cloneDependency in deps.nim) (#16856)
* improve code in categories.nim; gitutils; fix flakyness in deps.nim
* cleanups
2021-01-29 07:51:12 +01:00
Timothee Cour
b0f38a63c4 fix #16815 round(x,places) works again in vm (#16825)
* fix #16815 round+places works again in vm

* improve tests; fix for linux 32bit

* fix test for windows
2021-01-28 10:40:18 +01:00
narimiran
37a98c6c58 small fix in grammar.txt [ci skip] 2021-01-28 09:42:24 +01:00
Joey
0d1c5f4137 A new request should always have a new content-length (#16667)
* A new request should always have a new content-length

In [my last PR](https://github.com/nim-lang/Nim/pull/16618) I made a mistake by assuming that the client.headers were cleared on every request, like the Python version. So, due to the fact that Nim keeps the client headers, we need to clear the Content-Length header on each request (which makes sense because you almost never want to use the same Content-Length twice, but you may want to reuse other headers)

* Move content-length to newHeaders instead of in the global client headers

* Use single backticks
2021-01-28 00:07:08 +00:00
Timothee Cour
e112974920 fix #16752: threadvar now works with importcpp types; osx now uses native TLS (--tlsEmulation:off), which can be orders of magnitude faster (#16750)
* osx now uses native TLS, which can be orders of magnitude faster

* add {.cppNonPod.}

* improve test

* changelog, docs, disable part of windows test
2021-01-27 22:35:43 +01:00
konsumlamm
3c8fddbc76 Improve documentation for the mersenne module (#16824)
* Improve documentation for mersenne

Add tests for mersenne

* Add link to Wikipedia article
2021-01-27 19:14:13 +00:00
konsumlamm
c9801d7abc Improve documentation for threadpool (#16821) 2021-01-27 19:05:31 +00:00
Timothee Cour
11a54ab2b2 testament: fix #16829, fix partially #16830 (#16831)
* fix #16829
* address comments
2021-01-27 17:05:48 +01:00
Timothee Cour
57f68bce16 disble fidget again (#16842) 2021-01-27 03:41:58 -08:00
Jason Beetham
ecc9704bf4 Moved json enum index test to the proper file (#16826) 2021-01-25 18:35:08 -08:00
Jason Beetham
dde096ffde added enum indexed array support to json (#16807)
* added enum indexed array support to json

* Added json test

* Removed when statement for enum indexed arrays
2021-01-26 00:55:49 +01:00
Andreas Rumpf
25745ad195 IC: final implementation steps (#16801)
* removed dead code
* we need even more laziness for the generic caches
* make it bootstrap on older Nims
* wrote more deserialization code
* IC: replay required methods information
2021-01-25 20:52:26 +01:00
Elliot Waite
0436a7cffd Make small text changes in the docs (#16634)
* Fix broken links in docs

* Fix rand HSlice links

* Make small text changes in the docs

* Fix typo in contributing docs
2021-01-25 14:59:19 +01:00
konsumlamm
20993047ce Sugar improvements (#16802)
* Use runnableExamples in sugar

Remove unnecessary import

* Add trailing newline

* Address nits

* Remove unneccessary convolution

* Change wording

Co-authored-by: Clyybber <darkmine956@gmail.com>
2021-01-25 14:41:55 +01:00
konsumlamm
8395abab5f Small changes to std/sums (#16797) 2021-01-25 12:15:36 +01:00