| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
fixes #22932
follow up https://github.com/nim-lang/Nim/pull/21629
---------
Co-authored-by: Nickolay Bukreyev <SirNickolas@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before this change strformat used the generic formatValue function for
Complex numbers. This meant that it was not possible to control the
format of the real and imaginary components of the complex numbers.
With this change this now works:
```nim
import std/[complex, strformat]
let c = complex(1.05000001, -2.000003)
echo &"{c:g}"
# You now get: (1.05, -2)
# while before you'd get a ValueError exception (invalid type in format string for string, expected 's', but got g)
```
The only small drawback of this change is that I had to import complex
from strformat. I hope that is not a problem.
---------
Co-authored-by: Angel Ezquerra <angel_ezquerra@keysight.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes the assertion defect that happens when using `jsondoc --stdout`
(There is no outfile since its just stdout)
```
Error: unhandled exception: options.nim(732, 3) `not conf.outFile.isEmpty` [AssertionDefect]
```
Also makes the output easier to parse by ending each module output with
a new line.
|
| |
|
|
|
| |
This adds inlay hint support for the types of consts.
|
|
|
|
|
|
|
|
| |
(#22915)
…er base method returning a lent
fixes #22673
|
| |
|
|
|
|
|
|
|
|
| |
Per manual, `panics:on` affects _only_ `Defect`:s - thus `sysFatal`
should not redirect any other exceptions.
Also, when `sysFatal` is used in `nimPanics` mode, it should use regular
exception handling pipeline to ensure exception hooks are called
consistently for all raised defects.
|
| |
|
|
|
|
|
|
| |
fixes #22898
In these cases, the tables/sets are clears or elements are deleted from
them. It's reasonable to suppress warnings because the value is not
accessed anymore, which means it's safe to ignore the warnings.
|
|
|
| |
without it, devels fails to build with `-d:useLinenoise`
|
|
|
| |
fixes #22860
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds inlay hints support to nimsuggest. It adds a new command to
nimsuggest, called 'inlayHints'.
Currently, it provides type information to 'var' and 'let' variables. In
the future, inlay hints can also be added for 'const' and for function
parameters. The protocol also reserves space for a tooltip field, which
is not used, yet, but support for it can be added in the future, without
further changing the protocol.
The change includes refactoring to allow the 'inlayHints' command to
return a completely different structure, compared to the other
nimsuggest commands. This will allow other future commands to have
custom return types as well. All the previous commands return the same
structure as before, so perfect backwards compatibility is maintained.
To use this feature, an update to the nim language server, as well as
the VS code extension is needed.
Related PRs:
nimlangserver: https://github.com/nim-lang/langserver/pull/53
VS code extension: https://github.com/saem/vscode-nim/pull/134
---------
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
|
|
|
| |
fixes #22902
|
|
|
|
| |
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
Co-authored-by: Juan Carlos <juancarlospaco@gmail.com>
|
|
|
|
|
|
| |
custom destructors (#22901)
fixes #22866;
fixes #19998
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Continuation of https://github.com/nim-lang/Nim/pull/19262
Fixes https://github.com/nim-lang/Nim/issues/19261
The parsing code is still too lenient (e.g. it will happily parse header
names with spaces in them, which is outright invalid by the spec), but I
didn't want to touch it beyond the simple changes to make sure that
`std/httpclient` won't throw `IndexDefect`s like it does now on those
cases:
- Multiline header values
- No colon after the header name
- No value after the header name + colon
One question remains - should I keep `toCaseInsensitive` exported in
`httpcore` or just copy-paste the implementation?
---------
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#22895)
fixes #22883
…eDefault` warnings
avoid issues mentioned by https://forum.nim-lang.org namely, it
allocated unnecessary stack objects in the loop
```c
while (1)
{
tyObject_N__8DSNqSGSHBKOhI8CqSgAow T5_;
nimZeroMem((void *)(&T5_), sizeof(tyObject_N__8DSNqSGSHBKOhI8CqSgAow));
eqsink___test4954_u450((&(*t_p0).data.p->data[i].Field1), T5_);
}
```
It might be more efficient in some cases
follow up https://github.com/nim-lang/Nim/pull/21821
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
ref
https://github.com/nim-lang/nightlies/actions/runs/6686795512/job/18166625042#logs
> /home/runner/work/nightlies/nightlies/nim/compiler/nir/nirvm.nim(163,
35) Error: type mismatch: got 'BiggestInt' for
'b.m.lit.numbers[litId(b.m.types.nodes[int(y)])]' but expected 'int'
Or unifies the type in one way or another
|
|
|
|
| |
follow up https://github.com/nim-lang/Nim/pull/22851
follow up https://github.com/nim-lang/Nim/pull/22873
|
| |
|
|
|
| |
follow up https://github.com/nim-lang/Nim/pull/22851
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Per https://datatracker.ietf.org/doc/html/rfc9110#name-user-agent a
User-Agent is defined as follows:
```
User-Agent = product *( RWS ( product / comment ) )
```
Where
```
product = token ["/" product-version]
product-version = token
```
In this case, `token` is defined in RFC 7230 -
https://datatracker.ietf.org/doc/html/rfc7230#section-3.2.6:
```
token = 1*tchar
tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*"
/ "+" / "-" / "." / "^" / "_" / "`" / "|" / "~"
/ DIGIT / ALPHA
; any VCHAR, except delimiters
```
or, in the original RFC 2616 -
https://datatracker.ietf.org/doc/html/rfc2616#section-2.2 (next page):
```
token = 1*<any CHAR except CTLs or separators>
separators = "(" | ")" | "<" | ">" | "@"
| "," | ";" | ":" | "\" | <">
| "/" | "[" | "]" | "?" | "="
| "{" | "}" | SP | HT
```
which means that a `token` cannot have whitespace. Not sure if this
should be in the breaking changelog section - theoretically, some
clients might've relied on the old Nim user-agent?
For some extra info, some other languages seem to have adopted the same
hyphen user agent to specify the language + module, e.g.:
-
https://github.com/python/cpython/blob/main/Lib/urllib/request.py#L1679
(`Python-urllib/<version>`)
Fixes #22862.
|
|
|
|
|
|
| |
I have added a note for installment
https://github.com/nim-lang/htmlparser/pull/5
> In order to use this module, run `nimble install htmlparser`.
|
|
|
| |
fixes #22868
|
|
|
|
|
|
|
|
|
| |
ref https://github.com/nim-lang/Nim/pull/22848
see also https://github.com/nim-lang/htmlparser
will build the documentation later when everything else is settled
---------
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
|
|
|
| |
fixes #22867
|
|
|
| |
doc: fix typos
|
|
|
|
|
|
|
|
| |
fixes #22856
`-d:nimStrictDelete` is introduced in 1.6.0, which promised to be
enabled in the coming versions. To keep backwards incompatibilities, it
also extends the feature of `-d:nimAuditDelete`, which now mimics the
old behaviors.
|
| |
|
|
|
|
|
|
| |
1. `freeAddrInfo` is called prematurely, the variable `myAddr` is still
in use
2. Use defer syntax to ensure that `freeAddrInfo` is also called on
exceptions
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Close #22826
I am not sure why this code skips generic insts, so letting CI tell me.
Update: It has told me nothing. Maybe someone knows during review.
Issue itself seems to be that the generic instance is skipped thus it
ends up being just `float` which makes it use the wrong generic instance
of the proc because it matches the one in cache
---------
Co-authored-by: SirOlaf <>
|
|
|
|
|
| |
At least on modern Nim `tempfiles` is not usable if the user has
https://github.com/oprypin/nim-random installed, because the compiler
picks the nimble path over the stdlib path (apparently).
|
|
|
|
|
| |
efficient than sets and reasonable for holeyenums (#22845)
fixes #22844
|
|
|
|
|
|
|
| |
fix #22834
Edit: also fixes `result.addrList` when IPv6, which previously only
performed a `result.addrList = cstringArrayToSeq(s.h_addr_list)` which
does not provide the textual representation of an IPv6
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Bisect default to Linux only. Tiny diff, YAML only.
| OS | How to? |
|----|---------|
| Linux | `-d:linux` |
| Windows | `-d:windows` |
| OS X | `-d:osx` |
If no `-d:linux` nor `-d:windows` nor `-d:osx` is used then defaults to
Linux.
|
|
|
|
|
|
|
| |
(#22837)
… enabled
fixes #22836
|
| |
|
| |
|
|
|
|
| |
closes #16919
followup #16820
|
|
|
|
|
| |
(#22822)
…s of a patent-pending new VM
|
|
|
| |
Added table view in Compiling section of documentation
|
|
|
|
|
|
|
|
|
|
|
| |
containsManagedMemory(n.typ) (#22823)
fixes #19250
fixes #22259
The strings, seqs, refs types all have this flag, why should closures be
treated differently?
follow up https://github.com/nim-lang/Nim/pull/14336
|
|
|
|
|
|
| |
fixes #22354
It skips `nkHiddenAddr`. No need to hoist `var parameters` without side
effects. Besides, it saves lots of temporary variables in ORC.
|
|
|
|
|
|
| |
Done:
- [x] Implement conversions to openArray/varargs.
- [x] Implement index/range checking.
|