Repository navigation
feat!: replace strategy interfaces with abstract base classes - #1178
Merged
Merged
Conversation
Test Results 80 files ± 0 80 suites ±0 1h 39m 35s ⏱️ -11s Results for commit b3624db. ± Comparison against base commit 8feb783. This pull request removes 84598 and adds 84595 tests. Note that renamed tests count towards both.This pull request removes 4666 skipped tests and adds 4662 skipped tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
|
This pull request is merged. |
vbreuss
marked this pull request as draft
November 1, 2026 16:14
vbreuss
force-pushed
the
feat/strategy-base-classes
branch
from
November 1, 2026 19:01
8bb7db2 to
329eaf8
Compare
vbreuss
marked this pull request as ready for review
November 1, 2026 19:01
vbreuss
enabled auto-merge (squash)
November 1, 2026 19:06
A strategy interface cannot gain members without breaking every implementer, which already forced a wrapper for `IAccessControlStrategy` to pass the `AccessRequest`. Abstract base classes can grow with virtual members, so the next major version replaces `IAccessControlStrategy`, `IUnixFileModeStrategy` and `ISafeFileHandleStrategy` with `AccessControlStrategy`, `UnixFileModeStrategy` and `SafeFileHandleStrategy`. The Unix file mode strategy now also receives the `AccessRequest`, so it can grow consistently with the access control strategy. The two-argument callback of `DefaultAccessControlStrategy` is removed to keep a single way to configure it.
vbreuss
force-pushed
the
feat/strategy-base-classes
branch
from
November 1, 2026 20:09
329eaf8 to
b3624db
Compare
|
|
This is addressed in release v8.0.0. |
This was referenced Nov 11, 2026
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.



A strategy interface cannot gain members without breaking every implementer, which already forced a wrapper for
IAccessControlStrategyto pass theAccessRequest. Abstract base classes can grow with virtual members, so the next major version replaces the file system strategy interfaces with abstract base classes.Key changes
IAccessControlStrategyis removed;AccessControlStrategyno longer implements it andWithAccessControlStrategytakes anAccessControlStrategyIUnixFileModeStrategybecameUnixFileModeStrategy;OnSetUnixFileModeis virtual and does nothing by defaultISafeFileHandleStrategybecameSafeFileHandleStrategyUnixFileModeStrategy.IsAccessGrantedreceives anAccessRequestinstead of theFileAccess, so it can grow consistently with the access control strategy; deleting is still not checked by this strategyDefaultAccessControlStrategywith a two-argument callback, to keep a single way to configure itBreaking changes
AccessControlStrategy,UnixFileModeStrategyorSafeFileHandleStrategyandoverridetheir members instead of implementing an interfaceUnixFileModeStrategyreads the requested access fromrequest.Accessnew DefaultAccessControlStrategy((path, extensibility) => ...)becomesnew DefaultAccessControlStrategy((path, extensibility, _) => ...)