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
Larpon
65f2420516
os: fix cp_all mkdir panic ( #8680 )
2021-02-12 01:55:36 +02:00
SurmanPP
f2ad6dd4d9
os: fix os.walk, when passing paths ending with path_separator ( #8672 )
2021-02-10 18:48:01 +02:00
Julia Bogdan Filipchuk
d26ac0f6cb
vfmt: add ability to use vfmt as a filter from stdin to stdout ( #8432 )
2021-01-30 12:38:54 +02:00
Delyan Angelov
e5a84719ca
all: require calling `optfn() ?` / `optfn() or {...}` for `fn optfn() ? {}`
2021-01-26 16:43:17 +02:00
Delyan Angelov
728344ff65
ci: fix `v test-cleancode`
2021-01-25 12:55:01 +02:00
Alexander Medvednikov
c21f57ff59
os: vfmt os.v
2021-01-23 10:33:53 +01:00
Alexander Medvednikov
45cc3ec664
sokol: remove an absolute import
2021-01-23 10:32:00 +01:00
Alexander Medvednikov
d991712b3c
gg: native rendering mode on macOS
2021-01-23 10:25:43 +01:00
Lukas Neubert
8b61891348
fmt: smarter if condition wrapping ( #8201 )
2021-01-23 10:33:22 +02:00
Lukas Neubert
ac2c3847af
all: update copyright to 2019-2021 ( #8029 )
2021-01-18 13:20:06 +01:00