JalonSolov
de2fc87995
os: handle trailing backslash on windows path when quoting ( #13705 )
2022-03-10 01:29:37 +03:00
Alexander Medvednikov
36ec47cd20
all: replace "NB:" with "Note:" (docs/comments)
2022-03-06 20:01:22 +03:00
Delyan Angelov
bad30bdd79
os: allow using XDG_CACHE_HOME for choosing the folder returned by `os.cache_dir()` on windows too
2022-02-13 11:18:51 +02:00
Tim Basel
9d0a5942ac
builtin: change IError `msg` and `code` to methods + fix vlib, add a deprecation notice for the old usages ( #13041 )
2022-02-11 15:52:33 +02:00
Merlin Diavova
f3683b7cdc
os: add an .exit_code field to os.Command ( #13321 )
...
* Added os.Command.exit_code
* vfmt vlib/os/os_test.v
* extract os.Command to os.v, add a dummy panicing implementation on windows, just for parity, fix os_test.v on macos, skip test_command on windows.
Co-authored-by: Merlin Diavova <md@merlindiaova.org>
Co-authored-by: Delyan Angelov <delian66@gmail.com>
2022-01-30 00:44:52 +02:00
Delyan Angelov
fa6f7d4c83
os: add os.quoted_path/1, use it consistently for running V itself
2022-01-22 21:13:28 +02:00
Alexander Medvednikov
59ed4be49a
all: update copyright year
2022-01-04 12:21:12 +03:00
Delyan Angelov
5e8288528a
ci: fix `v -b js vlib/builtin/js/array_test.js.v`
2021-11-22 15:11:33 +02:00
Delyan Angelov
7a0dc60d04
os: re-add the leak in os.join_path (the `os.join_path(x, ...arr)` case should be handled by V). Add a memleak free os.join_path_single version.
2021-11-22 14:40:55 +02:00
Delyan Angelov
c7bd74e0f8
ci: fix build, remove `[manualfree]` from os.vmodules_paths for now
2021-11-21 22:34:38 +02:00
Delyan Angelov
1aaac13a60
cgen: make `os` less special, fix an -autofree leak on just `import os`
...
* Improve documentation of v.util.Surrounder
* Remove `os` from the list of "no auto free" `builtin` mods
* Fix -autofree freeing of `const x = []string{}`.
* Add a valgrind regression test.
* Implement os.getenv_opt in vlib/os/environment.js.v too.
2021-11-21 21:50:10 +02:00
Delyan Angelov
24ffc1ffb2
os: fix os.rmdir_all for folders with recursive symlinks
2021-11-20 10:28:12 +02:00
Delyan Angelov
b86c79329b
os, builtin: reduce leaks without -autofree
2021-10-29 15:49:30 +03:00
Delyan Angelov
e99b699ac6
os: make os.mkdir_all more robust (honor / on windows too), add a test for it
2021-10-24 19:16:46 +03:00
Delyan Angelov
f34daf9ff4
os: add os.walk_with_context/3 and a test for it
2021-10-24 19:12:14 +03:00
Delyan Angelov
e34046a0e1
os: remove `pub` from impl_walk_ext
2021-10-24 18:48:54 +03:00
Delyan Angelov
d1c4b470bc
os: make os.ls('') return an error, make os.walk_ext more memory efficient on deep hierarchies, add tests for os.walk_ext
2021-10-24 18:44:13 +03:00
Delyan Angelov
7bd145d88a
os,net: cleanup deprecated @VROOT usages
2021-09-19 16:24:24 +03:00
Delyan Angelov
eec930b86a
os: turn some panics into `return error()`
2021-09-18 10:45:04 +03:00
Enzo
e3b65092d6
parser: deprecate `size_t` ( #11443 )
2021-09-08 13:09:32 +03:00
Larpon
bd33eaa3b8
os: add function to expand "~" to home directory ( #11362 )
2021-09-01 16:32:28 +03:00
playX
109d5d5847
js: `os` now compiles to the JS backend, more builtins & minor codegen fixes ( #11302 )
2021-08-25 14:40:53 +03:00
Delyan Angelov
8fbd8f790d
os: cleanup for -Wimpure-v
2021-08-12 21:53:29 +03:00
Delyan Angelov
d82d41d804
os: fix os.dir, os.base, os.file_name, when the argument contains / on windows
2021-07-31 13:52:54 +03:00
Delyan Angelov
44892fd942
os: let `os.dir("/xyz")` return "/" (fixes compiling .v files in /)
2021-07-30 03:28:53 +03:00
Delyan Angelov
5098334e65
os: add execute_or_exit(cmd), use it consistently instead of execute_or_panic(cmd)
2021-07-20 15:22:04 +03:00
Delyan Angelov
1bf6743987
vinix: support -os vinix (part 2)
2021-07-13 11:41:45 +03:00
pancake
47bf64473c
vlib: reimplement glob in V for UNIX to not depend on libc ( #10707 )
2021-07-09 03:27:16 +03:00
Daniel Däschle
3881e97a40
vlib: remove ustring usage ( #10618 )
2021-06-30 22:30:28 +03:00
Delyan Angelov
6890756cd2
os: cleanup of old deprecated functions. Add File.write_full_buffer/2; use it in os.write_file/2
2021-06-25 22:51:59 +03:00
Alexander Medvednikov
f09a5135e9
checker: handle builtin enum init correctly
2021-05-20 03:14:32 +03:00
kevin70g
e9c84ce154
os: fix is_abs_path() panic, when path is only one letter on windows ( #10071 )
2021-05-10 10:01:32 +03:00
Delyan Angelov
38d16229ef
os: fix panic on os.is_abs_path('')
2021-05-09 10:45:34 +03:00
crthpl
14434cc86a
all: bare metal support (fix `-freestanding`) ( #9624 )
2021-04-14 07:50:50 +02:00
Delyan Angelov
c698fa1a58
all: support `v -watch run` ( #9577 )
2021-04-04 16:05:06 +02:00
Alexander Medvednikov
a53aaaf9e7
os: fix a leak in read_lines()
2021-03-22 12:20:55 +03:00
zakuro
e3c0f305b2
os: deprecate `os.File.write_bytes` and add `os.File.write_ptr` ( #9370 )
2021-03-20 09:02:28 +02:00
JalonSolov
9ea88c090b
os: fix warning write_str -> write_string ( #9368 )
2021-03-19 03:36:27 +01:00
Delyan Angelov
b7a5fa7fbe
os: fix `v -cflags "-Werror" test vlib/os/`
2021-03-18 19:45:04 +02:00
Lukas Neubert
fecf4a6f58
os: fix rmdir_all panic with hidden dirs ( #9271 )
2021-03-13 08:43:38 +02:00
Delyan Angelov
def53fd73f
os: prevent os.exists_in_system_path() from panicing
2021-03-12 17:05:26 +02:00
Delyan Angelov
995db65471
os: fix os.cp_all, by making the dst folder, if it does not exist already
2021-03-12 16:29:27 +02:00
Enzo
99abd46ac9
os: add `(read|write)_raw[_at]` to File ( #9171 )
2021-03-10 18:45:12 +02:00
Delyan Angelov
d7049ae2da
os: deprecate os.exec (returning ?os.Result), in favour of os.execute, which returns os.Result ( #8974 )
2021-03-08 20:52:13 +02:00
spaceface
b712af56fd
all: bring back `panic(err.msg)` -> `panic(err)` ( #9022 )
2021-03-01 00:18:14 +01:00
spaceface
d63b7bc35a
all: update repo to use the new error handling syntax ( #8950 )
2021-02-28 23:20:21 +03:00
Delyan Angelov
20f9bdfa8e
os: fixes for os.input(), os.get_raw_stdin(), os.get_raw_line() in case of stdin EOF
2021-02-27 20:02:36 +02:00
Nick Treleaven
aed348fb80
os: tag some File methods that take voidptr as unsafe - write_bytes, write_bytes_at ( #8985 )
2021-02-27 10:11:17 +02:00
Stanislav Ershov
c190b6a131
vlib: remove older deprecated functions ( #8864 )
2021-02-20 20:42:55 +02:00
Nick Treleaven
ea803113c3
checker: check `unsafe` V function calls ( #8752 )
2021-02-14 19:31:42 +01:00