1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

ci: fix ./v check-md -hide-warnings changelogs0.x/0.4.md

This commit is contained in:
Delyan Angelov 2023-07-02 06:40:02 +03:00
parent 049d6853b7
commit 7ce96b2c41
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED

View File

@ -7,24 +7,30 @@
for now. for now.
- `spawn` now spawns system threads, `go` spawns coroutines. - `spawn` now spawns system threads, `go` spawns coroutines.
- Static type methods: `Foo.new()` to replace factory functions like `new_foo()`. - Static type methods: `Foo.new()` to replace factory functions like `new_foo()`.
- Smartcasting with complex conditions:`if sum_type is Foo && !sum_type.is_info && get_name(sum_type.info.name) == 'foo' `. - Smartcasting with complex conditions:
`if sum_type is Foo && !sum_type.is_info && get_name(sum_type.info.name) == 'foo' `.
- Functions can now return fixed size arrays. - Functions can now return fixed size arrays.
- Enum values now can have attributes. - Enum values now can have attributes.
- Generic functions as function parameters are now supported: `fn f[T](x T, i int, f_ Fn[T]) T { `. - Generic functions as function parameters are now supported: `fn f[T](x T, i int, f_ Fn[T]) T { `.
- Anonymous structs can no longer have attributes. - Anonymous structs can no longer have attributes.
- A new `[spawn_stack: 131072]` function attribute for controlling the max size of the stack of the spawned threads. - A new `[spawn_stack: 131072]` function attribute for controlling the max size of the stack
of the spawned threads.
- Channel pop now works with an `or` block: `ch := <-self.item or { return none }` - Channel pop now works with an `or` block: `ch := <-self.item or { return none }`
- `it` has been renamed to `index` in array inits. - `it` has been renamed to `index` in array inits.
- String interpolation simplified to just '${name}', enforced by vfmt, and updated in the entire code base. - String interpolation simplified to just '${name}', enforced by vfmt,
and updated in the entire code base.
- `go foo()` has been replaced with `spawn foo()` (launches an OS thread, `go` will be used for - `go foo()` has been replaced with `spawn foo()` (launches an OS thread, `go` will be used for
upcoming coroutines instead). upcoming coroutines instead).
- vfmt now supports `// vfmt off` and `// vfmt on` for turning off the formatting locally for short snippets of code. - vfmt now supports `// vfmt off` and `// vfmt on` for turning off the formatting locally
for short snippets of code.
Useful for keeping your carefully arranged matrices intact. Useful for keeping your carefully arranged matrices intact.
- Match branch range expressions with consts: `match x { const1...const2 {} }` - Match branch range expressions with consts: `match x { const1...const2 {} }`
- Hot code reloading via `[live]` is now supported in imported modules, not just the main module. - Hot code reloading via `[live]` is now supported in imported modules, not just the main module.
- Syntax sugar for map inits without needing explicit casts for interfaces: `all.children := { "abc": rect, "def": ui.rectangle()}`. - Syntax sugar for map inits without needing explicit casts for interfaces:
`all.children := { "abc": rect, "def": ui.rectangle()}`.
- `$embed_file()` fixes, including variable args support. - `$embed_file()` fixes, including variable args support.
- `none` fixes: no longer allowed to be used as a separate type, `dump()` support, not allowed inside `unsafe`. - `none` fixes: no longer allowed to be used as a separate type, `dump()` support,
not allowed inside `unsafe`.
- Const functions: `const y = term.yellow`, then `println(y('abc'))`. - Const functions: `const y = term.yellow`, then `println(y('abc'))`.
- Builtin type names can no longer be used as identifiers. - Builtin type names can no longer be used as identifiers.
- Generic `typeof[T]()`, `sizeof[T]()`, `isreftype[T]()` functions. - Generic `typeof[T]()`, `sizeof[T]()`, `isreftype[T]()` functions.
@ -48,7 +54,8 @@
- Lots of bug fixes: 90% of all bugs ever submitted are closed. - Lots of bug fixes: 90% of all bugs ever submitted are closed.
- New keyword/type: `nil`. Only to be used inside `unsafe`. Replaces `voidptr(0)`. - New keyword/type: `nil`. Only to be used inside `unsafe`. Replaces `voidptr(0)`.
- V can now find code in the `src/` directory. This allows making V repos much cleaner. - V can now find code in the `src/` directory. This allows making V repos much cleaner.
- Support `assert condition, extra_message`, where the `extra_message` will be evaluated and shown if the assertion fails. - Support `assert condition, extra_message`, where the `extra_message` will be evaluated
and shown if the assertion fails.
- Operator overloading now works with aliases and generics. - Operator overloading now works with aliases and generics.
- Scanner optimizations. - Scanner optimizations.
- Using C's #define is no longer allowed in normal V code, only in `.c.v` files. - Using C's #define is no longer allowed in normal V code, only in `.c.v` files.
@ -61,7 +68,8 @@
module names). module names).
- `[]` is now used for generics instead of `<>`. - `[]` is now used for generics instead of `<>`.
- Accessing a pointer map value requires an `or {}` block outside `unsafe`. - Accessing a pointer map value requires an `or {}` block outside `unsafe`.
- Anonymous sumtypes have been removed (deprecated for now) due to complicating the language and the compiler too much. - Anonymous sumtypes have been removed (deprecated for now) due to complicating the language
and the compiler too much.
#### Checker improvements/fixes #### Checker improvements/fixes
@ -181,13 +189,16 @@
- `math.vec` module for generic vector math including 2D, 3D, and 4D vector operations. - `math.vec` module for generic vector math including 2D, 3D, and 4D vector operations.
- Builtin stb_image.h used by gg has been updated to the latest v2.28. - Builtin stb_image.h used by gg has been updated to the latest v2.28.
- All of vlib has been updated to use separate Option/Result types. - All of vlib has been updated to use separate Option/Result types.
- To avoid confusion, all references in the code and documentation to `Optional` have been replaced with `Option`. - To avoid confusion, all references in the code and documentation to `Optional` have been
replaced with `Option`.
- `gg.Context` pipeline has more effects, including the `additive` effect. - `gg.Context` pipeline has more effects, including the `additive` effect.
- Much cleaner eof checks in `os`: refactor `err == IError(os.Eof{})` to `err is os.Eof`. - Much cleaner eof checks in `os`: refactor `err == IError(os.Eof{})` to `err is os.Eof`.
- Lots of work on `x.json2`, the pure V json encoder, soon to become official. - Lots of work on `x.json2`, the pure V json encoder, soon to become official.
- New `v.reflection` module for runtime reflection. - New `v.reflection` module for runtime reflection.
- Improved `os.mv()`, which now works consistently even across different windows drives/mount points. - Improved `os.mv()`, which now works consistently even across different
- `string.trim_indent()`, useful with multi line strings, that start/end with new lines and indentation. windows drives/mount points.
- `string.trim_indent()`, useful with multi line strings, that start/end with new lines
and indentation.
- Reduced memory consumption in the `crypto` modules. - Reduced memory consumption in the `crypto` modules.
- Official V UI library is now licensed under MIT. - Official V UI library is now licensed under MIT.
- Deprecated `math.util` and `math.mathutil` have been removed. - Deprecated `math.util` and `math.mathutil` have been removed.
@ -196,21 +207,24 @@
- All public functions in the `hash` and `encoding.base32` modules have been documented. - All public functions in the `hash` and `encoding.base32` modules have been documented.
- New `crypto.pem` module. - New `crypto.pem` module.
- New `map.reserve()` method. - New `map.reserve()` method.
- `net.ssl` has been migrated from a dynamically linked OpenSSL to a statically linked Mbed TLS. This means that V binaries will no - `net.ssl` has been migrated from a dynamically linked OpenSSL to a statically linked Mbed TLS.
longer have an OpenSSL dependency. OpenSSL can still be enabled via `-d use_openssl`. This means that V binaries will no longer have an OpenSSL dependency.
OpenSSL can still be enabled via `-d use_openssl`.
- msgpack module for decoding/encoding msgpack. (`v install msgpack`) - msgpack module for decoding/encoding msgpack. (`v install msgpack`)
- Most of vlib has been updated to use the new Option/Result types. - Most of vlib has been updated to use the new Option/Result types.
- net, net.http, vweb bugs and fixes. - net, net.http, vweb bugs and fixes.
- QuadTree and RingBuffer types in `datatypes`. - QuadTree and RingBuffer types in `datatypes`.
- Forward iterator for `datatypes.LinkedList<T>`, forward and backward iterators for `datatypes.DoublyLinkedList<T>`. - Forward iterator for `datatypes.LinkedList<T>`, forward and backward iterators
- A new `maps` module, similar to existing `arrays`. It has generic `filter`, `flatten`, `invert`, `to_map`, `to_array`, `from_array` for `datatypes.DoublyLinkedList<T>`.
functions. - A new `maps` module, similar to existing `arrays`. It has generic `filter`, `flatten`,
`invert`, `to_map`, `to_array`, `from_array` functions.
- `utf8.is_number()`, `utf8.is_space()` functions. - `utf8.is_number()`, `utf8.is_space()` functions.
- New `encoding.base32` module. - New `encoding.base32` module.
- `gg.TouchPoint` to differentiate between different types of touch input. - `gg.TouchPoint` to differentiate between different types of touch input.
- `str.int()` conversion speedup (without -prod). - `str.int()` conversion speedup (without -prod).
- `os.mkdir()` now has an optional `mode` parameter. - `os.mkdir()` now has an optional `mode` parameter.
- `encoding.csv` is now generic, supports bools, accepts a custom delimiter, and is compatible with io.Reader/io.Writer. - `encoding.csv` is now generic, supports bools, accepts a custom delimiter,
and is compatible with io.Reader/io.Writer.
- `datatypes` module now uses operator overloading. - `datatypes` module now uses operator overloading.
- All `datatypes` types can be converted to V arrays. - All `datatypes` types can be converted to V arrays.
- `smtp` improvements including multiple recipients and base64/utf8 support. - `smtp` improvements including multiple recipients and base64/utf8 support.
@ -273,8 +287,10 @@
``` ```
- A new `-d trace_orm` option to see all SQL queries generated and used by V ORM and - A new `-d trace_orm` option to see all SQL queries generated and used by V ORM and
`-d trace_pg_error` to trace PG errors. `-d trace_pg_error` to trace PG errors.
- Various ORM fixes and improvements, including string interpolation support, type checks, fn calls in `where`. - Various ORM fixes and improvements, including string interpolation support, type checks,
- Support parenthesized expressions like `select from User where (name == 'Sam' && is_customer == true) || id == 1`. fn calls in `where`.
- Support parenthesized expressions like
`select from User where (name == 'Sam' && is_customer == true) || id == 1`.
- ORM functions now return `Result`, so the errors can be handled. - ORM functions now return `Result`, so the errors can be handled.
#### Database drivers #### Database drivers
@ -287,10 +303,13 @@
#### Native backend #### Native backend
- Refactoring, splitting large files into multiple. - Refactoring, splitting large files into multiple.
- Lots of fixes and new features in the native backend, including making codegen logic platform independent. - Lots of fixes and new features in the native backend, including making codegen logic
platform independent.
- Operator support for floats, multi return. - Operator support for floats, multi return.
- Lots of native backend improvements, including library calls, comptime conditionals, enums, method definitions/calls, structs. - Lots of native backend improvements, including library calls, comptime conditionals,
- Major improvements to the fast native backend including linking support on Linux. The goal is to be able to self host V soon. enums, method definitions/calls, structs.
- Major improvements to the fast native backend including linking support on Linux.
The goal is to be able to self host V soon.
#### V interpreter #### V interpreter
- Some further interpreter work. - Some further interpreter work.
@ -310,7 +329,8 @@
- `#preinclude` for low level C interop. - `#preinclude` for low level C interop.
#### WASM backend #### WASM backend
- A new pure WASM backend, based on binaryen, a WASM `builtin` module, and a pure V WASM serialization library. - A new pure WASM backend, based on binaryen, a WASM `builtin` module, and a pure V WASM
serialization library.
#### Comptime #### Comptime
- A new `$res` comptime function to get returned value in defer block (#18382). - A new `$res` comptime function to get returned value in defer block (#18382).
@ -328,7 +348,8 @@
``` ```
- Added `$option` as a compile-time reflection type representing an any Option type. - Added `$option` as a compile-time reflection type representing an any Option type.
- All special compile-time reflection types are now lowercase (`$int`, `$enum`, `$option`, etc). - All special compile-time reflection types are now lowercase (`$int`, `$enum`, `$option`, etc).
- Improved compile time checks, like `$if x is Type {`; `$if T in [$Array, $Struct, $Alias, $Function] {`. - Improved compile time checks, like `$if x is Type {`;
`$if T in [$Array, $Struct, $Alias, $Function] {`.
- `$for in` works with alias types. - `$for in` works with alias types.
- New comptime features for fields: `field.is_<field>`, `field.is_alias`, `field.is_enum`. - New comptime features for fields: `field.is_<field>`, `field.is_alias`, `field.is_enum`.
@ -346,22 +367,27 @@
- Added basic QNX support. - Added basic QNX support.
- Installation instructions for using V on NixOS. - Installation instructions for using V on NixOS.
- Better `make` support for OpenBSD. - Better `make` support for OpenBSD.
- Much improved experience for `v install pcre` on Windows (it now bundles its own .c files, so it compiles cleanly, even if the platform does not have another pcre package installed). - Much improved experience for `v install pcre` on Windows
(it now bundles its own .c files, so it compiles cleanly, even if the platform does not have
another pcre package installed).
- V can now be compiled with tcc on latest macOS and Apple Silicon. - V can now be compiled with tcc on latest macOS and Apple Silicon.
- Removed the need for the `[console]` attribute in Windows GUI apps. - Removed the need for the `[console]` attribute in Windows GUI apps.
- More precise WINAPI declarations for easier integration on Windows. - More precise WINAPI declarations for easier integration on Windows.
- More CI tests on FreeBSD. - More CI tests on FreeBSD.
- Full termux support via `$if termux {`, more predictable logging on Android. - Full termux support via `$if termux {`, more predictable logging on Android.
- Older macOS support (<10.12). - Older macOS support (<10.12).
- Windows code has been removed from `v.c` distributed on non-Windows systems. (`v_windows.c` is used on Windows.) - Windows code has been removed from `v.c` distributed on non-Windows systems.
(`v_windows.c` is used on Windows.)
#### Tooling #### Tooling
- A new VPM site: vpm.vlang.io. A better design, discoverability of packages, descriptions, most downloaded packages etc. - A new VPM site: vpm.vlang.io. A better design, discoverability of packages, descriptions,
most downloaded packages etc.
- vpm: installation of mixed modules. - vpm: installation of mixed modules.
- `v ls --install -p D:\path\vls.exe` to install a local vls executable. - `v ls --install -p D:\path\vls.exe` to install a local vls executable.
- vdoc: highlight comments with gray color. - vdoc: highlight comments with gray color.
- vet: allow vetting files with global variables. - vet: allow vetting files with global variables.
- Make util.launch_tool/3 more robust, by recompiling V tools always in a known current working folder. - Make util.launch_tool/3 more robust, by recompiling V tools always in a known current
working folder.
- Lots of documentation/readme improvements. - Lots of documentation/readme improvements.
- Lots of playground improvements: [play.vlang.io](https://play.vlang.io), including a really cool - Lots of playground improvements: [play.vlang.io](https://play.vlang.io), including a really cool
feature: "Show generated C code". feature: "Show generated C code".
@ -381,7 +407,8 @@
code sharing by link, more convenient keyboard control, reusability for potential embedding: code sharing by link, more convenient keyboard control, reusability for potential embedding:
https://play.vlang.io. https://play.vlang.io.
- Improved call tracing via `-trace-calls`. - Improved call tracing via `-trace-calls`.
- Lots of documentation improvements, including a better documentation of the recent Option/Result split. - Lots of documentation improvements, including a better documentation of
the recent Option/Result split.
- V REPL: Home/End keys support. Lots of clean up. - V REPL: Home/End keys support. Lots of clean up.
- DOOM is now translated/compiled and launched on CI servers. A screenshot of the running game - DOOM is now translated/compiled and launched on CI servers. A screenshot of the running game
is made via `vgret` and is compared to the expected result. is made via `vgret` and is compared to the expected result.