Added an offset to search(io::IOBuffer, delim, offset), so that#4485
Added an offset to search(io::IOBuffer, delim, offset), so that#4485
Conversation
the search can pick up after the buffer is filled further.
|
Seems fine. I wonder whether |
|
I thought about that. I went this route since But anyway, I'll change it and see what it looks like. |
|
Yeah, that's a good point. I'm not sure about this one. |
|
All of the uses of So while it's still searching for something, the question really being asked is "how many bytes are there up to and including the next Also, since there's a general desire to have semantically different ideas have different function names, perhaps this function should be renamed? One possibility would be (Which is a rather unfortunate name... perhaps that could be renamed to |
|
(Or for readability, |
|
+1 to such a renaming |
|
Any preference? |
|
Or rather, which renaming? |
|
bump |
|
Any thoughts on a good name? I'm not enamoured with the current name or my previous suggestions. The name should probably reflect "number of bytes available until the next delimiter". |
|
If no other suggestions come up, I'd say this is a minimal change and can probably just be applied. It really only affects one use of |
There was a problem hiding this comment.
Is this really correct? I think there is a chance the libuv layer will end up compacting the buffer before we go around the loop again. @loladiro
There was a problem hiding this comment.
The interface functions to the IOBuffer object are not effected by compacting. The failure condition here is the assumption that there are no other consumers of the stream. mark may be helpful here to validate that assumption?
There was a problem hiding this comment.
mark would maintain all data in the buffer after the mark, and this PR could be rewritten using mark.
Unfortunately, #3656 is stuck right now because of my lack of understanding as to why it's affecting the build, so mark isn't yet available.
|
+2 to renaming nb_available |
|
bump. it's unclear to me what the status of this is. the |
|
Closing due to doubts about correctness with multiple readers. |
Stdlib: Pkg URL: https://github.com/JuliaLang/Pkg.jl.git Stdlib branch: master Julia branch: master Old commit: 2141bf17f New commit: 1e90f07f9 Julia version: 1.14.0-DEV Pkg version: 1.14.0 Bump invoked by: @IanButterworth Powered by: [BumpStdlibs.jl](https://github.com/JuliaLang/BumpStdlibs.jl) Diff: JuliaLang/Pkg.jl@2141bf1...1e90f07 ``` $ git log --oneline 2141bf17f..1e90f07f9 1e90f07f9 Fix is_stdlib uses when julia_version is used (#4534) 3f0c20ec7 Ensure `@stdlib` is on `LOAD_PATH` for `.pkg/` hooks (#3167) eaaecc75b Bump actions/checkout from 5 to 6 in the all-actions group (#4530) 56e16ea22 Fix more test cases for base CI (#4531) 0369c9363 Isolate more tests (#4528) 3bc7bff5c Propagate syntax version from Project to Manifest (#4520) 77db067f8 Publicize `Apps` (#4524) f370106a4 CI: Fix duplicate CI jobs on backports PRs (#4521) 1918a7624 ensure REPLExt is precompiled before we disallow it (#4517) 901e5f0f2 finish deprecating collect_delay (#4516) 854ac75ed Use `Sys.STDLIB` instead of hardcoding path to Julia stdlib (#4515) 0c7013bfa Fix some tests when run in base (#4499) 31ae9601a fix: work around string indexing issues in windows drive letter detection bf67f6342 test: isolate more tests that call subprocesses (#4504) 7302e1960 avoid some overhead from Tar.jl when unpacking the registry (#4505) 101997edf keep using gzip on Windows for the registry (#4496) db3e6f0b4 use the same value of `--check-bounds` as the process (#4494) e0af33508 only propagate paths in sources for fixed packages if they actually exist (#4503) d3c44751b Fix formatting of warning admonition (#4498) 10fc1126a show the original libgit2 error message which includes the `insteadOf` url (#4501) 7874cbd4f Merge pull request #4500 from JuliaLang/kc/substring 88a46e68f fix building packages on app add (#4491) 87a86dcfc use shallow clones for registry/packages (when supported by LibGit2) (#4487) efe1eaf7a stop "uncompressing" registry data (#4470) ca5b0896a Improve docs for test-specific deps with workspace approach (#4490) c1fee0e60 fix relative paths in Apps for dev (#4481) e6b1d0b24 Bump version from 1.13.0 to 1.14.0 (#4485) ``` Co-authored-by: IanButterworth <1694067+IanButterworth@users.noreply.github.com>
the search can pick up after the buffer is filled further.
One use case was changed to use this. Other uses exist outside of Base.