mark FileStream.Lock and Unlock as unsupported on macOS#47040
mark FileStream.Lock and Unlock as unsupported on macOS#47040adamsitnik merged 4 commits intodotnet:masterfrom
Conversation
| LockInternal(position, length); | ||
| } | ||
|
|
||
| [UnsupportedOSPlatform("macos")] |
There was a problem hiding this comment.
Presumably the ref needs to be updated, too?
There was a problem hiding this comment.
Also, what about overrides? e.g. IsolatedStorageFileStream.Lock/Unlock?
There was a problem hiding this comment.
@stephentoub excellent points (as usual). I've added missing attributes (ref & overrides) PTAL
There was a problem hiding this comment.
I am sorry, I've missed the VB files... let me fix the build and get back to you
|
The CI failures come from #47374, the PR should be ready for review |
| End Sub | ||
|
|
||
| <UnsupportedOSPlatform("macos")> | ||
| Public Function InputString(ByVal FileNumber As Integer, ByVal CharCount As Integer) As String |
There was a problem hiding this comment.
I wonder if this API's area owner would prefer to reduce the aggressiveness of marking the whole platform as unsupported, and instead only calling oFile.Lock() and oFile.Unlock() when the platform is not MacOS.
There was a problem hiding this comment.
As far as I know, mono team has a story for adding more attributes for mac/android/ios, they might want to see this changes cc @marek-safar
There was a problem hiding this comment.
That story is for SDKs but we are going to audit libraries as well during #47910 work
carlossanlop
left a comment
There was a problem hiding this comment.
LGTM given that all the unit tests are failing with unrelated failures.
the both call methods that throw on macOS:
runtime/src/libraries/System.Private.CoreLib/src/System/IO/FileStream.Lock.OSX.cs
Lines 8 to 16 in 911b1d3