You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi. I'm attempting to use the new string_reader module but it looks like it's trying to use private constants from io. Would it be a good idea to make those constants public?
Read 3 bytes from the file (should output "Mod" in this example)
Current Behavior
C:/Users/daddycocoaman/dev/_langs/v/vlib/io/string_reader/string_reader.v:71:33: error: constant `io.read_all_len` is private
69 |
70 | // make sure there is enough room in the string builder
71 | unsafe { r.builder.grow_len(io.read_all_len) }
| ~~~~~~~~~~~~
72 | defer {
73 | // shrink the length of the buffer to the total of bytes read
C:/Users/daddycocoaman/dev/_langs/v/vlib/io/string_reader/string_reader.v:87:35: error: constant `io.read_all_grow_len` is private
85 | break
86 | } else if r.builder.len == end {
87 | unsafe { r.builder.grow_len(io.read_all_grow_len) }
| ~~~~~~~~~~~~~~~~~
88 | }
89 | }
C:/Users/daddycocoaman/dev/_langs/v/vlib/io/string_reader/string_reader.v:109:12: error: constant `io.read_all_len` is private
107 | start := r.builder.len
108 | // make sure there is enough room in the string builder
109 | if n > io.read_all_len {
| ~~~~~~~~~~~~
110 | unsafe { r.builder.grow_len(io.read_all_len) }
111 | } else {
C:/Users/daddycocoaman/dev/_langs/v/vlib/io/string_reader/string_reader.v:110:34: error: constant `io.read_all_len` is private
108 | // make sure there is enough room in the string builder
109 | if n > io.read_all_len {
110 | unsafe { r.builder.grow_len(io.read_all_len) }
| ~~~~~~~~~~~~
111 | } else {
112 | unsafe { r.builder.grow_len(n) }
C:/Users/daddycocoaman/dev/_langs/v/vlib/io/string_reader/string_reader.v:126:20: error: constant `io.read_all_grow_len` is private
124 | break
125 | } else if r.builder.len == end {
126 | if n - end > io.read_all_grow_len {
| ~~~~~~~~~~~~~~~~~
127 | unsafe { r.builder.grow_len(io.read_all_grow_len) }
128 | } else {
C:/Users/daddycocoaman/dev/_langs/v/vlib/io/string_reader/string_reader.v:127:36: error: constant `io.read_all_grow_len` is private
125 | } else if r.builder.len == end {
126 | if n - end > io.read_all_grow_len {
127 | unsafe { r.builder.grow_len(io.read_all_grow_len) }
| ~~~~~~~~~~~~~~~~~
128 | } else {
129 | unsafe { r.builder.grow_len(n - end) }
Possible Solution
Make the read_all_len and read_all_grow_len constants public
Additional Information/Context
No response
V version
V 0.4.4 a867ed6
Environment details (OS name and version, etc.)
V full version: V 0.4.4 a867ed6
OS: windows, Microsoft Windows 11 Pro v26058 64-bit
Processor: 4 cpus, 64bit, little endian,
getwd: C:\Users\daddycocoaman\dev\offensiv
vexe: C:\Users\daddycocoaman\dev\_langs\v\v.exe
vexe mtime: 2024-03-08 01:49:10
vroot: OK, value: C:\Users\daddycocoaman\dev\_langs\v
VMODULES: OK, value: C:\Users\daddycocoaman\.vmodules
VTMP: OK, value: C:\Users\daddycocoaman\AppData\Local\Temp\v_0
Git version: git version 2.42.0.windows.2
Git vroot status: weekly.2024.10-3-ga867ed6a-dirty
.git/config present: true
CC version: Error: 'cc' is not recognized as an internal or external command,
operable program or batch file.
thirdparty/tcc status: thirdparty-windows-amd64 b99a453d
Note
You can use the 👍 reaction to increase the issue's priority for developers.
Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.
The text was updated successfully, but these errors were encountered:
Describe the bug
Hi. I'm attempting to use the new
string_reader
module but it looks like it's trying to use private constants fromio
. Would it be a good idea to make those constants public?Reproduction Steps
Expected Behavior
Read 3 bytes from the file (should output "Mod" in this example)
Current Behavior
Possible Solution
Make the
read_all_len
andread_all_grow_len
constants publicAdditional Information/Context
No response
V version
V 0.4.4 a867ed6
Environment details (OS name and version, etc.)
Note
You can use the 👍 reaction to increase the issue's priority for developers.
Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.
The text was updated successfully, but these errors were encountered: