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

changelog: clean up

This commit is contained in:
Alexander Medvednikov 2023-07-01 14:00:16 +03:00
parent e407579e99
commit a0ec8165ff
2 changed files with 72 additions and 74 deletions

View File

@ -8,7 +8,7 @@ You can read it here:
## V 0.3.5
*29 June 2023*
### Improvements in the language
#### Improvements in the language
- **Coroutines with a scheduler**. Only Linux/macOS for now, requires `-use-coroutines` and
`coroutines.sleep()` instead of `time.sleep()`. They work with IO and net, but not with GC
for now.
@ -19,12 +19,11 @@ You can read it here:
- 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 { `.
- Anonymous structs can no longer have attributes.
- Allow fixed array returns.
### Breaking changes
#### Breaking changes
- `byte` deprecated in favor of `u8` (`byte` is automatically converted to `u8` by vfmt).
### Checker improvements/fixes
#### Checker improvements/fixes
- Disallow `Result` type aliases (`type Foo = !Bar`) and `Result` in maps (`map[key]!Type`).
- Add a missing check for taking address of literal value member.
- Fixed map initialization for maps with option values.
@ -53,7 +52,7 @@ You can read it here:
- Fix contains() with array of interfaces.
- Disallow mut for blank idents.
### Standard library
#### Standard library
- json: Enum value string serialization supports `[json:'alias']` to change its string values.
- Struct fields can now be skipped during JSON/ORM serialization via `[json:'-']` and `[sql:'-']`,
in addition to `[skip]`. This allows having custom behavior for different serialization methods.
@ -73,7 +72,7 @@ You can read it here:
- rand: add missing rand.u16(), update doc comments, add test.
- builtin: speed up string methods with vmemcpy instead of `for` loop for copying data.
### Web
#### Web
- The builtin websocket library is now thread safe.
- Enhanced builtin csrf protection in vweb.
- vweb: ability to set and get values on vweb.Context.
@ -88,7 +87,7 @@ You can read it here:
- net.html: fix parsing of nested quoted strings in code tags.
- picoev: FreeBSD support.
### ORM
#### ORM
- Fixed a foreign key bug that could result in an extra insert.
- Comptime bug with `[skip]` and `[sql:'-']` fixed.
- Checker error for unsupported field types.
@ -96,29 +95,29 @@ You can read it here:
- Improved docs and examples.
- Uninitialized structs are no longer inserted into related tables.
### Database drivers
#### Database drivers
- mysql: TIMESTAMP support.
- mysql: allocate memory for each string and blob dynamically depending on its value length.
- mysql: add the ability to commit transactions.
### Native backend
#### Native backend
- Refactoring, splitting large files into multiple.
### C backend
#### C backend
- Fix code generation for generic unions.
- Fix `[N]chan` (fixed arrays of channels).
- Fix nested fixed array instantiation.
- Fix fixed array of map.
- Fix stringification of usize struct fields (before, they were treated as 32 bit *signed* numbers).
### Comptime
#### Comptime
- A new `$res` comptime function to get returned value in defer block (#18382).
- Fix comptimeselector option propagation.
- A mutability check for comptime assignments.
- Fix comptime assigning to sumtype or indexexpr.
- Make comptime calls work with or-block.
### Tools
#### Tools
- A new VPM site: vpm.vlang.io. A better design, discoverability of packages, descriptions, most downloaded packages etc.
- vpm: installation of mixed modules.
- `v ls --install -p D:\path\vls.exe` to install a local vls executable.
@ -132,7 +131,7 @@ You can read it here:
*30 Apr 2023*
### Breaking Changes
#### Breaking Changes
The following changes may break compilation of existing code or change behavior at runtime:
@ -145,7 +144,7 @@ The following changes may break compilation of existing code or change behavior
- Variable shadowing has been completely banned (previously variable names could conflict with
module names).
### Web
#### Web
- vweb now supports live page reloading.
The web app is instantly updated in the browser (no need to refresh the page)
@ -159,14 +158,14 @@ The following changes may break compilation of existing code or change behavior
- vweb now uses database pool.
- Fixed multipart form parsing in vweb.
### Backends
#### Backends
- A new pure WASM backend, based on binaryen, a WASM `builtin` module, and a pure V WASM serialization library.
- Lots of fixes and new features in the native backend, including making codegen logic platform independent.
- Now code generated by the С backend, can be compiled by a C++20 compiler.
- C backend does not generate unused interface functions now.
### Compiler CLI
#### Compiler CLI
- `v share file.v` for sharing code via the playground.
- `v up` speed up for when it hasn't been run for a long time (**vc/** bootstrapping has been
@ -177,7 +176,7 @@ The following changes may break compilation of existing code or change behavior
works just like in Perl).
- A new `-ldflags` option, in addition to `-cflags`. Works just like LDFLAGS in C.
### ORM
#### ORM
- All ORM queries now return `![]` (`Result` of an array).
This allows handling/propagating DB errors and simplifies working with ORM (one way).
@ -192,7 +191,7 @@ The following changes may break compilation of existing code or change behavior
- 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.
### Standard Library
#### Standard Library
- Added new `termios` module.
- `net.ssl`: types using ssl contexts can now be converted to strings via `.str()`/printed
@ -219,7 +218,7 @@ The following changes may break compilation of existing code or change behavior
- `os.Process` now has a `set_work_folder()` method to set the initial working folder of the new
child process.
### Option as a first class type
#### Option as a first class type
Final steps in making the Option type a first class type:
@ -232,7 +231,7 @@ Final steps in making the Option type a first class type:
- Allow `foo := Foo{}`, when `Foo` has an Option field, that is a struct, that has a `[required]`
tag on its fields.
### Compile-time Reflection
#### Compile-time Reflection
- Compile-time interface fields evaluation.
- Compile-time enum evaluation:
@ -245,7 +244,7 @@ Final steps in making the Option type a first class 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).
### Checker Improvements/Fixes
#### Checker Improvements/Fixes
- Enums can no longer be initialized like structs.
- Capture variables can no longer shadow anonymous function params.
@ -275,11 +274,11 @@ Final steps in making the Option type a first class type:
println(*a)
```
### OSes
#### OSes
- Added basic QNX support.
### Other changes
#### Other changes
- Lots of documentation/readme improvements.
- Lots of playground improvements: [play.vlang.io](https://play.vlang.io), including a really cool
@ -290,13 +289,13 @@ Final steps in making the Option type a first class type:
- `it` has been renamed to `index` in array inits.
- "Is V still fast?" web-page has been sped up by splitting the result table into multiple years.
### Development
#### Development
- GitHub Copilot summaries in PRs.
## V 0.3.3
*30 Jan 2023*
### Improvements in the language
#### Improvements in the language
- 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
upcoming coroutines instead).
@ -318,15 +317,15 @@ Final steps in making the Option type a first class type:
- Optimized one byte `[]u8` arrays creation.
- Recursive aliasing is no longer allowed (e.g. `type Alias = map[string]Alias`).
### Breaking changes
#### Breaking changes
- `[]` is now used for generics instead of `<>`.
- Accessing a pointer map value requires an `or {}` block outside `unsafe`.
### Checker improvements/fixes
#### Checker improvements/fixes
- Lots of fixes in the type checker.
- Int signedness mismatch is now checked: `cannot use literal signed integer as u8`.
### Standard library
#### Standard library
- `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.
- All of vlib has been updated to use separate Option/Result types.
@ -346,32 +345,32 @@ Final steps in making the Option type a first class type:
- New `crypto.pem` module.
- New `map.reserve()` method.
### Web
#### Web
- Improved vweb stability under load.
### ORM
#### ORM
- Various ORM fixes and improvements, including string interpolation support, type checks, fn calls in `where`.
### Database drivers
#### Database drivers
- VFS support in the builtin `sqlite` module; `sqlite.get_affected_rows_count()`.
- Improved `pg` compatibility with older PostgreSQL versions before 2014.
- `sqlite`, `pg`, `mysql` have been moved to `db.sqlite`, `db.pg`, `db.mysql`.
### Native backend
#### Native backend
- Operator support for floats, multi return.
### Comptime
#### Comptime
- Improved compile time checks, like `$if x is Type {`; `$if T in [$Array, $Struct, $Alias, $Function] {`.
- `$for in` works with alias types.
- New comptime features for fields: `field.is_<field>`, `field.is_alias`, `field.is_enum`.
### OS support
#### OS support
- Installation instructions for using V on NixOS.
- 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).
- V can now be compiled with tcc on latest macOS and Apple Silicon.
### Tools
#### Tools
- fast.vlang.io fixes & improvements, new server.
- New official IntelliJ plugin: https://intellij-v.github.io.
- Lots of new language documentation, a nicer table of contents.
@ -387,7 +386,7 @@ Final steps in making the Option type a first class type:
## V 0.3.2
*31 Oct 2022*
### Improvements in the language
#### Improvements in the language
- New simplified string interpolation: `println("Hello, {name}!")`. It will be the only way, old syntax (`${name}` and `$name`)
will be deprecated.
- Easier custom error creation: `return MyCustomErr{}` instead of `return IError(MyCustomErr)`.
@ -400,15 +399,15 @@ Final steps in making the Option type a first class type:
- Parallel compilation now uses `sync.Pool`.
- `-skip-unused` fixes, soon to be made the default.
### Breaking changes
#### Breaking changes
*No breaking changes*
### Checker improvements/fixes
#### Checker improvements/fixes
- Improved type checker: lots of new type checks and fixed checker bugs.
- Unused last expression in `if` is now checked.
- Anonymous structs visibility issues fixed.
### Standard library
#### Standard library
- `net.ssl` has been migrated from a dynamically linked OpenSSL to a statically linked Mbed TLS. 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`)
@ -423,27 +422,27 @@ Final steps in making the Option type a first class type:
- `gg.TouchPoint` to differentiate between different types of touch input.
- `str.int()` conversion speedup (without -prod).
### Web
#### Web
- `vweb.csrf` module.
### ORM
#### ORM
- Support parenthesized expressions like `select from User where (name == 'Sam' && is_customer == true) || id == 1`.
### Native backend
#### Native backend
- Lots of native backend improvements, including library calls, comptime conditionals, enums, method definitions/calls, structs.
### V interpreter
#### V interpreter
- Some further interpreter work.
### C backend
#### C backend
- cgen cleanups.
### OS support
#### OS support
- Removed the need for the `[console]` attribute in Windows GUI apps.
- More precise WINAPI declarations for easier integration on Windows.
- More CI tests on FreeBSD.
### Tools
#### Tools
- New stunning playground with an improved look and feel, a much better and more responsive editor,
code sharing by link, more convenient keyboard control, reusability for potential embedding:
https://play.vlang.io.
@ -457,7 +456,7 @@ Final steps in making the Option type a first class type:
## V 0.3.1
*31 Aug 2022*
### Improvements in the language
#### Improvements in the language
- Anonymous structs.
- 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)`.
@ -467,14 +466,14 @@ Final steps in making the Option type a first class type:
- Scanner optimizations.
- Using C's #define is no longer allowed in normal V code, only in `.c.v` files.
### Breaking changes
#### Breaking changes
- Anonymous sumtypes have been removed (deprecated for now) due to complicating the language and the compiler too much.
### Checker improvements/fixes
#### Checker improvements/fixes
- More type checks.
- Lots of fixes in `shared` types.
### Standard library
#### Standard library
- `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.
- `datatypes` module now uses operator overloading.
@ -489,35 +488,35 @@ Final steps in making the Option type a first class type:
- `string.replace_char()`, `math.round_sig()`.
- Improved multiplication performance in `math.big`.
### Web
#### Web
- `net.urllib` ipv6 support.
- `net.Http.Response.text` renamed to `body`.
- `net.websocket` timeout is now configurable.
### ORM
#### ORM
- ORM functions now return `Result`, so the errors can be handled.
### Database drivers
#### Database drivers
### Native backend
#### Native backend
- 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
- V interpreter improvements.
### C backend
#### C backend
- Parallelized cc step. Speeds up -prod and clang/gcc compilation by 300-500% (depending on
the number of cores). Experimental and hidden behind a -parallel-cc flag, soon to be the default.
- Intel C compiler support.
- Go backend fixes.
- `#preinclude` for low level C interop.
### OS support
#### OS support
- Full termux support via `$if termux {`, more predictable logging on Android.
- 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.)
### Tools
#### Tools
- 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.
- VLS performance improvements, especially on Windows.

View File

@ -1,7 +1,7 @@
## V 0.4
*1 July 2023*
### Improvements in the language
#### Improvements in the language
- **Coroutines with a scheduler**. Only Linux/macOS for now, requires `-use-coroutines` and
`coroutines.sleep()` instead of `time.sleep()`. They work with IO and net, but not with GC
for now.
@ -12,7 +12,6 @@
- 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 { `.
- Anonymous structs can no longer have attributes.
- Allow fixed array returns.
- 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 }`
- `it` has been renamed to `index` in array inits.
@ -54,7 +53,7 @@
- Scanner optimizations.
- Using C's #define is no longer allowed in normal V code, only in `.c.v` files.
### Breaking changes
#### Breaking changes
- `byte` deprecated in favor of `u8` (`byte` is automatically converted to `u8` by vfmt).
- `json`: enums are serialized as strings by default, `[json_as_number]` attribute can be used for
the old behavior.
@ -65,7 +64,7 @@
- Anonymous sumtypes have been removed (deprecated for now) due to complicating the language and the compiler too much.
### Checker improvements/fixes
#### Checker improvements/fixes
- Disallow `Result` type aliases (`type Foo = !Bar`) and `Result` in maps (`map[key]!Type`).
- Add a missing check for taking address of literal value member.
- Fixed map initialization for maps with option values.
@ -136,7 +135,7 @@
- More type checks.
- Lots of fixes in `shared` types.
### Standard library
#### Standard library
- json: Enum value string serialization supports `[json:'alias']` to change its string values.
- Struct fields can now be skipped during JSON/ORM serialization via `[json:'-']` and `[sql:'-']`,
in addition to `[skip]`. This allows having custom behavior for different serialization methods.
@ -224,7 +223,7 @@
- `string.replace_char()`, `math.round_sig()`.
- Improved multiplication performance in `math.big`.
### Web
#### Web
- The builtin websocket library is now thread safe.
- Enhanced builtin csrf protection in vweb.
- vweb: ability to set and get values on vweb.Context.
@ -255,7 +254,7 @@
- `net.Http.Response.text` renamed to `body`.
- `net.websocket` timeout is now configurable.
### ORM
#### ORM
- Fixed a foreign key bug that could result in an extra insert.
- Comptime bug with `[skip]` and `[sql:'-']` fixed.
- Checker error for unsupported field types.
@ -278,7 +277,7 @@
- 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.
### Database drivers
#### Database drivers
- mysql: TIMESTAMP support.
- mysql: allocate memory for each string and blob dynamically depending on its value length.
- mysql: add the ability to commit transactions.
@ -286,17 +285,17 @@
- Improved `pg` compatibility with older PostgreSQL versions before 2014.
- `sqlite`, `pg`, `mysql` have been moved to `db.sqlite`, `db.pg`, `db.mysql`.
### Native backend
#### Native backend
- Refactoring, splitting large files into multiple.
- Lots of fixes and new features in the native backend, including making codegen logic platform independent.
- Operator support for floats, multi return.
- Lots of native backend improvements, including library calls, comptime conditionals, 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.
### C backend
#### C backend
- Fix code generation for generic unions.
- Fix `[N]chan` (fixed arrays of channels).
- Fix nested fixed array instantiation.
@ -310,10 +309,10 @@
- Go backend fixes.
- `#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.
### Comptime
#### Comptime
- A new `$res` comptime function to get returned value in defer block (#18382).
- Fix comptimeselector option propagation.
- A mutability check for comptime assignments.
@ -333,7 +332,7 @@
- `$for in` works with alias types.
- New comptime features for fields: `field.is_<field>`, `field.is_alias`, `field.is_enum`.
### Compiler CLI
#### Compiler CLI
- `v share file.v` for sharing code via the playground.
- `v up` speed up for when it hasn't been run for a long time (**vc/** bootstrapping has been
optimized).
@ -343,7 +342,7 @@
works just like in Perl).
- A new `-ldflags` option, in addition to `-cflags`. Works just like LDFLAGS in C.
### OS support
#### OS support
- Added basic QNX support.
- Installation instructions for using V on NixOS.
- Better `make` support for OpenBSD.
@ -356,7 +355,7 @@
- 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.)
### Tooling
#### Tooling
- A new VPM site: vpm.vlang.io. A better design, discoverability of packages, descriptions, most downloaded packages etc.
- vpm: installation of mixed modules.
- `v ls --install -p D:\path\vls.exe` to install a local vls executable.