Switch to explicit file system Contexts - #1231
Open
Jay Bosamiya (Microsoft) (jaybosamiya-ms) wants to merge 7 commits into
Open
Switch to explicit file system Contexts#1231Jay Bosamiya (Microsoft) (jaybosamiya-ms) wants to merge 7 commits into
Contexts#1231Jay Bosamiya (Microsoft) (jaybosamiya-ms) wants to merge 7 commits into
Conversation
Member
Author
|
Again, easiest to review one commit at a time :) |
Jay Bosamiya (Microsoft) (jaybosamiya-ms)
marked this pull request as ready for review
August 27, 2026 21:03
Jay Bosamiya (Microsoft) (jaybosamiya-ms)
force-pushed
the
jayb/file-system-contexts
branch
from
August 27, 2026 22:01
17f0228 to
5af483d
Compare
|
ℹ️ Note: This semver check was run against the 🤖 SemverChecks 🤖 Click for details |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR switches the file system resolver to explicit
Contexts, so that the underlying file system(s) and the context that they are used in are separated. Essentially, this means that nothing within the file system is itself aware of CWD (current working dir) or acting user now, and theContextobject explicitly carries this. This means that the Linux shim no longer needs to maintain its owncwd: Stringfield and manipulation of it, allowing resolution + permission decisions to live in one place.Along with this, I also updated the in-mem backend to use the resolver context rather than maintain its own user management, closing out yet another place of unnecessary duplication and potential inconsistency.
Finally, as a drive-by fix:
getcwdno longer returns a trailing/, making it more consistent with Linux.