Skip to content

Releases: vlang/v

weekly.2024.09

27 Feb 09:27
weekly.2024.09
d8c4a84
Compare
Choose a tag to compare
releases: weekly.2024.09

weekly.2024.08

19 Feb 11:03
weekly.2024.08
Compare
Choose a tag to compare
releases: weekly.2024.08

weekly.2024.07

12 Feb 17:57
weekly.2024.07
c9933da
Compare
Choose a tag to compare
releases: weekly.2024.07

weekly.2024.06

05 Feb 16:57
weekly.2024.06
a374d25
Compare
Choose a tag to compare
releases: weekly.2024.06

weekly.2024.05

29 Jan 12:01
weekly.2024.05
cae40ad
Compare
Choose a tag to compare
releases: weekly.2024.05

weekly.2024.04

24 Jan 09:12
weekly.2024.04
4163faf
Compare
Choose a tag to compare
releases: weekly.2024.04

weekly.2024.03

16 Jan 09:35
weekly.2024.03
3a66355
Compare
Choose a tag to compare
releases: weekly.2024.03

0.4.4

09 Jan 13:59
Compare
Choose a tag to compare

V 0.4.4

9 January 2024

Improvements in the language

  • Implement @[aligned] and @[aligned:8] attributes for structs and unions (#19915)
  • Update attributes to use new syntax
  • Update remaining deprecated attr syntax (#19908)
  • Support $if T is $array_dynamic { and $if T is $array_fixed { in addition to $if T is $array { (#19882)
  • Prepare for making -W impure-v the default (#19940)
  • Assigning 0 to reference fields now requires unsafe blocks (fix #14911) (#19955)
  • Unwrap const() blocks
  • Implement $for comptime T.variants (#20193)
  • Add r and R switches for repeating in string interpolation, '${"abc":3r}' == 'abcabcabc' (#20197)
  • Comptime refactor and cleanup (#20196)
  • Allow comptime-for to iterate over comptime variables, add $string comptime type, cleanup (#20233)
  • Unwrap an option value automatically, inside if o != none { (#20275)
  • Complete support for smartcasting to a comptime variable type (#20270)
  • Improve comptime var checking with is operator and smartcasting (#20315)

Breaking changes

none

Checker improvements/fixes

  • Disallow $for i in struct.values and $for i in enum.fields (#19845)
  • Parser, checker: fix var scope in lambda(fix #19860) (#19871)
  • Change the warning more than 1000 possibilities in match range to a notice (#19862)
  • Fix inability to use multiple import some modname as _ in the same .v file (fix #19899) (#19900)
  • Disallow casting strings to pointers outside unsafe (#19977)
  • Disallow directly indexing sumtype and interface, when using as parameters(fix #19811) (#19982)
  • Fix loop on aggregates of arrays (in match branches) of sumtypes (fix #18548) (#19988)
  • Disallow indexing mut struct, passed as a fn parameter (#19992)
  • Enhance err msg for unknown types for comptime $for (#20057)
  • Fix .clone()/.move() with shared maps (#20083)
  • Fix generics method call with struct short syntax args(fix #20030) (#20100)
  • Fix unwrap, when generic structs are used as arguments, in uncalled methods (fix #20132) (#20135)
  • Fix generic fn with generic fn call returning generic map (fix #20106) (#20150)
  • Cast sumtype to its variant generic type (#20166)
  • Refactor string to enum error check, handle EnumName(string_variable) too (#20210)
  • Fix generic array method call with multi-types (#20237)
  • Remove unnecessary struct ref field initialization checks and notifications at map initializing(fix #20245) (#20251)
  • Add a notice, for accessing by key, map values, that contain pointers (to use unsafe or an or {} block) (#20266)
  • Fix mismatch checking when a function returns sumtype as an argument (fix #19325) (#20264)
  • Fix and cleanup uninitialized checks for array initialisers with len: (fix #20272) (#20279)
  • Give an error for .free() method calls, when used on fixed arrays (#20320)
  • Fix type mismatch checking for assignments with generics (fix #20298) (#20327)
  • Fix too strict checking with generics in assignment type mismatch (fix #20335) (#20346)
  • Disallow string to voidptr cast entirely (#20351)
  • Fix generic method calls with multi generic types (fix #20330) (#20360)

Parser improvements

  • parser: fix parsing comments after new attribute syntax
  • parser: fix failures found with fuzzing (#19873)
  • parser: deprecate old attribute syntax & update remaining (missed) attributes (#19879)
  • parser: fix infix expr handling with cast on left side of << operator (#19985)
  • ast: fix generic structs with multiple levels of generic embedding (#20042)
  • parser: implement thread returns result and multi_returns (fix #19281) (#20194)
  • parser: fix formatting struct decl with comments (#20207)
  • parser: fix formatting enum and interface decl with comments (#20216)
  • parser: fix fn call with newline opening brace (fix #20258) (#20267)
  • parser: fix parse_vet_file() with vfmt off/on flag (#20273)

Compiler internals

  • scanner: implement support for UTF-32 escape codes in string literals (#19911)
  • scanner: add new_silent_scanner/0, Scanner.prepare_for_new_text/1, make .ident_char/0, .ident_string/0 and .text_scan/0 public (#20045)
  • pref: support VNORUN=1, to enable running of tests, vsh files etc (i.e. just compile them, for debugging later)
  • scanner: fix backslashes followed directly by newline in string literals (fix #20291) (#20296)
  • scanner: fix escape character handling in character/rune literals (fix #20301) (#20304)
  • pref: disable the -macosx_version_min clang flag by default (#20297)
  • builder: remove passing -fno-strict-aliasing, for -prod to gcc/icc (#20368)
  • markused: add -skip-unused for programs that import x.vweb too (do not skip unused routing methods)

Standard library

  • json: fix recursive pointer encoding (#19840)
  • os,picohttpparser,sokol,strconv: prepare for making -W impure-v the default (#19846)
  • os: add fast path to mkdir_all, when the given folder already exists (#19869)
  • os: ignore empty path segments in join_path (#19877)
  • os: fix bootstrapping for OpenBSD
  • x.json2: replace deprecated type byte with u8 in the tests (#19909)
  • vlib: change byte to u8 (#19930)
  • sync: add a FreeBSD specific version of vlib/sync/sync_default.c.v (#19962)
  • datatypes: add push_many for doubly and singly linked list + add insert_many for heap (#19975)
  • datatypes: make Direction pub and fix and add tests for push_many (#19983)
  • gg: fn (data voidptr, e &Event) for events, allows methods
  • vlib: add a compress.szip module, deprecate the szip one after 2023-12-31 (#20003)
  • os: create the folder described by XDG_CACHE_HOME, if it is non empty, and it does not exist yet, when calling os.cache_dir() (#20046)
  • vlib: use the builtin flush functions, instead of the C. ones (#20108)
  • crypto: add blake2s and blake2b hashes (#20149)
  • os: fix mv_by_cp for directories (#20154)
  • os: update mv fns, improve performance, add params struct to control overwrite behavior (#20156)
  • gg: fix overlapping slices in draw_slice_filled() (#20182)
  • json: fix option sumtype handling (#20186)
  • builtin: add @[direct_array_access] to js string trim_right method (#20222)
  • json2: add encoder support for time.Time (#20228)
  • json2: fix encoding of 💀🐈 etc emojis (fix #20243) (#20247)
  • json2: make public the generic function map_from/1 (#20294)
  • json2: optimise encoding to be faster than cJSON with -prod (#20052)
  • json2: support sumtype encoding in a more robust way (#20093)
  • json2: strict module (#17927)
  • crypto: fix notices/errors for v -N test vlib/crypto
  • crypto: add blake3 hash (#20319)
  • sokol: fix compiling gg and other graphical examples on OpenBSD (#20333)
  • csv: Add a sequential reader too (suitable for very large .csv files, it does not read everything at once) (#20140)

Web

  • net.mbedtls: use char and usize types for describing more precisely the C API of mbedtls (#19837)
  • vweb: add the mime type for .toml files (#19875)
  • net.openssl: use actual C values for the SSLError enum (#19945)
  • vweb: .html('custom_template.html')
  • vweb: add an optional parameter to the .redirect/2 method, to be able to set the http code for the redirects (#20082)
  • x.vweb: fix large payload (#20155)
  • x.vweb: reimplement csrf module (#20160)
  • net: make net.fionbio and net.msg_nosignal constants public in net_windows.c.v (#20183)
  • net.http: remove unused read_set_cookies function (#20187)
  • os, net.http.file: add a folder listing to the http static file server, started by file.serve/1 (#20192)
  • websocket: enable using an already existing connection (from vweb or another http server) (#20103)
  • x.vweb: fix fsanitize-address test for SSE, improve documentation on the usage of takeover_conn (#20249)
  • net.http: support -d no_vschannel on windows, to fix long waits, while connecting on some systems (#20265)
  • x.vweb: fix $vweb.html() integration in cgen for the newer x.vweb module (fix #20204)
  • net: support only ip and ip6 in net.tcp_listener (#20336)
  • x.vweb.assets: reimplement assets module for x.vweb (#20280)
  • x.vweb.sse: reimplement SSE module for x.vweb (#20203)
  • js.dom: add querySelector[All] and NodeList (#20240)

ORM

  • orm: fix code generation for an option time.Time field (#20031)
  • orm: fix the generated SQL for the "not equal" operator (#20321)

Database drivers

  • db.mysql: add support for the FreeBSD name of the mariadb client library (#20039)
  • db.pg: fix using postgresql on windows, improve instructions for installing it (#20053)
  • db.mysql: add ability to prepare and execute statements separately (#20146)
  • db.pg: fix compilation error with the msvc compiler on windows, and add readme (#20326)

Native backend

C backend

  • Fix generic fn returning fixed array (#19885)
  • Fix arrays alias built-in methods call(fix #19896) (#19910)
  • Fix generic array initialization (fix #19903) (#19916)
  • Fix option sumtype auto deref (#19919)
  • Ast, checker, cgen: fix interface embeded methods call(fix #16496) (#19936)
  • Fix ref and deref when an interface is used as a function parameter (fix #19947) (#19966)
  • Fix auto str for interface struct member which implements str method (#19970)
  • Fix generics call with interface arg (fix #19976) (#20002)
  • Fix lambda initialization on option struct field (fix #19474) (#19995)
  • Fix live mode on windows (#20041)
  • Fix the static from_string method of Enum across mods(fix #20050) (#20068)
  • Fix @[if xyz?] fn init() {}, add tests (#20096)
  • Fix assignment to the elements of an array of fixed arrays (#20133)
  • Fix mutable comptimeselector usage (fix #20027) (#20134)
  • Fix generics chans select (#20159)
  • Fix string interp with zero characters (fix #20199) (#20200)
  • Fix interface eq method with option and ref (fix #19441) (#20201)
  • Fix infix expr in method of mut receiver variable (#20225)
  • Fix cgen for thread wrappers, when spawning fns with with anon-fn arra...
Read more

weekly.2024.01.test2

04 Jan 12:20
weekly.2024.01.test2
7d29afe
Compare
Choose a tag to compare
releases: weekly.2024.01.test2

weekly.2023.52

26 Dec 08:47
weekly.2023.52
1aad481
Compare
Choose a tag to compare
releases: weekly.2023.52