-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Change some exception types thrown in Tar APIs #74845
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Tagging subscribers to this area: @dotnet/area-system-io Issue DetailsAs discussed here: #74786 (comment) @danmoseley would you approve this exception type change for RC2?
|
src/libraries/System.Formats.Tar/src/System/Formats/Tar/TarEntry.cs
Outdated
Show resolved
Hide resolved
Yes as getting the API right is important. We do have upstack dependencies (the new docker tooling) but presumably not relying on this error path. |
…or called by all other public conversion constructors. Add missing test gap.
…ble exception should be ArgumentException.
…passed an unreadable stream.
…o ArgumentException.
…stream. Add missing exception docs.
…, adjust docs and tests.
src/libraries/System.Formats.Tar/src/System/Formats/Tar/PaxTarEntry.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Formats.Tar/src/System/Formats/Tar/TarEntry.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Formats.Tar/src/System/Formats/Tar/TarEntry.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Formats.Tar/src/System/Formats/Tar/TarEntry.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Formats.Tar/src/System/Formats/Tar/TarFile.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Formats.Tar/src/System/Formats/Tar/TarFile.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Formats.Tar/src/System/Formats/Tar/TarFile.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Formats.Tar/src/System/Formats/Tar/TarHelpers.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Formats.Tar/src/System/Formats/Tar/TarReader.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Formats.Tar/src/System/Formats/Tar/TarWriter.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Formats.Tar/tests/TarReader/TarReader.Tests.cs
Outdated
Show resolved
Hide resolved
|
runtime/src/libraries/System.Formats.Tar/src/System/Formats/Tar/TarHeader.Read.cs Line 416 in e5058f6
@bartonjs, this is thrown when TarReader.GetNextEntry() steps into a sparse file, but AFAIK, NotSupportedException is for members that you choose not to support in your type. Do you know if a better exception could be thrown here?
|
…ser tries to set an empty string. Add tests.
|
There's certainly prior art for throwing FWIW: I feel like I saw places that were using |
|
@bartonjs not tackled yet but I can change them if that exception type is preferred. |
src/libraries/System.Formats.Tar/tests/TarReader/TarReader.Tests.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Formats.Tar/tests/TarEntry/PaxTarEntry.Conversion.Tests.cs
Outdated
Show resolved
Hide resolved
jozkee
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise, LGTM.
|
/backport to release/7.0 |
|
Started backporting to release/7.0: https://github.com/dotnet/runtime/actions/runs/2967038898 |
|
CI failures are unrelated infra problems. |
As discussed here: #74786 (comment)
@bartonjs @jozkee
@danmoseley would you approve this exception type change for RC2? Edit: Dan said yes :)