Skip to content

Further improve IO, enable multiple backends without -D.#148

Merged
copybara-service[bot] merged 1 commit intodevfrom
test_625966276
Apr 19, 2024
Merged

Further improve IO, enable multiple backends without -D.#148
copybara-service[bot] merged 1 commit intodevfrom
test_625966276

Conversation

@copybara-service
Copy link

@copybara-service copybara-service bot commented Apr 18, 2024

Further improve IO, enable multiple backends without -D.

Move Path into io.h and use for opening files.
Removes dependency of gemma_lib on args.
Separate Windows codepath instead of emulating POSIX functions.

Plus lint fixes.

@copybara-service copybara-service bot force-pushed the test_625966276 branch 8 times, most recently from 5d0e06d to c4107cc Compare April 18, 2024 13:55
@copybara-service copybara-service bot changed the title Further improve IO, enable multiple backend without -D. Further improve IO, enable multiple backends without -D. Apr 18, 2024
@enum-class
Copy link
Contributor

enum-class commented Apr 19, 2024

I am curious, would it be better to use the filesystem library instead of this approach ?

@jan-wassenberg
Copy link
Member

:) Yes, that has a very full-featured path class, but a goal of this CL is to enable access to nonlocal storage, which requires a separate (and not open sourced because it's Google-specific) implementation of our File(), and that Path::Exists uses that.

Move Path into io.h and use for opening files.
Removes dependency of gemma_lib on args.
Separate Windows codepath instead of emulating POSIX functions.

Plus lint fixes.

PiperOrigin-RevId: 626279004
@copybara-service copybara-service bot merged commit e9a0cae into dev Apr 19, 2024
@copybara-service copybara-service bot deleted the test_625966276 branch April 19, 2024 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants