From 20ba2a10c1dbd3e8c7230a439996c02cd32834c7 Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Sun, 3 Jul 2022 15:13:08 +0300 Subject: [PATCH] builder: use is_dir for src/; changelog: add 0.3.1 features --- CHANGELOG.md | 11 +++++++++-- vlib/v/builder/builder.v | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ab0543a95a..5549976c95 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## V 0.3.1 +*Not released yet* +- V can now find code in the `src/` directory. This allows making V repos much cleaner. +- `os.mkdir()` now has an optional `mode` paramter. +- Full termux support via `$if termux {`. +- Go backend fixes. + ## V 0.3 *30 Jun 2022* - C to V translation via C2V: `v translate file.c`. (Demo video: [Translating DOOM from C to V, building it in under a second and running it!](https://www.youtube.com/watch?v=6oXrz3oRoEg)) @@ -37,7 +44,7 @@ - Static GC (no longer a dynamic lib dependency). - New various algorithms for random number generation: MT19937RNG, etc (module `rand`). - Fix immutability bugs that allowed to bypass compiler immutability checks and modify const/immutable values. -- Lots of fixes in the JSON serializer. +- Lots of fixes in the JSON serializer. - Heap allocated only structs marked with `[heap]`. - Significantly improve lots of error messages, make them more clear, suggest hints. - Bug fixes and new features in the pure V `regex` module. @@ -77,7 +84,7 @@ - `strings.Builder` optimizations and new methods. - Autofree fixes (still not production ready, hidden behind the `-autofree` flag). - Lots of Android fixes in V and in vab. -- Lots of commits to the native backend (amd64/arm64). +- Lots of commits to the native backend (amd64/arm64). - V interpreter fixes. (Still at an early stage.) - Go2V translator has been started by the community, and can already translate simple programs. - An early version of the Go backend (`v -b go -o file.go file.v`). diff --git a/vlib/v/builder/builder.v b/vlib/v/builder/builder.v index a2d37f898f..d5710973be 100644 --- a/vlib/v/builder/builder.v +++ b/vlib/v/builder/builder.v @@ -312,7 +312,7 @@ pub fn (b Builder) v_files_from_dir(dir string) []string { if res.len == 0 { // Perhaps the .v files are stored in /src/ ? src_path := os.join_path(dir, 'src') - if os.exists(src_path) { + if os.is_dir(src_path) { if b.pref.is_verbose { println('v_files_from_dir ("$src_path") (/src/)') }