Skip to content

Bump System.IO.Abstractions and System.IO.Abstractions.TestingHelpers - #4414

Closed
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/nuget/system-io-abstractions-25d8da4ee5
Closed

dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/nuget/system-io-abstractions-25d8da4ee5

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Pinned System.IO.Abstractions at 22.3.0.

Release notes

Sourced from System.IO.Abstractions's releases.

22.3.0

What's Changed

Full Changelog: TestableIO/System.IO.Abstractions@v22.2.0...v22.3.0

Commits viewable in compare view.

Pinned System.IO.Abstractions.TestingHelpers at 22.3.0.

Release notes

Sourced from System.IO.Abstractions.TestingHelpers's releases.

22.3.0

What's Changed

Full Changelog: TestableIO/System.IO.Abstractions@v22.2.0...v22.3.0

Commits viewable in compare view.

@dependabot
dependabot Bot requested a review from a team as a code owner October 12, 2026 23:48
@dependabot dependabot Bot added the chore label Oct 12, 2026
@dependabot
dependabot Bot requested a review from Mpdreamz October 12, 2026 23:48
@dependabot dependabot Bot added the chore label Oct 12, 2026
@akira28

akira28 commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

@dependabot rebase

@dependabot @github

dependabot Bot commented on behalf of github Oct 27, 2026

Copy link
Copy Markdown
Contributor Author

Looks like this PR has been edited by someone other than Dependabot. That means Dependabot can't rebase it - sorry!

If you're happy for Dependabot to recreate it from scratch, overwriting any edits, you can request @dependabot recreate.

@akira28

akira28 commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

@dependabot recreate

@dependabot dependabot Bot changed the title Bump the system-io-abstractions group with 2 updates Bump System.IO.Abstractions and System.IO.Abstractions.TestingHelpers Oct 27, 2026
@dependabot
dependabot Bot force-pushed the dependabot/nuget/system-io-abstractions-25d8da4ee5 branch from 4c040b4 to 5787143 Compare October 27, 2026 07:11
@dependabot
dependabot Bot force-pushed the dependabot/nuget/system-io-abstractions-25d8da4ee5 branch from 5787143 to 90fdda0 Compare October 27, 2026 10:01
Mpdreamz pushed a commit to nullean/scoped-filesystem that referenced this pull request Oct 27, 2026
This implements the two members that System.IO.Abstractions 22.3.0 adds,
so `ScopedFileSystem` loads again with that version. Fixes #14.

@Mpdreamz this is ready for your review.

**Prompt summary:** Fix the `TypeLoadException` that
`Nullean.ScopedFileSystem` 0.4.2 throws with System.IO.Abstractions
22.3.0, so consumers such as docs-builder can take the dependency bump.

## Why

System.IO.Abstractions 22.3.0 adds `IFileSystem.RandomAccess` and
`IFile.OpenHandle` for net9.0 and later. 0.4.2 implements neither, and
its dependency range `[22.1.0, )` lets NuGet resolve 22.3.0. Creating a
`ScopedFileSystem` then throws `TypeLoadException` for
`get_RandomAccess`. Dependabot's bump in
[elastic/docs-builder#4414](elastic/docs-builder#4414)
fails 290 tests because of it.

## What

#### OpenHandle
`ScopedFile.OpenHandle` runs the same path validation as the other
`Open` methods, then calls the inner file. An out-of-scope path throws
`ScopedFileSystemException` before a handle opens.

#### RandomAccess
`ScopedFileSystem.RandomAccess` returns the inner implementation. Its
methods take a `SafeFileHandle`, never a path, so a caller can only use
a handle that `OpenHandle` already validated. Both members compile only
for `NET9_0_OR_GREATER`, where the interface declares them.

#### Package version
`Directory.Packages.props` moves System.IO.Abstractions and its
TestingHelpers to 22.3.0. The published package then requires `[22.3.0,
)` on every target framework.

**Breaking:** Consumers on System.IO.Abstractions 22.2.0 or earlier must
update to 22.3.0 when they take this version. The net9.0 and net10.0
builds reference types that older versions lack, so a lower bound would
only trade one `TypeLoadException` for another.

**Out of scope:** `RandomAccess` does not wrap the inner implementation
to add checks. A handle obtained outside `ScopedFileSystem` is already
open and cannot be scoped after the fact.

## Verify

```bash
dotnet test
```

All 114 tests pass, including a new `OpenHandle_FileOutsideScope_Throws`
and `RandomAccess_ReturnsInnerRandomAccess`. No test covers an in-scope
`OpenHandle` call; I did not try it against `MockFileSystem` or a real
directory.

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Bumps System.IO.Abstractions from 22.2.0 to 22.3.0
Bumps System.IO.Abstractions.TestingHelpers from 22.2.0 to 22.3.0

---
updated-dependencies:
- dependency-name: System.IO.Abstractions
  dependency-version: 22.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: system-io-abstractions
- dependency-name: System.IO.Abstractions.TestingHelpers
  dependency-version: 22.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: system-io-abstractions
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot
dependabot Bot force-pushed the dependabot/nuget/system-io-abstractions-25d8da4ee5 branch from 90fdda0 to 596c5ae Compare October 27, 2026 11:08
@dependabot @github

dependabot Bot commented on behalf of github Oct 27, 2026

Copy link
Copy Markdown
Contributor Author

Looks like these dependencies are no longer updatable, so this is no longer needed.

@dependabot dependabot Bot closed this Oct 27, 2026
@dependabot
dependabot Bot deleted the dependabot/nuget/system-io-abstractions-25d8da4ee5 branch October 27, 2026 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant