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

82 Commits

Author SHA1 Message Date
3eb6ad7b8c os: fix type in error message (#15533) 2022-08-26 06:59:52 +03:00
74bb5ae17a os: add an optional "mode" parameter to os.mkdir and os.mkdir_all (#14887) 2022-06-30 13:49:47 +03:00
587101a1ea os: fix find_abs_path_of_executable function (on Windows) (#14835) 2022-06-23 03:36:15 +03:00
d679146a80 fmt: remove space in front of ? and ! (#14366) 2022-05-13 06:56:21 +03:00
34a252ef84 os: add raw_execute on Windows (#14363) 2022-05-11 16:56:03 +03:00
014c3c97f0 all: byte => u8 2022-04-15 14:45:52 +03:00
60e718e7c6 test: save removing the nonexistent binary output for v fmt and v vet tests 2022-04-09 13:04:52 +03:00
36ec47cd20 all: replace "NB:" with "Note:" (docs/comments) 2022-03-06 20:01:22 +03:00
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
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
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
50a608aab3 os: remove unnecessary heap allocation from os.execute 2021-11-12 11:45:37 +02:00
20d63de136 os: fix os.execute for command output that contains 0 bytes 2021-11-12 09:39:15 +02:00
b86c79329b os, builtin: reduce leaks without -autofree 2021-10-29 15:49:30 +03:00
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
eed94c727c os: move C struct declarations in their own _default.c.v files (#12268) 2021-10-22 17:08:08 +03:00
00d4c7082e native: add support for print, eprint and eprintln (#11034) 2021-08-03 16:04:31 +03:00
8eb544146e os: fix building V on Haiku 2021-07-27 20:28:04 +03:00
8f3646cb81 os: fix debugger_present for solaris (#10902)
-solaris has no `sys/ptrace.h`, instead `ptrace` is included in  `sys/types.h` and `unistd.h`
2021-07-22 10:44:00 +03:00
d7dcb47db3 os: implement File.seek/2 and File.tell/0 2021-07-22 08:00:21 +03:00
47bf64473c vlib: reimplement glob in V for UNIX to not depend on libc (#10707) 2021-07-09 03:27:16 +03:00
7b4c342396 os: disable os.glob() on Android for now (fixes termux compilation) 2021-07-08 00:00:40 +03:00
8cc49b5e9e os: add utime() (#9796) 2021-06-30 10:21:23 +03:00
d2f19ac494 os: add a glob() function (#10497) 2021-06-30 08:30:18 +03:00
97b83a4986 os: add debugger_present() for linux (#10257) 2021-06-29 15:00:48 +03:00
60c880a0cc vlib: use malloc_noscan() where possible (#10465) 2021-06-15 14:47:11 +03:00
d6e462a6ca os: fix os.is_link and os.symlink on windows, add new functions os.getppid, os.getgid, os.getegid (#10251) 2021-05-29 23:26:13 +03:00
12c3f85507 os: add getuid and geteuid (#10002) 2021-05-05 14:20:11 +03:00
b506d8fcc0 os: use C.getlogin for os.loginname, instead of C.getlogin_r (C.getlogin_r absent on Android) 2021-04-24 13:33:34 +03:00
9ec91f4d58 os: add new function os.loginname(), improve some error messages (#9794) 2021-04-19 14:57:25 +03:00
546dc91967 os: create os.hostname() and os.chown() + os.uname() for windows (#9722) 2021-04-15 01:49:05 +02:00
d8cb24eef0 ci: fix -cflags -Werror jobs 2021-04-05 23:42:26 +03:00
19b915b105 ci: fix windows-tcc job 2021-04-05 23:35:22 +03:00
5c07cbf5d3 ci: fix v -cc clang-11 -cflags -Werror cmd/v 2021-04-05 08:09:04 +03:00
57e6138a61 all: remove byteptr and charptr; replace them with &byte and &char 2021-04-04 17:43:32 +03:00
b7c01db1f9 builtin: add .vstring_literal and .vstring_literal_with_len for converting read only strings like os.args 2021-03-23 22:10:28 +02:00
7f91b75cbc builtin: fix leaks in os.execute() and []string{} == []string{} 2021-03-23 20:36:19 +02:00
e3c0f305b2 os: deprecate os.File.write_bytes and add os.File.write_ptr (#9370) 2021-03-20 09:02:28 +02:00
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
4ccf991f61 checker: warn when casting a fixed array (use &arr[0] instead) (#8787) 2021-02-17 20:45:11 +01:00
4a0367a63c vlib: add [unsafe] tag to more functions: tos, string_from_wide, strings.Builder: write_bytes, free (#8766) 2021-02-15 17:15:52 +02:00
ea803113c3 checker: check unsafe V function calls (#8752) 2021-02-14 19:31:42 +01:00
d660f2cc6f fmt: insert newline after last HashStmt (#8482) 2021-02-01 14:50:41 +01:00
e5a84719ca all: require calling optfn() ? / optfn() or {...} for fn optfn() ? {} 2021-01-26 16:43:17 +02:00
8b61891348 fmt: smarter if condition wrapping (#8201) 2021-01-23 10:33:22 +02:00
53941c4a0a fmt: fix if cond break readability (#8132) 2021-01-16 02:12:17 +01:00
adf084eeed cgen: fix address violations for return error(abc), reduce leaks in os 2021-01-14 04:58:26 +02:00
33694665f0 fmt: align each contiguous field of struct. not the whole. (#7981) 2021-01-12 04:38:43 +01:00
a1c67232d0 checker: fix duplicate variable name (fix #265) (#7982) 2021-01-10 21:41:29 +01:00
0ab6a8cd01 os: add a posix_set_permission_bit function (#7754) 2021-01-04 19:57:17 +02:00