Skip to content

[FSKit] Update bindings up to Xcode 27.0 Beta 3#26163

Open
dalexsoto wants to merge 1 commit into
xcode27.0from
dev/alex/xc27-FSKit
Open

[FSKit] Update bindings up to Xcode 27.0 Beta 3#26163
dalexsoto wants to merge 1 commit into
xcode27.0from
dev/alex/xc27-FSKit

Conversation

@dalexsoto

Copy link
Copy Markdown
Member

Summary

  • Bind the new macOS 27 FSVolume handler protocols, result types, context, free-space, and cache-coherency APIs.
  • Add FSClient mounting/settings APIs and a nullable factory for the failable FSEntityIdentifier qualifier-data initializer.
  • Remove the resolved FSKit xtro todo, update the documentation baseline, and add focused factory coverage.

Validation

  • make world
  • Clean xtro generation/classification and sanity
  • Clean cecil test suite
  • macOS introspection: 32 passed
  • Mac Catalyst introspection: 39 passed
  • Focused FSKit monotouch tests: 1 passed, 1 runtime-gated on macOS 27
  • Clean AppSizeTest run: 16 expected skips on beta Xcode

iOS and tvOS introspection were also exercised; their remaining failures are pre-existing Xcode 27 Beta 3 UIKit/AVFoundation runtime gaps unrelated to FSKit.

Bind the macOS 27 FSVolume handler protocols and their result types, including subclass-specific requested-attribute dispatch and the new data-cache and coherency APIs.

Add the FSClient mounting and settings APIs, FSContext and FSFreeSpace support, the failable FSEntityIdentifier factory, and focused factory tests. Remove the resolved xtro todo and update the FSKit documentation baseline.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3358f406-d18f-40bf-b789-86517fea0312
Copilot AI review requested due to automatic review settings July 17, 2026 04:12
@dalexsoto dalexsoto added this to the xcode27 milestone Jul 17, 2026
@dalexsoto
dalexsoto requested a review from rolfbjarne July 17, 2026 04:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the FSKit bindings to match macOS 27 / Xcode 27 Beta 3, expanding the bound API surface (protocol handlers, result types, data-cache/coherency APIs) and adding a safe nullable factory for a failable FSEntityIdentifier initializer.

Changes:

  • Added new macOS 27 FSKit bindings (protocols, result classes, enums, and new FSClient/FSVolume APIs) in src/fskit.cs.
  • Introduced FSEntityIdentifier.Create(...) as a nullable factory wrapping the failable qualifier-data initializer, plus a focused monotouch test.
  • Removed the resolved xtro todo and updated the documentation known-failures baseline for the newly bound API surface.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/xtro-sharpie/api-annotations-dotnet/macOS-FSKit.todo Removed resolved FSKit xtro todo entries.
tests/monotouch-test/FSKit/FSEntityIdentifierTest.cs Adds targeted runtime-gated coverage for the new nullable Create factory behavior.
tests/cecil-tests/Documentation.KnownFailures.txt Updates doc baseline to include newly introduced FSKit members/enums.
src/FSKit/FSEntityIdentifier.cs Adds a nullable Create factory wrapping the failable qualifier-data initializer.
src/fskit.cs Binds macOS 27 FSKit API additions (protocol handlers, results, enums, and new FSClient/FSVolume members).
src/frameworks.sources Includes the new FSKit partial source file in the build.

@dalexsoto
dalexsoto enabled auto-merge (squash) July 17, 2026 05:22
@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

✅ API diff for current PR / commit

NET (empty diffs)

✅ API diff vs stable

NET (empty diffs)

ℹ️ Generator diff

Generator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes)

Pipeline on Agent
Hash: 6d4a9264a334c2eb73ee481f237dffe9fe8f2ffd [PR build]

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

🔥 [CI Build #6d4a926] Test results 🔥

Test results

❌ Tests failed on VSTS: test results

2 tests crashed, 0 tests failed, 171 tests passed.

Failures

❌ monotouch tests (tvOS)

🔥 Failed catastrophically on VSTS: test results - monotouch_tvos (no summary found).

Html Report (VSDrops) Download

❌ Tests on macOS Sonoma (14) tests

🔥 Failed catastrophically on VSTS: test results - mac_sonoma (no summary found).

Html Report (VSDrops) Download

Successes

✅ assembly-processing: All 1 tests passed. Html Report (VSDrops) Download
✅ cecil: All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (iOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (MacCatalyst): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (macOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (Multiple platforms): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (tvOS): All 1 tests passed. Html Report (VSDrops) Download
✅ framework: All 2 tests passed. Html Report (VSDrops) Download
✅ fsharp: All 4 tests passed. Html Report (VSDrops) Download
✅ generator: All 5 tests passed. Html Report (VSDrops) Download
✅ interdependent-binding-projects: All 4 tests passed. Html Report (VSDrops) Download
✅ introspection: All 6 tests passed. Html Report (VSDrops) Download
✅ linker (iOS): All 15 tests passed. Html Report (VSDrops) Download
✅ linker (MacCatalyst): All 15 tests passed. Html Report (VSDrops) Download
✅ linker (macOS): All 21 tests passed. Html Report (VSDrops) Download
✅ linker (tvOS): All 15 tests passed. Html Report (VSDrops) Download
✅ monotouch (iOS): All 19 tests passed. Html Report (VSDrops) Download
✅ monotouch (MacCatalyst): All 18 tests passed. Html Report (VSDrops) Download
✅ monotouch (macOS): All 19 tests passed. Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. Html Report (VSDrops) Download
✅ sharpie: All 1 tests passed. Html Report (VSDrops) Download
✅ windows: All 3 tests passed. Html Report (VSDrops) Download
✅ xcframework: All 4 tests passed. Html Report (VSDrops) Download
✅ xtro: All 1 tests passed. Html Report (VSDrops) Download

macOS tests

✅ Tests on macOS Sequoia (15): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Tahoe (26): All 5 tests passed. Html Report (VSDrops) Download
⚠️ Tests on macOS Golden Gate (27): Tests skipped, incorrect beta version. Html Report (VSDrops) Download

Linux Build Verification

Linux build succeeded

Pipeline on Agent
Hash: 6d4a9264a334c2eb73ee481f237dffe9fe8f2ffd [PR build]

Comment on lines +12 to +27
[SupportedOSPlatform ("macos27.0")]
public static FSEntityIdentifier? Create (NSUuid uuid, NSData qualifierData)
{
if (uuid is null)
ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (uuid));
if (qualifierData is null)
ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (qualifierData));

var rv = new FSEntityIdentifier (NSObjectFlag.Empty);
rv.InitializeHandle (rv._InitWithUuidQualifierData (uuid, qualifierData), "initWithUUID:qualifierData:", false);
if (rv.Handle == NativeHandle.Zero) {
rv.Dispose ();
return null;
}
return rv;
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot This is fairly frequent pattern, we should try to figure out a way to define this in the api definition and have bgen generate the correct code.

One idea could be to define a [FactoryMethod ("Create")]:

[Export ("initWithUUID:qualifierData:")]
[FactoryMethod ("Create")]
NativeHandle Constructor (NSUuid uuid, NSData qualifierData);

another could be to define a [Constructor] attribute:

[Export ("initWithUUID:qualifierData:")]
[Constructor]
NativeHandle Create (NSUuid uuid, NSData qualifierData);

although the [Constructor] attribute might be redundant, given that all "init*" selectors are constructors (or is this not true?)? So maybe we could use the selector (instead of the "Constructor" name) to determine whether an api definition is a constructor or not?

In any case, file an issue about this so we can look into it and decide on a design.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Filed #26167 to track adding [FactoryMethod] (or an alternative design) to bgen so this boilerplate can be generated automatically. The issue captures both design options you described, lists the existing occurrences of the pattern across the codebase, and calls out the open questions (attribute vs. naming convention, distinguishing failable vs. non-failable init* selectors, platform availability propagation).

public void Create ()
{
TestRuntime.AssertXcodeVersion (27, 0);
TestRuntime.AssertSystemVersion (ApplePlatform.MacOSX, 27, 0);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NBD but the AssertSystemVersion call is redundant, that's covered by the AssertXcodeVersion csll.

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.

5 participants