Skip to content

Commit

Permalink
[AppKit] Make the files containing enums API source files instead of …
Browse files Browse the repository at this point in the history
…Core source files. (#12191)

This makes it easier to include/exclude certain enums in Mac Catalyst (since
we can use [NoMacCatalyst] instead of littering the files with "#if
MACCATALYST").

It required moving a little bit of unrelated code out of the enums source
files, but this is a much smaller change than moving all of the enums out of
these files (see #12185 for how that ends up).
  • Loading branch information
rolfbjarne authored Jul 23, 2021
1 parent a010778 commit 28bb8bc
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
9 changes: 9 additions & 0 deletions src/AppKit/Compat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,13 @@ public virtual void SetTextLists (NSTextList[] array)
}
#endif
}

#if !XAMCORE_4_0
public static class NSFileTypeForHFSTypeCode
{
public static readonly string ComputerIcon = "root";
public static readonly string DesktopIcon = "desk";
public static readonly string FinderIcon = "FNDR";
}
#endif
}
9 changes: 0 additions & 9 deletions src/AppKit/Enums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2096,15 +2096,6 @@ public enum NSPopUpArrowPosition : ulong {
Bottom
}

#if !XAMCORE_4_0
public static class NSFileTypeForHFSTypeCode
{
public static readonly string ComputerIcon = "root";
public static readonly string DesktopIcon = "desk";
public static readonly string FinderIcon = "FNDR";
}
#endif

// FileType 4cc values to use with NSFileTypeForHFSTypeCode.
public enum HfsTypeCode : uint
{
Expand Down
6 changes: 4 additions & 2 deletions src/frameworks.sources
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,12 @@ ADSUPPORT_SOURCES = \

# AppKit

APPKIT_CORE_SOURCES = \
AppKit/Defs.cs \
APPKIT_API_SOURCES = \
AppKit/Enums.cs \
AppKit/XEnums.cs \

APPKIT_CORE_SOURCES = \
AppKit/Defs.cs \
AppKit/NSAccessibility.cs \
XKit/Types.cs \
XKit/XKitCompat.cs \
Expand Down

7 comments on commit 28bb8bc

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

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

❌ [CI Build] Tests failed on Build ❌

Tests failed on Build.

API diff

✅ API Diff from stable

View API diff

API & Generator diff

API Diff (from PR only) (no change)
ℹ️ Generator Diff (please review changes)

Packages generated

View packages

Test results

38 tests failed, 186 tests passed.

Failed tests

  • monotouch-test/Mac Catalyst/Debug [dotnet]: Failed (Tests run: 2629 Passed: 2486 Inconclusive: 35 Failed: 2 Ignored: 141)
  • monotouch-test/iOS Unified 64-bits - simulator/Debug: TimedOut
  • monotouch-test/iOS Unified 64-bits - simulator/Debug [dotnet]: TimedOut
  • monotouch-test/iOS Unified 64-bits - simulator/Debug (LinkSdk): TimedOut
  • monotouch-test/iOS Unified 64-bits - simulator/Debug (static registrar): TimedOut
  • monotouch-test/iOS Unified 64-bits - simulator/Release (all optimizations): TimedOut
  • monotouch-test/iOS Unified 64-bits - simulator/Debug (all optimizations): TimedOut
  • monotouch-test/iOS Unified 64-bits - simulator/Debug (LinkSdk) [dotnet]: TimedOut
  • monotouch-test/iOS Unified 64-bits - simulator/Debug (static registrar) [dotnet]: TimedOut
  • monotouch-test/iOS Unified 64-bits - simulator/Release (all optimizations) [dotnet]: TimedOut
  • monotouch-test/iOS Unified 64-bits - simulator/Debug (all optimizations) [dotnet]: TimedOut
  • dont link/iOS Unified 64-bits - simulator/Debug: TimedOut
  • dont link/iOS Unified 64-bits - simulator/Release: TimedOut
  • dont link/iOS Unified 64-bits - simulator/Debug [dotnet]: TimedOut
  • dont link/iOS Unified 64-bits - simulator/Release [dotnet]: TimedOut
  • link all/iOS Unified 64-bits - simulator/Debug: TimedOut
  • link all/iOS Unified 64-bits - simulator/Release: TimedOut
  • link all/iOS Unified 64-bits - simulator/Debug [dotnet]: TimedOut
  • link all/iOS Unified 64-bits - simulator/Release [dotnet]: TimedOut
  • link sdk/iOS Unified 64-bits - simulator/Debug: TimedOut
  • link sdk/iOS Unified 64-bits - simulator/Release: TimedOut
  • link sdk/iOS Unified 64-bits - simulator/Debug [dotnet]: TimedOut
  • link sdk/iOS Unified 64-bits - simulator/Release [dotnet]: TimedOut
  • mono-native-compat/iOS Unified 64-bits - simulator/Debug: TimedOut
  • mono-native-compat/iOS Unified Today Extension 64-bits - simulator/Debug: TimedOut
  • mono-native-unified/iOS Unified 64-bits - simulator/Debug: TimedOut
  • mono-native-unified/iOS Unified Today Extension 64-bits - simulator/Debug: TimedOut
  • [NUnit] Mono BCL tests group 1/iOS Unified 64-bits - simulator/Debug: TimedOut
  • [NUnit] Mono BCL tests group 2/iOS Unified 64-bits - simulator/Debug: TimedOut
  • [xUnit] Mono BCL tests group 3/iOS Unified 64-bits - simulator/Debug: TimedOut
  • [xUnit] Mono BCL tests group 4/iOS Unified 64-bits - simulator/Debug: TimedOut
  • [xUnit] Mono BCL tests group 5/iOS Unified 64-bits - simulator/Debug: TimedOut
  • mscorlib Part 1/iOS Unified 64-bits - simulator/Debug: TimedOut
  • mscorlib Part 2/iOS Unified 64-bits - simulator/Debug: TimedOut
  • mscorlib Part 3/iOS Unified 64-bits - simulator/Debug: TimedOut
  • [xUnit] Mono SystemCoreXunit Part 1/iOS Unified 64-bits - simulator/Debug: TimedOut
  • [xUnit] Mono SystemCoreXunit Part 2/iOS Unified 64-bits - simulator/Debug: TimedOut
  • [xUnit] Mono SystemXunit/iOS Unified 64-bits - simulator/Debug: TimedOut

Pipeline on Agent XAMBOT-1035.BigSur'
[AppKit] Make the files containing enums API source files instead of Core source files. (#12191)

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

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

🔥 Tests failed catastrophically on VSTS: device tests tvOS 🔥

Not enough free space in the host.

Pipeline on Agent
[AppKit] Make the files containing enums API source files instead of Core source files. (#12191)

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

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

⚠️ Tests were not ran (VSTS: device tests tvOS). ⚠️

Results were skipped for this run due to provisioning problems Azure Devops. Please contact the bot administrator.

Pipeline on Agent
[AppKit] Make the files containing enums API source files instead of Core source files. (#12191)

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

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

✅ Tests passed on macOS Mac Catalina (10.15) ✅

Tests passed

All tests on macOS X Mac Catalina (10.15) passed.

Pipeline on Agent
[AppKit] Make the files containing enums API source files instead of Core source files. (#12191)

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

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

⚠️ Tests were not ran (VSTS: device tests iOS). ⚠️

Results were skipped for this run due to provisioning problems Azure Devops. Please contact the bot administrator.

Pipeline on Agent
[AppKit] Make the files containing enums API source files instead of Core source files. (#12191)

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

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

✅ Tests passed on macOS Mac Mojave (10.14) ✅

Tests passed

All tests on macOS X Mac Mojave (10.14) passed.

Pipeline on Agent
[AppKit] Make the files containing enums API source files instead of Core source files. (#12191)

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

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

✅ Tests passed on macOS Mac High Sierra (10.13) ✅

Tests passed

All tests on macOS X Mac High Sierra (10.13) passed.

Pipeline on Agent
[AppKit] Make the files containing enums API source files instead of Core source files. (#12191)

Please sign in to comment.