Skip to content

Conversation

rolfbjarne
Copy link
Member

We already have a few attributes that can specify the native name for a type, whenever the native name doesn't match the managed name:

  • [Register ("DifferentClassName"): specifies the Objective-C class name
  • [Native ("DifferentEnumName")]: specifies the Objective-C enum name (and also that it's a native-sized enum)
  • [Protocol ("DifferentProtocolName")]: specifies the Objective-C protocol name
  • [Category ("DifferentCategoryName")]: specifies the Objective-C category name

Unfortunately this leaves (at least) two cracks:

  • Objective-C structs.
  • Objective-C enums which aren't native-sized.

So I'm adding a [NativeName] attribute for this purpose, and updating numerous
types to specify the native name (either using an existing [Native] attribute
for enums that already have one, or by adding a new [NativeName] attribute).

The static registrar needs to know the native name for such types, in case
they appear as parameter types in function signatures.

This also allows us to simplify xtro a bit, to not have a separate map of
managed name given a native name, because we can now build that map
dynamically.

…r a type (enum/struct).

We already have a few attributes that can specify the native name for a type, whenever the native name doesn't match the managed name:

* [Register ("DifferentClassName"): specifies the Objective-C class name
* [Native ("DifferentEnumName")]: specifies the Objective-C enum name (and also that it's a native-sized enum)
* [Protocol ("DifferentProtocolName")]: specifies the Objective-C protocol name
* [Category ("DifferentCategoryName")]: specifies the Objective-C category name

Unfortunately this leaves (at least) two cracks:

* Objective-C structs.
* Objective-C enums which aren't native-sized.

So I'm adding a [NativeName] attribute for this purpose, and updating numerous
types to specify the native name (either using an existing [Native] attribute
for enums that already have one, or by adding a new [NativeName] attribute).

The static registrar needs to know the native name for such types, in case
they appear as parameter types in function signatures.

This also allows us to simplify xtro a bit, to not have a separate map of
managed name given a native name, because we can now build that map
dynamically.
@rolfbjarne rolfbjarne added not-notes-worthy Ignore for release notes run-all-tests Run all our tests. skip-device-tests Skip device tests labels May 6, 2022
@vs-mobiletools-engineering-service2

This comment has been minimized.

@rolfbjarne
Copy link
Member Author

Azure DevOps Services Unavailable

😔

@vs-mobiletools-engineering-service2
Copy link
Collaborator

📋 [PR Build] API Diff 📋

API Current PR diff

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

View API diff
View dotnet API diff
View dotnet legacy API diff
View dotnet iOS-MacCatalayst API diff

API diff

✅ API Diff from stable

View API diff
View dotnet API diff
View dotnet legacy API diff
View dotnet iOS-MacCatalayst API diff

Generator diff

ℹ️ Generator Diff (please review changes)

Pipeline on Agent XAMBOT-1023.Monterey
Hash: 2bd23b5e7a3dc15f58382b6cc0ec52475138555f

@vs-mobiletools-engineering-service2
Copy link
Collaborator

📚 [CI Build] Artifacts 📚

Artifacts were not provided.

Pipeline on Agent XAMBOT-1044.Monterey'
Hash: 2bd23b5e7a3dc15f58382b6cc0ec52475138555f

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [PR Build] Tests on macOS Mac Catalina (10.15) passed 💻

All tests on macOS Mac Catalina (10.15) passed.

Pipeline on Agent
Hash: 2bd23b5e7a3dc15f58382b6cc0ec52475138555f

@vs-mobiletools-engineering-service2
Copy link
Collaborator

❌ [PR Build] Tests on macOS M1 - Mac Big Sur (11.5) failed ❌

Failed tests are:

  • linksdk
  • linkall
  • xammac_tests
  • monotouch-test

Pipeline on Agent
Hash: 2bd23b5e7a3dc15f58382b6cc0ec52475138555f

@vs-mobiletools-engineering-service2
Copy link
Collaborator

❌ [CI Build] Tests failed on VSTS: simulator tests iOS ❌

Tests failed on VSTS: simulator tests iOS.

Test results

22 tests failed, 212 tests passed.

Failed tests

  • link sdk/Mac [dotnet]/Release [dotnet]: Failed (Test run failed.
    Tests run: 117 Passed: 106 Inconclusive: 0 Failed: 1 Ignored: 10)
  • link sdk/Mac Catalyst [dotnet]/Debug [dotnet]: Failed (Test run failed.
    Tests run: 129 Passed: 119 Inconclusive: 0 Failed: 1 Ignored: 9)
  • link sdk/Mac Catalyst [dotnet]/Release [dotnet]: Failed (Test run failed.
    Tests run: 129 Passed: 118 Inconclusive: 0 Failed: 1 Ignored: 10)
  • link sdk/Mac Modern/Debug: Failed (Test run failed.
    Tests run: 9 Passed: 8 Inconclusive: 0 Failed: 1 Ignored: 0)
  • link sdk/Mac Modern/Release: Failed (Test run failed.
    Tests run: 9 Passed: 8 Inconclusive: 0 Failed: 1 Ignored: 0)
  • link sdk/iOS Unified 64-bits - simulator/Debug [dotnet]: Failed
  • link sdk/iOS Unified 64-bits - simulator/Release [dotnet]: Failed
  • link sdk/iOS Unified 64-bits - simulator/Debug: Failed
  • link sdk/iOS Unified 64-bits - simulator/Release: Failed
  • link sdk/tvOS - simulator/Debug [dotnet]: Failed
  • link sdk/tvOS - simulator/Debug: Failed
  • link sdk/tvOS - simulator/Release: Failed
  • trimmode link/Mac [dotnet]/Debug [dotnet]: Failed (Test run failed.
    Tests run: 117 Passed: 107 Inconclusive: 0 Failed: 1 Ignored: 9)
  • trimmode link/Mac [dotnet]/Release [dotnet]: Failed (Test run failed.
    Tests run: 117 Passed: 106 Inconclusive: 0 Failed: 1 Ignored: 10)
  • trimmode link/Mac Catalyst [dotnet]/Debug [dotnet]: Failed (Test run failed.
    Tests run: 129 Passed: 119 Inconclusive: 0 Failed: 1 Ignored: 9)
  • trimmode link/Mac Catalyst [dotnet]/Release [dotnet]: Failed (Test run failed.
    Tests run: 129 Passed: 118 Inconclusive: 0 Failed: 1 Ignored: 10)
  • trimmode link/iOS Unified 64-bits - simulator/Debug [dotnet]: Failed
  • trimmode link/iOS Unified 64-bits - simulator/Release [dotnet]: Failed
  • trimmode link/tvOS - simulator/Debug [dotnet]: Failed
  • trimmode link/tvOS - simulator/Release [dotnet]: Failed
  • link all/Mac Modern/Debug: Failed (Test run failed.
    Tests run: 20 Passed: 18 Inconclusive: 0 Failed: 1 Ignored: 1)
  • link all/Mac Modern/Release: Failed (Test run failed.
    Tests run: 20 Passed: 18 Inconclusive: 0 Failed: 1 Ignored: 1)

Pipeline on Agent XAMBOT-1044.Monterey'
Merge 2bd23b5 into 8074f20

@rolfbjarne
Copy link
Member Author

Test failures are all network related (https://github.com/xamarin/maccore/issues/1067).

@rolfbjarne rolfbjarne marked this pull request as ready for review May 9, 2022 19:44
Copy link
Member

@dalexsoto dalexsoto left a comment

Choose a reason for hiding this comment

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

Ahh, something to take into account this summer!

@rolfbjarne rolfbjarne merged commit f8314a4 into dotnet:main May 9, 2022
@rolfbjarne rolfbjarne deleted the native-name-attribute branch May 9, 2022 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

not-notes-worthy Ignore for release notes run-all-tests Run all our tests. skip-device-tests Skip device tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants