|
1 | 1 | ## V 0.4.3
|
2 | 2 | *11 November 2023*
|
3 |
| -*not complete yet* |
4 | 3 |
|
5 | 4 | #### Improvements in the language
|
6 |
| -- Align ternary expressions in const blocks (#19721) |
7 |
| -- Respect raw strings in `$embed_file(r'/some/path')` expressions (#19753) |
8 |
| -- Remove additional line breaks after call_expr before params struct args (#19795) |
| 5 | +- A new `encoding.xml` module with parser, validation, entity encoding, unit tests (#19708) |
| 6 | +- Better couroutines support (IO, networking) |
| 7 | +- Allocations in vweb apps reduced by 80% |
| 8 | +- Implement `@VCURRENTHASH` to replace `C.V_CURRENT_COMMIT_HASH` (#19514) |
| 9 | +- int => i64 on 64 bit, i32 on 32 bit (start of the transition) |
| 10 | +- Fix new int type promotion rules and cleanup native gen() (#19535) |
9 | 11 |
|
10 | 12 | #### Breaking changes
|
| 13 | +- `Request.cookies` map has been deprecated. Replaced with `Request.cookie()` and `Request.add_cookie()`. |
| 14 | +- Stricter rules for C types (they always have to be declared now) |
11 | 15 |
|
12 | 16 | #### Checker improvements/fixes
|
| 17 | +- Turn the option/result split warning into an error |
| 18 | +- Turn propagation warning into an error (finishes the option/result split) |
| 19 | +- Fix fn call with option call argument in autofree mode (#19515) |
| 20 | +- Bring back pascal case check for aliases |
| 21 | +- C.xx = C.yy aliases |
| 22 | +- Allow casted integeral types in match ranges (#19572) |
| 23 | +- Warn about byte deprecation, when used as a fn parameter (#19629) |
| 24 | +- Allow size of fixed array to be integral casts (#19663) |
| 25 | +- Fix generic array append (#19658) |
13 | 26 | - Check error of implementing other module private interface (fix #19620) (#19688)
|
14 | 27 | - Extend byte deprecation warning to array init types (#19671)
|
15 | 28 | - Extend byte deprecation warnings to return types (#19668)
|
16 | 29 | - Fix negative cap, len checks in array init (#19694)
|
17 | 30 | - Turn warning for var and param module name duplicates into error (#19645)
|
18 |
| -- Fix closure in if guard (#19750) |
19 |
| -- Fix closure in if guard, with multi_return (#19765) |
| 31 | +- Fix closure in if guard, including with multi_return (#19765) |
20 | 32 | - Fix comptime enumdata value property access (#19768)
|
21 | 33 | - Fix `field ?&Type` without default value (#19786)
|
22 | 34 | - Avoid nil assign to option var (#19746)
|
23 | 35 | - Allow for a shared variable to be whole reassigned (keeping the same mutex state) (fix #15649) (#19751)
|
24 | 36 |
|
25 | 37 | #### Parser improvements
|
26 |
| -- parser: add `set_all` + `clear_all` methods to `[flag]` enum bitfields (#19717) |
| 38 | +- Fix assigning static method to anon fn (#19499) |
| 39 | +- ast: fix formatting a struct declaration with a nested struct (#19592) |
| 40 | +- Add `set_all` + `clear_all` methods to `[flag]` enum bitfields (#19717) |
27 | 41 | - ast: reduce cost of frequently called functions by using constants (#19733)
|
28 |
| -- parser: warn on unused imports, even when they are declared via `import math { sin, cos }` (#19738) |
| 42 | +- Warn on unused imports, even when they are declared via `import math { sin, cos }` (#19738) |
29 | 43 | - ast: add missing docstrings for the public fns in vlib/v/ast/types.v (#19752)
|
30 |
| -- parser: give a friendly error when misusing if over $if (#19810) |
| 44 | +- Give a friendly error when misusing if over $if (#19810) |
31 | 45 | - Add multiple struct attributes error for new attribute syntax
|
32 | 46 |
|
33 | 47 | #### Compiler internals
|
| 48 | +- checker, builder, pref: support `-dump-defines -` to help explore all the available user and system defines for a given program (#19576) |
| 49 | +- pref,builder: add support for `-macosx-version-min 10.2` and `-macosx-version-min 0` (with default of 10.7) (#19626) |
34 | 50 | - pref: fix unintended file extensions in default output names, allow for `v run file.c.v` (#19745)
|
35 | 51 | - transformer: fix using a constant, instead of a fn parameter with the same name (fix #19766) (#19773)
|
| 52 | +- maps: add maps.merge() and maps.merge_in_place() generic utility functions (#19776) |
| 53 | +- coroutines: only attempt to add/remove roots when GC is on. |
| 54 | +- markused: cleanup in mark_used(), use robust index names, instead of the much more brittle integer values (#19543) |
36 | 55 |
|
37 | 56 | #### Standard library
|
| 57 | +- builtin: add an `unsafe { a.reset() }` method, for quickly setting all bytes in an array to 0 |
| 58 | +- math.fractions: use operator overloading and deprecate old functions (#19547) |
| 59 | +- gg: fix the alignment of the bottom border of draw_rounded_rect_empty on macos and linux |
| 60 | +- crypto.bcrypt: fix bcrypt failure for valid pass and hash (fix #19558) (#19569) |
| 61 | +- sokol: update sokol to the latest version |
| 62 | +- builtin: fix sizeof(C.BOOL) (windows specific) (#19589) |
| 63 | +- math.big: fix incorrect division with negative numbers (fix #19585) (#19587) |
| 64 | +- os: add a convenient way to ignore certain system signals (#19632) |
| 65 | +- os: fix os.ls(folder) on windows, when a protected folder can not be opened (#19647) |
| 66 | +- os: add a convenient way to ignore certain system signals (#19639) |
38 | 67 | - crypto.sha: fix calculating the same hash values when .sum() is called several times for sha1/256/512 (fix #19696) (#19697)
|
39 | 68 | - crypto.md5: fix calculating the same hash values, when .sum() is called several times (#19703)
|
40 | 69 | - os: add a new function `execute_opt` (#19723)
|
41 | 70 | - os: add os.page_size() (#19770)
|
42 |
| -- vlib: add an `encoding.xml` module with parser, validation, entity encoding, unit tests (#19708) |
43 | 71 | - os: implement os.fd_is_pending/1, os.Process.pipe_read/1, os.Process.is_pending/1 (#19787)
|
44 | 72 | - builtin: copy min/max integer values consts from `math` to builtin so that the entire math module doesn't have to be imported(#19809)
|
| 73 | +- json2: add support for nested structs (#19579) |
45 | 74 |
|
46 | 75 | #### Web
|
| 76 | +- vweb: add mime type support for static .md files |
| 77 | +- net.conv: add varinttou64 and u64tovarint functions, for the variable unsigned integer encoding, described in rfc9000 (for QUIC) (#19568) |
| 78 | +- net.http: support passing on_running, on_stopped, on_closed callback functions to http.Server{}, as well as show_startup_message: false. (#19591) |
| 79 | +- net: fix handling of spurious wake-up signals, lost when calling select() in mbedtls and openssl (continue on C.EINTR) (#19600) |
| 80 | +- net: use conv.hton* consistently, instead of `$if tinyc { conv.hton16(port) } $else { u16(C.htons(port)) }` |
| 81 | +- net.http: support passing an HTTP proxy server in http.fetch (#19606) |
| 82 | +- net.http: add a retry mechanism to http.fetch(), when the socket inevitably errors (#19660) |
| 83 | +- wasm: implement inline assembly (#19686) |
47 | 84 | - net.http: increase max_redirects to 16 (#19743)
|
48 | 85 | - picoev: implement raw mode (#19771)
|
49 | 86 | - flag,json,net: handle C calls in .v files (part of enabling `-W impure-v` as default) (#19779)
|
50 | 87 | - net.http: add socks5|http(s) proxy support [Linux] (#19676)
|
51 | 88 |
|
52 | 89 | #### ORM
|
| 90 | +- orm: add null handling and option fields (#19379) |
| 91 | +- orm: make is_null/is_not_null unary ops; don't bind null in where (#19635) |
53 | 92 |
|
54 | 93 | #### Database drivers
|
| 94 | +- pg: hande C calls, move to .c.v files (#19739) |
55 | 95 |
|
56 | 96 | #### Native backend
|
| 97 | +- native: support `-no-builtin` (generate executables < 1KB Linux with `v -no-builtin -b native examples/hello_world.v`) |
| 98 | +- native: use i32 instead of int |
57 | 99 |
|
58 | 100 | #### C backend
|
| 101 | +- Fix printing fixed array of options (#19479) |
| 102 | +- Fix struct field of fixed array init (fix #19483) (#19487) |
| 103 | +- Fix struct init with multi option fn type (#19491) |
| 104 | +- Ast, native, cgen: add support for `$if native {}` (#19500) |
| 105 | +- Fix maps with i32 keys |
| 106 | +- Fix for c stmt with option or result calls (#19641) |
59 | 107 | - Fix infix op when handling comptime selector (#19691)
|
60 | 108 | - Fix array contains method with interface(fix #19670) (#19675)
|
61 | 109 | - Reduce expense in repetitively called functions by using consts (#19732)
|
|
64 | 112 | - Fix g.obf_table data missing(fix #19695) (#19778)
|
65 | 113 | - Fix closure variable in smartcast (#19796)
|
66 | 114 |
|
| 115 | +#### vfmt |
| 116 | +- Remove additional line breaks after call_expr before params struct args (#19795) |
| 117 | +- Fix map value aligment when using keys with uft8 symbols (#19689) |
| 118 | +- Align ternary expressions in const blocks (#19721) |
| 119 | +- Respect range index expressions in match branches (#19684) |
| 120 | +- Respect raw strings in `$embed_file(r'/some/path')` expressions (#19753) |
| 121 | +- Fix formatting of struct field with default value and new attr syntax (#19683) |
| 122 | +- Recognize or blocks in call args (#19690) |
| 123 | + |
67 | 124 | #### Tools
|
| 125 | +- all: add support for `@LOCATION`, for more convenient logging/tracing, without needing to combine `@FILE`, `@LINE` at runtime (#19488) |
| 126 | +- benchmark: add new methods b.record_measure/1 and b.all_recorded_measures/0 (#19561) |
| 127 | +- ci: update c2v workflow, translate doom on macOS (#19562) |
| 128 | +- strings: add Bulder.write_decimal/1 method (write a decimal number, without additional allocations) (#19625) |
68 | 129 | - testing: add temporary file hash to prevent accidental collisions with test file binaries (#19710)
|
69 | 130 | - ci: compile VTL and VSL in their own CI job, with `VFLAGS=-no-parallel`
|
70 | 131 | - tools: fix windows install of an already existing module with vpm (#19761)
|
|
77 | 138 | - tools: add parse_query to vpm (#19814)
|
78 | 139 | - ci: add macos arm64 binary release (#19823)
|
79 | 140 | - Require the presence of a `v.mod` file, to install external urls via vpm (#19825)
|
| 141 | +- vcreate: fix `v init` with project names containing dashes (#19619) |
80 | 142 |
|
81 | 143 | #### Operating System support
|
82 | 144 |
|
|
0 commit comments