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

58 Commits

Author SHA1 Message Date
yuyi
17000ef7b6
checker: check option fn returning error (fix #17423) (#17438) 2023-03-02 15:49:50 +02:00
Nahua
21b17fe234
io: add missing documentation and edit existing ones (#17105) 2023-01-25 22:03:20 +02:00
Keito Tobichi
d5b9f7d026
io: fix typos (fix #16839) (#16840) 2023-01-02 20:20:52 +02:00
yuyi
017ace6ea7
vfmt: change all '$expr' to '${expr}' (#16428) 2022-11-15 16:53:13 +03:00
Delyan Angelov
f427a5241a
os,tools: add os.vtmp_dir()
Use it to consistently place all temporary files created by tests in a overridable folder specific to the user, that is easy to cleanup later.

NOTE: os.temp_dir() on macos returns `/tmp`, and using `/tmp/v` is a problem when multiple unix users are trying to access/create/write to it.
2022-11-03 10:19:51 +02:00
Alexander Medvednikov
c6158e4519 all: remove unnecessary IError() casts 2022-10-28 19:08:30 +03:00
Delyan Angelov
2083e6b04c
os: cleanup APIs returning !bool to either return ! or bool (#16111) 2022-10-20 13:56:06 +03:00
yuyi
f6844e9766
all: change optional to result of io (#16075) 2022-10-16 09:28:57 +03:00
Vincenzo Palazzo
b01f71d9da
io: migrate the Reader API to Result instead of Option (#15229) 2022-08-08 02:33:25 +03:00
yuyi
de136f6baf
checker: improve pub struct check (fix #14446) (#14777) 2022-06-19 17:42:22 +03:00
Daniel Däschle
d679146a80
fmt: remove space in front of ? and ! (#14366) 2022-05-13 06:56:21 +03:00
Ikko Ashimine
56a3539ea9
io: fix typo in readerwriter.v (#14060)
seperate -> separate
2022-04-17 17:40:14 +03:00
Alexander Medvednikov
fb192d949b all: replace []byte with []u8 2022-04-15 15:35:35 +03:00
Alexander Medvednikov
d4a0d6f73c all: byte => u8 2022-04-15 14:58:56 +03:00
Nick Treleaven
7231a3f135
vlib: add mut for the first parameter of builtin.copy, arrays.copy and crypto (#13702) 2022-03-09 20:26:00 +02:00
Subhomoy Haldar
114a341f5f
rand: simplify rand.PRNG, move to optional types for error handling (#13570) 2022-02-23 12:36:14 +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
jeffmikels
a60b381d5e
docs: adding skeleton README.md files for all vlib modules (#13034) 2022-01-05 18:06:08 +02:00
lydiandy
2070839722
io: pub the RandomReader interface (#12222) 2021-10-18 10:51:36 +03:00
lydiandy
98b2bdb410
io: cleanup ReaderWriter interface (#12218) 2021-10-17 19:39:51 +03:00
Alexander Ivanov
0386f2bbea
checker: add an interface check for mutability, fixes #1081, fixes #7038 (#11963) 2021-10-11 15:41:31 +03:00
Delyan Angelov
4a0d00fb30
io.util: simplify random number generation in util.v 2021-09-23 14:20:39 +03:00
Daniel Däschle
b63ec8fbcf
checker: require params attribute to use struct as keyword arguments in function (#11135) 2021-09-14 00:05:30 +03:00
Alexander Medvednikov
f731060caf all: update chmod/chdir usages 2021-08-28 10:23:01 +03:00
Daniel Däschle
800c0e5092
vlib: remove deprecated map{} usages as well as deprecated functions (#11035) 2021-08-04 12:44:41 +03:00
Daniel Däschle
ad3835b598
parser: deprecate short struct init (#10842) 2021-07-20 11:17:08 +03:00
Delyan Angelov
1086b4ac5e
io: mark the mutability requirements of the Writer interface explicitly; swap the io.cp/2 parameter order to be like os.cp/2 (#10091) 2021-05-13 13:06:42 +03:00
Delyan Angelov
143c3d4bb4
io: deprecate io.make_reader (not needed anymore) 2021-05-13 10:26:26 +03:00
Leigh McCulloch
26652c8a23
io: make new_multi_writer use varargs (#10062) 2021-05-09 09:21:08 +03:00
Leigh McCulloch
68c8709343
io: add MultiWriter (#10021) 2021-05-08 14:21:53 +03:00
Delyan Angelov
8a380f4699
tools: make v test-cleancode test everything by default (#10050) 2021-05-08 13:32:29 +03:00
Louis Schmieder
f5ce9388de
io: make io.cp use chunks (#9877) 2021-04-26 09:59:23 +03:00
Louis Schmieder
00261afbc1
io: add a cp function (#9875) 2021-04-25 21:22:33 +03:00
Bastian Buck
69dff4b384
os: make os module handle large files (#9439) 2021-03-26 07:51:55 +01:00
Delyan Angelov
9b78d7d21d
tools: check formatting of more modules with v test-cleancode, colorize v vet output 2021-03-24 12:39:39 +02:00
Alexander Medvednikov
852d302b87 io: BufferedReader.free() 2021-03-15 21:25:19 +01:00
Delyan Angelov
5e0e44eb69
os: move file methods to vlib/os/file.c.v, document them, add new file.read_struct and file.write_struct and tests 2021-03-04 14:54:39 +02:00
Delyan Angelov
2bfa6dfe2f
io: fix not reading the last byte of a stream with .read(mut buf) 2021-03-04 08:59:48 +02:00
Subhomoy Haldar
a5dd7faf3c
rand: add PRNG interface and unit-tests (#9083) 2021-03-03 13:41:00 +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
spaceface
b9a381f101
all: migrate to the new Option (p. 1) (#8924) 2021-02-28 22:24:29 +03:00
Nick Treleaven
23f231ee61
builtin: tag array methods unsafe: *_many, grow_len, pointers (#8983) 2021-02-26 22:55:09 +01:00
Delyan Angelov
2002d20249
io: remove unused Zzz_CoerceInterfaceTableGeneration struct; add test for x := Enum{} 2021-02-17 01:37:05 +02:00
Delyan Angelov
4961d3ea17
io: fix detection of end_of_stream, when reading files through io.new_buffered_reader(reader: io.make_reader(f)) 2021-02-16 23:22:17 +02:00
Delyan Angelov
e5a84719ca
all: require calling optfn() ? / optfn() or {...} for fn optfn() ? {} 2021-01-26 16:43:17 +02:00
Subhomoy Haldar
97103f680a
rand: separate rand.util and rand.seed submodules (#8353) 2021-01-26 15:55:09 +02:00
Daniel Däschle
3289dff7ff
checker: require explicit return none (#8060) 2021-01-12 11:43:55 +01:00
yuyi
ad79d55a5c
ftp: fix an error (#7930) 2021-01-07 20:21:47 +01:00
Alexander Medvednikov
a8447398f5 io: remove obsolete OutputStream 2020-12-22 10:44:45 +01:00