mirror of
https://github.com/vlang/v.git
synced 2025-09-10 16:00:31 -04:00
changelog: finish the 0.4.3 changelog
This commit is contained in:
parent
1b2be2a5fb
commit
a9190e3434
82
CHANGELOG.md
82
CHANGELOG.md
@ -1,61 +1,109 @@
|
|||||||
## V 0.4.3
|
## V 0.4.3
|
||||||
*11 November 2023*
|
*11 November 2023*
|
||||||
*not complete yet*
|
|
||||||
|
|
||||||
#### Improvements in the language
|
#### Improvements in the language
|
||||||
- Align ternary expressions in const blocks (#19721)
|
- A new `encoding.xml` module with parser, validation, entity encoding, unit tests (#19708)
|
||||||
- Respect raw strings in `$embed_file(r'/some/path')` expressions (#19753)
|
- Better couroutines support (IO, networking)
|
||||||
- Remove additional line breaks after call_expr before params struct args (#19795)
|
- Allocations in vweb apps reduced by 80%
|
||||||
|
- Implement `@VCURRENTHASH` to replace `C.V_CURRENT_COMMIT_HASH` (#19514)
|
||||||
|
- int => i64 on 64 bit, i32 on 32 bit (start of the transition)
|
||||||
|
- Fix new int type promotion rules and cleanup native gen() (#19535)
|
||||||
|
|
||||||
#### Breaking changes
|
#### Breaking changes
|
||||||
|
- `Request.cookies` map has been deprecated. Replaced with `Request.cookie()` and `Request.add_cookie()`.
|
||||||
|
- Stricter rules for C types (they always have to be declared now)
|
||||||
|
|
||||||
#### Checker improvements/fixes
|
#### Checker improvements/fixes
|
||||||
|
- Turn the option/result split warning into an error
|
||||||
|
- Turn propagation warning into an error (finishes the option/result split)
|
||||||
|
- Fix fn call with option call argument in autofree mode (#19515)
|
||||||
|
- Bring back pascal case check for aliases
|
||||||
|
- C.xx = C.yy aliases
|
||||||
|
- Allow casted integeral types in match ranges (#19572)
|
||||||
|
- Warn about byte deprecation, when used as a fn parameter (#19629)
|
||||||
|
- Allow size of fixed array to be integral casts (#19663)
|
||||||
|
- Fix generic array append (#19658)
|
||||||
- Check error of implementing other module private interface (fix #19620) (#19688)
|
- Check error of implementing other module private interface (fix #19620) (#19688)
|
||||||
- Extend byte deprecation warning to array init types (#19671)
|
- Extend byte deprecation warning to array init types (#19671)
|
||||||
- Extend byte deprecation warnings to return types (#19668)
|
- Extend byte deprecation warnings to return types (#19668)
|
||||||
- Fix negative cap, len checks in array init (#19694)
|
- Fix negative cap, len checks in array init (#19694)
|
||||||
- Turn warning for var and param module name duplicates into error (#19645)
|
- Turn warning for var and param module name duplicates into error (#19645)
|
||||||
- Fix closure in if guard (#19750)
|
- Fix closure in if guard, including with multi_return (#19765)
|
||||||
- Fix closure in if guard, with multi_return (#19765)
|
|
||||||
- Fix comptime enumdata value property access (#19768)
|
- Fix comptime enumdata value property access (#19768)
|
||||||
- Fix `field ?&Type` without default value (#19786)
|
- Fix `field ?&Type` without default value (#19786)
|
||||||
- Avoid nil assign to option var (#19746)
|
- Avoid nil assign to option var (#19746)
|
||||||
- Allow for a shared variable to be whole reassigned (keeping the same mutex state) (fix #15649) (#19751)
|
- Allow for a shared variable to be whole reassigned (keeping the same mutex state) (fix #15649) (#19751)
|
||||||
|
|
||||||
#### Parser improvements
|
#### Parser improvements
|
||||||
- parser: add `set_all` + `clear_all` methods to `[flag]` enum bitfields (#19717)
|
- Fix assigning static method to anon fn (#19499)
|
||||||
|
- ast: fix formatting a struct declaration with a nested struct (#19592)
|
||||||
|
- Add `set_all` + `clear_all` methods to `[flag]` enum bitfields (#19717)
|
||||||
- ast: reduce cost of frequently called functions by using constants (#19733)
|
- ast: reduce cost of frequently called functions by using constants (#19733)
|
||||||
- parser: warn on unused imports, even when they are declared via `import math { sin, cos }` (#19738)
|
- Warn on unused imports, even when they are declared via `import math { sin, cos }` (#19738)
|
||||||
- ast: add missing docstrings for the public fns in vlib/v/ast/types.v (#19752)
|
- ast: add missing docstrings for the public fns in vlib/v/ast/types.v (#19752)
|
||||||
- parser: give a friendly error when misusing if over $if (#19810)
|
- Give a friendly error when misusing if over $if (#19810)
|
||||||
- Add multiple struct attributes error for new attribute syntax
|
- Add multiple struct attributes error for new attribute syntax
|
||||||
|
|
||||||
#### Compiler internals
|
#### Compiler internals
|
||||||
|
- checker, builder, pref: support `-dump-defines -` to help explore all the available user and system defines for a given program (#19576)
|
||||||
|
- pref,builder: add support for `-macosx-version-min 10.2` and `-macosx-version-min 0` (with default of 10.7) (#19626)
|
||||||
- pref: fix unintended file extensions in default output names, allow for `v run file.c.v` (#19745)
|
- pref: fix unintended file extensions in default output names, allow for `v run file.c.v` (#19745)
|
||||||
- transformer: fix using a constant, instead of a fn parameter with the same name (fix #19766) (#19773)
|
- transformer: fix using a constant, instead of a fn parameter with the same name (fix #19766) (#19773)
|
||||||
|
- maps: add maps.merge() and maps.merge_in_place() generic utility functions (#19776)
|
||||||
|
- coroutines: only attempt to add/remove roots when GC is on.
|
||||||
|
- markused: cleanup in mark_used(), use robust index names, instead of the much more brittle integer values (#19543)
|
||||||
|
|
||||||
#### Standard library
|
#### Standard library
|
||||||
|
- builtin: add an `unsafe { a.reset() }` method, for quickly setting all bytes in an array to 0
|
||||||
|
- math.fractions: use operator overloading and deprecate old functions (#19547)
|
||||||
|
- gg: fix the alignment of the bottom border of draw_rounded_rect_empty on macos and linux
|
||||||
|
- crypto.bcrypt: fix bcrypt failure for valid pass and hash (fix #19558) (#19569)
|
||||||
|
- sokol: update sokol to the latest version
|
||||||
|
- builtin: fix sizeof(C.BOOL) (windows specific) (#19589)
|
||||||
|
- math.big: fix incorrect division with negative numbers (fix #19585) (#19587)
|
||||||
|
- os: add a convenient way to ignore certain system signals (#19632)
|
||||||
|
- os: fix os.ls(folder) on windows, when a protected folder can not be opened (#19647)
|
||||||
|
- os: add a convenient way to ignore certain system signals (#19639)
|
||||||
- crypto.sha: fix calculating the same hash values when .sum() is called several times for sha1/256/512 (fix #19696) (#19697)
|
- crypto.sha: fix calculating the same hash values when .sum() is called several times for sha1/256/512 (fix #19696) (#19697)
|
||||||
- crypto.md5: fix calculating the same hash values, when .sum() is called several times (#19703)
|
- crypto.md5: fix calculating the same hash values, when .sum() is called several times (#19703)
|
||||||
- os: add a new function `execute_opt` (#19723)
|
- os: add a new function `execute_opt` (#19723)
|
||||||
- os: add os.page_size() (#19770)
|
- os: add os.page_size() (#19770)
|
||||||
- vlib: add an `encoding.xml` module with parser, validation, entity encoding, unit tests (#19708)
|
|
||||||
- os: implement os.fd_is_pending/1, os.Process.pipe_read/1, os.Process.is_pending/1 (#19787)
|
- os: implement os.fd_is_pending/1, os.Process.pipe_read/1, os.Process.is_pending/1 (#19787)
|
||||||
- builtin: copy min/max integer values consts from `math` to builtin so that the entire math module doesn't have to be imported(#19809)
|
- builtin: copy min/max integer values consts from `math` to builtin so that the entire math module doesn't have to be imported(#19809)
|
||||||
|
- json2: add support for nested structs (#19579)
|
||||||
|
|
||||||
#### Web
|
#### Web
|
||||||
|
- vweb: add mime type support for static .md files
|
||||||
|
- net.conv: add varinttou64 and u64tovarint functions, for the variable unsigned integer encoding, described in rfc9000 (for QUIC) (#19568)
|
||||||
|
- net.http: support passing on_running, on_stopped, on_closed callback functions to http.Server{}, as well as show_startup_message: false. (#19591)
|
||||||
|
- net: fix handling of spurious wake-up signals, lost when calling select() in mbedtls and openssl (continue on C.EINTR) (#19600)
|
||||||
|
- net: use conv.hton* consistently, instead of `$if tinyc { conv.hton16(port) } $else { u16(C.htons(port)) }`
|
||||||
|
- net.http: support passing an HTTP proxy server in http.fetch (#19606)
|
||||||
|
- net.http: add a retry mechanism to http.fetch(), when the socket inevitably errors (#19660)
|
||||||
|
- wasm: implement inline assembly (#19686)
|
||||||
- net.http: increase max_redirects to 16 (#19743)
|
- net.http: increase max_redirects to 16 (#19743)
|
||||||
- picoev: implement raw mode (#19771)
|
- picoev: implement raw mode (#19771)
|
||||||
- flag,json,net: handle C calls in .v files (part of enabling `-W impure-v` as default) (#19779)
|
- flag,json,net: handle C calls in .v files (part of enabling `-W impure-v` as default) (#19779)
|
||||||
- net.http: add socks5|http(s) proxy support [Linux] (#19676)
|
- net.http: add socks5|http(s) proxy support [Linux] (#19676)
|
||||||
|
|
||||||
#### ORM
|
#### ORM
|
||||||
|
- orm: add null handling and option fields (#19379)
|
||||||
|
- orm: make is_null/is_not_null unary ops; don't bind null in where (#19635)
|
||||||
|
|
||||||
#### Database drivers
|
#### Database drivers
|
||||||
|
- pg: hande C calls, move to .c.v files (#19739)
|
||||||
|
|
||||||
#### Native backend
|
#### Native backend
|
||||||
|
- native: support `-no-builtin` (generate executables < 1KB Linux with `v -no-builtin -b native examples/hello_world.v`)
|
||||||
|
- native: use i32 instead of int
|
||||||
|
|
||||||
#### C backend
|
#### C backend
|
||||||
|
- Fix printing fixed array of options (#19479)
|
||||||
|
- Fix struct field of fixed array init (fix #19483) (#19487)
|
||||||
|
- Fix struct init with multi option fn type (#19491)
|
||||||
|
- Ast, native, cgen: add support for `$if native {}` (#19500)
|
||||||
|
- Fix maps with i32 keys
|
||||||
|
- Fix for c stmt with option or result calls (#19641)
|
||||||
- Fix infix op when handling comptime selector (#19691)
|
- Fix infix op when handling comptime selector (#19691)
|
||||||
- Fix array contains method with interface(fix #19670) (#19675)
|
- Fix array contains method with interface(fix #19670) (#19675)
|
||||||
- Reduce expense in repetitively called functions by using consts (#19732)
|
- Reduce expense in repetitively called functions by using consts (#19732)
|
||||||
@ -64,7 +112,20 @@
|
|||||||
- Fix g.obf_table data missing(fix #19695) (#19778)
|
- Fix g.obf_table data missing(fix #19695) (#19778)
|
||||||
- Fix closure variable in smartcast (#19796)
|
- Fix closure variable in smartcast (#19796)
|
||||||
|
|
||||||
|
#### vfmt
|
||||||
|
- Remove additional line breaks after call_expr before params struct args (#19795)
|
||||||
|
- Fix map value aligment when using keys with uft8 symbols (#19689)
|
||||||
|
- Align ternary expressions in const blocks (#19721)
|
||||||
|
- Respect range index expressions in match branches (#19684)
|
||||||
|
- Respect raw strings in `$embed_file(r'/some/path')` expressions (#19753)
|
||||||
|
- Fix formatting of struct field with default value and new attr syntax (#19683)
|
||||||
|
- Recognize or blocks in call args (#19690)
|
||||||
|
|
||||||
#### Tools
|
#### Tools
|
||||||
|
- all: add support for `@LOCATION`, for more convenient logging/tracing, without needing to combine `@FILE`, `@LINE` at runtime (#19488)
|
||||||
|
- benchmark: add new methods b.record_measure/1 and b.all_recorded_measures/0 (#19561)
|
||||||
|
- ci: update c2v workflow, translate doom on macOS (#19562)
|
||||||
|
- strings: add Bulder.write_decimal/1 method (write a decimal number, without additional allocations) (#19625)
|
||||||
- testing: add temporary file hash to prevent accidental collisions with test file binaries (#19710)
|
- testing: add temporary file hash to prevent accidental collisions with test file binaries (#19710)
|
||||||
- ci: compile VTL and VSL in their own CI job, with `VFLAGS=-no-parallel`
|
- ci: compile VTL and VSL in their own CI job, with `VFLAGS=-no-parallel`
|
||||||
- tools: fix windows install of an already existing module with vpm (#19761)
|
- tools: fix windows install of an already existing module with vpm (#19761)
|
||||||
@ -77,6 +138,7 @@
|
|||||||
- tools: add parse_query to vpm (#19814)
|
- tools: add parse_query to vpm (#19814)
|
||||||
- ci: add macos arm64 binary release (#19823)
|
- ci: add macos arm64 binary release (#19823)
|
||||||
- Require the presence of a `v.mod` file, to install external urls via vpm (#19825)
|
- Require the presence of a `v.mod` file, to install external urls via vpm (#19825)
|
||||||
|
- vcreate: fix `v init` with project names containing dashes (#19619)
|
||||||
|
|
||||||
#### Operating System support
|
#### Operating System support
|
||||||
|
|
||||||
|
@ -19,6 +19,7 @@ enum Category {
|
|||||||
tools
|
tools
|
||||||
compiler_internals
|
compiler_internals
|
||||||
examples
|
examples
|
||||||
|
vfmt
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -33,6 +34,7 @@ enum Category {
|
|||||||
#### Database drivers
|
#### Database drivers
|
||||||
#### Native backend
|
#### Native backend
|
||||||
#### C backend
|
#### C backend
|
||||||
|
#### vfmt
|
||||||
#### Tools
|
#### Tools
|
||||||
#### Operating System support
|
#### Operating System support
|
||||||
#### Examples
|
#### Examples
|
||||||
@ -117,6 +119,8 @@ fn (mut app App) process_line(text string) ! {
|
|||||||
category = .improvements
|
category = .improvements
|
||||||
} else if is_native(text) {
|
} else if is_native(text) {
|
||||||
category = .native
|
category = .native
|
||||||
|
} else if is_vfmt(text) {
|
||||||
|
category = .vfmt
|
||||||
} else if is_examples(text) {
|
} else if is_examples(text) {
|
||||||
// TODO maybe always skip these as well?
|
// TODO maybe always skip these as well?
|
||||||
category = .examples
|
category = .examples
|
||||||
@ -214,6 +218,7 @@ const category_map = {
|
|||||||
.tools: '#### Tools'
|
.tools: '#### Tools'
|
||||||
.compiler_internals: '#### Compiler internals'
|
.compiler_internals: '#### Compiler internals'
|
||||||
.examples: '#### Examples'
|
.examples: '#### Examples'
|
||||||
|
.vfmt: '#### vfmt'
|
||||||
}
|
}
|
||||||
|
|
||||||
fn (l Line) write_at_category(txt string) ?string {
|
fn (l Line) write_at_category(txt string) ?string {
|
||||||
@ -265,11 +270,10 @@ const db_strings = [
|
|||||||
'db.sqlite',
|
'db.sqlite',
|
||||||
'db.mysql',
|
'db.mysql',
|
||||||
'db.pg',
|
'db.pg',
|
||||||
|
'pg:',
|
||||||
]
|
]
|
||||||
|
|
||||||
const improvements_strings = [
|
const improvements_strings = [
|
||||||
'vfmt:',
|
|
||||||
'fmt:',
|
|
||||||
'all:',
|
'all:',
|
||||||
'v:',
|
'v:',
|
||||||
]
|
]
|
||||||
@ -282,6 +286,7 @@ const parser_strings = [
|
|||||||
const stdlib_strings = [
|
const stdlib_strings = [
|
||||||
'gg:',
|
'gg:',
|
||||||
'json:',
|
'json:',
|
||||||
|
'json2:',
|
||||||
'time:',
|
'time:',
|
||||||
'sync:',
|
'sync:',
|
||||||
'datatypes:',
|
'datatypes:',
|
||||||
@ -390,6 +395,15 @@ fn is_native(text string) bool {
|
|||||||
return is_xxx(text, native_strings)
|
return is_xxx(text, native_strings)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const vfmt_strings = [
|
||||||
|
'vfmt:',
|
||||||
|
'fmt:',
|
||||||
|
]
|
||||||
|
|
||||||
|
fn is_vfmt(text string) bool {
|
||||||
|
return is_xxx(text, vfmt_strings)
|
||||||
|
}
|
||||||
|
|
||||||
fn is_xxx(text string, words []string) bool {
|
fn is_xxx(text string, words []string) bool {
|
||||||
for s in words {
|
for s in words {
|
||||||
if text.contains(s) {
|
if text.contains(s) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user