changelog improvements

This commit is contained in:
Araq 2020-10-08 10:52:18 +02:00 • committed by Andreas Rumpf
commit 4d91cc7950

View file

@ -19,10 +19,10 @@
- If `allowMissingKeys` is `true` Nim's object to which JSON is parsed is - If `allowMissingKeys` is `true` Nim's object to which JSON is parsed is
allowed to have fields without corresponding JSON keys. allowed to have fields without corresponding JSON keys.
- Added `bindParams`, `bindParam` to `db_sqlite` for binding parameters into a `SqlPrepared` statement. - Added `bindParams`, `bindParam` to `db_sqlite` for binding parameters into a `SqlPrepared` statement.
- Add `tryInsert`,`insert` procs to `db_*` libs accept primary key column name. - Added `tryInsert`,`insert` procs to `db_*` libs accept primary key column name.
- Added `xmltree.newVerbatimText` support create `style`'s,`script`'s text. - Added `xmltree.newVerbatimText` support create `style`'s,`script`'s text.
- `uri` adds Data URI Base64, implements RFC-2397. - `uri` adds Data URI Base64, implements RFC-2397.
- Add [DOM Parser](https://developer.mozilla.org/en-US/docs/Web/API/DOMParser) - Added [DOM Parser](https://developer.mozilla.org/en-US/docs/Web/API/DOMParser)
to the `dom` module for the JavaScript target. to the `dom` module for the JavaScript target.
- The default hash for `Ordinal` has changed to something more bit-scrambling. - The default hash for `Ordinal` has changed to something more bit-scrambling.
`import hashes; proc hash(x: myInt): Hash = hashIdentity(x)` recovers the old `import hashes; proc hash(x: myInt): Hash = hashIdentity(x)` recovers the old
@ -182,10 +182,10 @@
cannot be applied to every use case. The limitations and the (lack of) reliability cannot be applied to every use case. The limitations and the (lack of) reliability
of `round` are well documented. of `round` are well documented.
- Add `getprotobyname` to `winlean`. Add `getProtoByname` to `nativesockets` which returns a protocol code - Added `getprotobyname` to `winlean`. Added `getProtoByname` to `nativesockets` which returns a protocol code
from the database that matches the protocol `name`. from the database that matches the protocol `name`.
- Add missing attributes and methods to `dom.Navigator` like `deviceMemory`, `onLine`, `vibrate()`, etc. - Added missing attributes and methods to `dom.Navigator` like `deviceMemory`, `onLine`, `vibrate()`, etc.
- Added `strutils.indentation` and `strutils.dedent` which enable indented string literals: - Added `strutils.indentation` and `strutils.dedent` which enable indented string literals:
```nim ```nim
@ -197,9 +197,9 @@
""" """
``` ```
- Add `initUri(isIpv6: bool)` to `uri` module, now `uri` supports parsing ipv6 hostname. - Added `initUri(isIpv6: bool)` to `uri` module, now `uri` supports parsing ipv6 hostname.
- Add `readLines(p: Process)` to `osproc` module for `startProcess` convenience. - Added `readLines(p: Process)` to `osproc` module for `startProcess` convenience.
- Added `heapqueue.toHeapQueue`, which creates a HeapQueue from an openArray. - Added `heapqueue.toHeapQueue`, which creates a HeapQueue from an openArray.
The usage is similar to procs such as `sets.toHashSet` and `tables.toTable`. The usage is similar to procs such as `sets.toHashSet` and `tables.toTable`.
@ -233,7 +233,6 @@
proc `=destroy`(x: MyObj) = proc `=destroy`(x: MyObj) =
if x.kind and x.y != nil: if x.kind and x.y != nil:
deallocShared(x.y) deallocShared(x.y)
x.y = nil
``` ```
Refactor into: Refactor into:
```nim ```nim
@ -248,7 +247,6 @@
proc `=destroy`(x: MySubObj) = proc `=destroy`(x: MySubObj) =
if x.val != nil: if x.val != nil:
deallocShared(x.val) deallocShared(x.val)
x.val = nil
``` ```
- `getImpl` on enum type symbols now returns field syms instead of idents. This helps - `getImpl` on enum type symbols now returns field syms instead of idents. This helps
with writing typed macros. Old behavior for backwards compatibility can be restored with writing typed macros. Old behavior for backwards compatibility can be restored
@ -280,14 +278,14 @@ proc mydiv(a, b): int {.raises: [].} =
The reason for this is that `DivByZeroDefect` inherits from `Defect` and The reason for this is that `DivByZeroDefect` inherits from `Defect` and
with `--panics:on` `Defects` become unrecoverable errors. with `--panics:on` `Defects` become unrecoverable errors.
- Added the `thiscall` calling convention as specified by Microsoft, mostly for hooking purpose - Added the `thiscall` calling convention as specified by Microsoft, mostly for hooking purposes.
- Deprecated `{.unroll.}` pragma, was ignored by the compiler anyways, was a nop. - Deprecated `{.unroll.}` pragma, was ignored by the compiler anyways, was a nop.
- Remove `strutils.isNilOrWhitespace`, was deprecated. - Removed `strutils.isNilOrWhitespace`, was deprecated.
- Remove `sharedtables.initSharedTable`, was deprecated and produces undefined behavior. - Removed `sharedtables.initSharedTable`, was deprecated and produces undefined behavior.
- Removed `asyncdispatch.newAsyncNativeSocket`, was deprecated since `0.18`. - Removed `asyncdispatch.newAsyncNativeSocket`, was deprecated since `0.18`.
- Remove `dom.releaseEvents` and `dom.captureEvents`, was deprecated. - Removed `dom.releaseEvents` and `dom.captureEvents`, was deprecated.
- Remove `sharedlists.initSharedList`, was deprecated and produces undefined behaviour. - Removed `sharedlists.initSharedList`, was deprecated and produces undefined behaviour.
- There is a new experimental feature called "strictFuncs" which makes the definition of - There is a new experimental feature called "strictFuncs" which makes the definition of
`.noSideEffect` stricter. [See](manual_experimental.html#stricts-funcs) `.noSideEffect` stricter. [See](manual_experimental.html#stricts-funcs)
@ -331,7 +329,7 @@ proc mydiv(a, b): int {.raises: [].} =
- `--hint:processing` is now supported and means `--hint:processing:on` - `--hint:processing` is now supported and means `--hint:processing:on`
(likewise with other hints and warnings), which is consistent with all other bool flags. (likewise with other hints and warnings), which is consistent with all other bool flags.
(since 1.3.3). (since 1.3.3).
- `nim doc -r main` and `nim rst2html -r main` now call openDefaultBrowser - `nim doc -r main` and `nim rst2html -r main` now call `openDefaultBrowser`.
- new hint: `--hint:msgOrigin` will show where a compiler msg (hint|warning|error) - new hint: `--hint:msgOrigin` will show where a compiler msg (hint|warning|error)
was generated; this helps in particular when it's non obvious where it came from was generated; this helps in particular when it's non obvious where it came from
either because multiple locations generate the same message, or because the either because multiple locations generate the same message, or because the