Commit Graph

20070 Commits

Author SHA1 Message Date
Ivan Yonchovski
e4a2c2d474 Make sure that field usage preserves the original line info (#19751)
Currently `struct.field` will generate a node with `info` that points to the
symbol definition instead of having the actual node location.
2022-04-29 11:16:07 +02:00
flywind
8bfc396a4d fixes #18612; apply cache and memcmp for methods in arc/orc (#19749)
* try using endsWith

* use memcmp

* add cache

* cleanup

* better

* minor

* fix

* improve test coverage for methods with ARC
2022-04-26 20:14:39 +02:00
Andreas Rumpf
ef4ac5a0d2 use signed comparisons for the index checking in the hope it improves the code generation (#19712) 2022-04-26 08:58:15 +02:00
ehmry
82680a12a7 macros: make hasCustomPragma more permissive (#19747)
Make hasCustomPragma return false rather than fail for invalid
parameters.
2022-04-25 22:16:11 +02:00
flywind
42ac50e988 fixes #19662; Indent level errored for first line (#19718) 2022-04-25 12:00:23 +02:00
Andreas Rumpf
ee0a470294 Revert "fix db_sqlite.tryInsertID does raise exceptions in 1.6.0 #19743 (#19744)" (#19745)
This reverts commit b10f0e7bca.
2022-04-25 11:59:37 +02:00
flywind
15ae9323e8 fix NimNode comment repr() regression [backport: 1.2] (#19726) 2022-04-25 11:19:21 +02:00
flywind
465fd06d50 add warnings for gc:option (#19722) 2022-04-25 11:18:26 +02:00
Danil Yarantsev
2f32b450d3 Really fix StringStream with ARC at compile-time, improve streams test (#19739)
* Fix compile-time StringStream with ARC

* make readDataStr work with ARC, improve test
2022-04-25 11:15:03 +02:00
flywind
efaa6777a4 fix #19435; don't create TypeBoundOps for tyOpenArray, tyVarargs [backport: 1.6] (#19723)
* fix #19435; openArray wronyly registers typebounds

* add testcase

* don't create TypeBoundOps for tyOpenArray, tyVarargs
2022-04-25 11:07:55 +02:00
tersec
8e6136dd59 document localPassC consistently with compiler; fix ANSI capitalization (#19721) 2022-04-25 11:06:53 +02:00
flywind
b10f0e7bca fix db_sqlite.tryInsertID does raise exceptions in 1.6.0 #19743 (#19744) 2022-04-24 14:20:18 -04:00
huantian
02e8aa9660 Fix doc: list of async backends (#19741) 2022-04-24 10:47:39 +01:00
Andrey Makarov
bb839029d5 Move common Latex code into class nimdoc.cls (#19734) 2022-04-21 15:06:09 -04:00
Jason Beetham
dc4cc2dca5 Fix string stream crashing when created on nimscript due to last fix (#19717) 2022-04-14 11:30:59 +02:00
huantian
ef7d7f2459 Better error message and tests for bad await (#19622)
* Better error message and tests for bad await

* Use compiles to check if await is valid

* temp: disable windows noasync test

* Better error report, simplify test

Co-authored-by: flywind <xzsflywind@gmail.com>
2022-04-13 23:03:46 +02:00
flywind
98cebad7de enable style:usages for stdlib tests [backport: 1.6] (#19715)
* enable style:usages for stdlib tests

* freeAddrInfo

* more tests

* importc

* bufSize

* fix more

* => parseSql and renderSql
2022-04-13 11:53:02 +02:00
flywind
26bcf18f91 fix #19680; check if stderr is static (#19709) 2022-04-12 09:48:48 +02:00
Jason Beetham
26acc97864 StringStreams no longer errors when intialized with literals on arc/orc (#19708) 2022-04-11 14:27:12 +02:00
flywind
a77ffdb7ea fix #17286 nim check -b:js works (#19704)
* fix #17286 nim check -b:js works

* fix
2022-04-09 17:52:11 +02:00
Leon
152dab0983 fix: Fix introductory macro examples (#19706)
Co-authored-by: adigitoleo <adigitoleo@dissimulo.com>
2022-04-09 17:51:44 +02:00
flywind
ded8b0e541 rewrite docs JS in Nim (#19701)
* rewrite docs JS in Nim

* fixup

* fix nimdoc/rsttester
2022-04-09 17:50:57 +02:00
flywind
00775f6880 fix stylecheck bug with nre (#19356)
* stylecheck usages part two: stdlib cleanup

typeinfo.nim: importCompilerProc => importcompilerproc

nre.nim: newLineFlags => newlineFlags

system.nim: JSRoot => JsRoot

ref #19319

* prefer importCompilerProc

* fix stylecheck error with asyncdispatch

it is a partial regression since #12842

* add tests

* don't use echo in tests

* fix stylecheck bug with nre

* Update compiler/linter.nim

* no need to check dotexpr again

* neither did let/var/const
2022-04-08 08:04:46 +02:00
Timothee Cour
e78ef57c93 typetraits: add toSigned, toUnsigned (#18445)
* typetraits: add toSigned, toUnsigned

* improve and add tests

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
Co-authored-by: flywind <xzsflywind@gmail.com>
2022-04-07 17:38:01 -04:00
flywind
1807de38e5 add testcase for #16462 (#19692) 2022-04-07 20:57:50 +02:00
flywind
c8aeea9d62 improve the error messages for std/tasks [backport: 1.6] (#19695) 2022-04-07 20:56:34 +02:00
Ivan Yonchovski
810d5e91e4 [nimsuggest] return the type when on symbol in let/var (#19639)
- make sure `suggestSym` is called after `PSym.typ` is set.
2022-04-07 13:39:27 +02:00
flywind
0978276ed9 use two spaces indentation (#19696) 2022-04-07 13:07:39 +08:00
flywind
e1929deac7 remove useless compilation condition (#19690)
ref https://github.com/nim-lang/Nim/pull/18546
2022-04-07 07:11:25 +08:00
Nan Xiao
065f568470 No need to export pos from OptParser (#19688)
Co-authored-by: flywind <xzsflywind@gmail.com>
2022-04-06 20:28:58 +02:00
Jacek Sieka
cb6ce80cb8 std/tasks: fix spelling (#19691) [backport]
why aren't these not being caught by style check options?
--styleCheck:usages finds it.

Co-authored-by: flywind <xzsflywind@gmail.com>
2022-04-06 20:28:37 +02:00
flywind
e649ddd09b Revert "Load Google Fonts last (#19683)" (#19693)
This reverts commit abe3b0eb64.
2022-04-06 20:27:51 +02:00
locriacyber
abe3b0eb64 Load Google Fonts last (#19683) 2022-04-06 18:08:27 +02:00
Miran
c322faaf38 [backport] fix broken SSL tests (#19684)
* [backport] fix broken SSL tests

* remove a flaky one
2022-04-06 16:18:10 +02:00
flywind
5a995ffc53 fix #18986; Import/except doesn't work on devel [backport: 1.6] (#19687)
* fix #18986; Import/except doesn't work on devel [backport: 1.6]

* add testcase
2022-04-06 16:17:09 +02:00
flywind
83dabb69ae Fix bug in freshVarForClosureIter. Fixes #18474 (#19675) [backport]
* Fix bug in freshVarForClosureIter. Fixes #18474.

freshVarForClosureIter was returning non-fresh symbols sometimes.
Fixed by making addField return the generated PSym.

* remove discardable

Co-authored-by: Nick Smallbone <nick@smallbone.se>
2022-04-04 12:05:23 +02:00
flywind
c3f03cfa5d add somes links to docs (#19668) 2022-04-01 13:30:02 -04:00
Nan Xiao
a7024f49af fix 19655 - fixing more url fragments (#19669) 2022-04-01 13:29:15 -04:00
rockcavera
1275763284 fix 19655 - fixing url fragment (#19667) 2022-04-01 08:01:51 +02:00
Juan Carlos
49844415ce Deprecate selfExe (#19660)
* Deprecate selfExe Nimscript

* Deprecate selfExe Nimscript
2022-03-31 21:06:13 +02:00
Jaremy Creechley
eae29e8eaf Embedded Network patches - eventfd & socket getters (#19632) 2022-03-28 12:37:59 +02:00
Andreas Rumpf
7d32425a57 fixes #14318 (#14335) 2022-03-26 13:29:04 +01:00
flywind
82319ef00d fix #8219; nim check/dump shouldn't run single nimscript project [backport: 1.6] (#19641)
* fix #8219; nim check/dump shouldn't run single nimscript project [backport: 1.6]
2022-03-26 11:50:15 +01:00
John Titor
8cdd8867c0 Fix dial ignoring buffered parameter (#19650) [backport] 2022-03-26 11:43:26 +01:00
Omar Flores
86e93eb293 Fixed description as option in advopt.txt (#19635)
* Fixed formatting error in warningAsError.

There was only a single space character between the warning and its description, so it shows up as part of the name (in bold) and with no description.
Copied the way hotCodeReloading was formatted, with the description in a new line.

Also changed descriptions from 'ditto' to what the description it references says.

* Fixed typo in advopt.txt

Corrected 'hints' to 'warnings' in updated advopt.txt.
2022-03-26 09:56:10 +01:00
flywind
84ac003519 remove tmpFramePtr when optStackTrace is absent (#19649) 2022-03-26 08:57:29 +01:00
tandy1000
4dfe420c2f Add support for Window.matchMedia (#19648) 2022-03-26 06:57:39 +01:00
Andreas Rumpf
51df9ff1c7 fixes #19603; some pragmas were really only supported as top level statements. Now this is enforced properly. (#19646) 2022-03-26 06:47:04 +01:00
Andreas Rumpf
12a0f88a52 mitigates #19364 [backport]; we make this bug more unlikely to appear by producing better code to begin with; real fix will come later (#19647) 2022-03-26 06:37:04 +01:00
flywind
afbcba909b remove unnecessary framePtr code (#19645) 2022-03-25 10:46:42 +01:00