Skip to content

Add new RID for Catalyst #47518

Closed
Closed

Description

@marek-safar

We need to introduce new Catalyst RIDs to be able to build Catalyst runtime packs. I propose we add the following new RIDs to support them inheriting from iOS RID.

maccatalyst-arm64
maccatalyst-arm64-13
maccatalyst-arm64-14
maccatalyst-x64
maccatalyst-x64-13
maccatalyst-x64-14

I went with a simple catalyst instead of macOSCatalyst as it's very long and it runs on iPadOS as well.

@steveisok @terrajobst

Activity

  1. ghost added
    untriagedNew issue has not been triaged by the area owner
    on Jan 27, 2021
  2. added and removed
    untriagedNew issue has not been triaged by the area owner
    on Jan 27, 2021
  3. added this to the 6.0.0 milestone on Jan 27, 2021
  4. added a commit that references this issue on Jan 29, 2021
  5. ghost added
    in-prThere is an active PR which will close this issue when it is merged
    on Jan 29, 2021
  6. akoeplinger commented on Jan 31, 2021

    @akoeplinger
    Member

    I went with a simple catalyst instead of macOSCatalyst as it's very long and it runs on iPadOS as well.

    That's not the case, a Catalyst app doesn't run on iPadOS, it just supports the same APIs running on macOS and is usually used to port iPad apps to the Mac.

    The official name is Mac Catalyst (see https://developer.apple.com/documentation/xcode/creating_a_mac_version_of_your_ipad_app) so I wonder if we should call the RID maccatalyst. I don't feel strongly though.

  7. steveisok commented on Jan 31, 2021

    @steveisok
    Member

    The problem with maccatalyst is that it's too long. That said, I do like it better.

  8. bramborman commented on Jan 31, 2021

    @bramborman

    While longer, it clearly states that it belongs to the Apple/Mac ecosystem. The shorter catalyst may be harder to categorize for devs not familiar with Apple.

  9. marek-safar commented on Feb 1, 2021

    @marek-safar
    ContributorAuthor

    I think maccatalyst would work too but it'd be the longest rid to have. All the existing names are much shorted (e.g. sles, tvos, ol, etc).

  10. steveisok commented on Feb 1, 2021

    @steveisok
    Member

    What about maccat to keep it short?

  11. ericstj commented on Feb 1, 2021

    @ericstj
    Member

    a Catalyst app doesn't run on iPadOS, it just supports the same APIs running on macOS and is usually used to port iPad apps to the Mac.

    In that case, should this derive from OSX instead of Unix? We have a few places where we build a configuration of a library for OSX. Here's a couple:
    https://github.com/dotnet/runtime/blob/b37f10a504f20faef2558b6d79180411ad0603c3/src/libraries/System.Security.Cryptography.X509Certificates/src/System.Security.Cryptography.X509Certificates.csproj
    https://github.com/dotnet/runtime/blob/c58e45c9bfe63e0e6dc950eb9242507cb53841df/src/libraries/System.IO.FileSystem.Watcher/src/System.IO.FileSystem.Watcher.csproj

    It sounds like we're going to need to artificially cross-compile these now in order to deliver the right implementation on catalyst. I can imagine customer code which pinvokes to platform API needing to do the same.

  12. 5 remaining items

  13. akoeplinger commented on Feb 2, 2021

    @akoeplinger
    Member

    to make it clear that maccatalyst TFM serves a different purpose and it's not needed for maccat

    I think from an end-user point of view the purpose is the same ("I want to target Mac Catalyst with managed/native assets") so I don't think we should make a distinction there.

  14. ericstj commented on Feb 2, 2021

    @ericstj
    Member

    Catalyst is, at least from a build perspective, the iOS API running on macOS libraries.

    I see, I had that backwards. In that case should it derive from the iOS RID?

    the RID is mostly concerned about native binary compatibility

    It is not. It's meant for both native binaries and assemblies. It's meant to model both platform API and native binary compatibility, to allow as much asset reuse as possible. RID hierarchy is entirely pragmatic: it's whatever we find most useful. The one thing it must be is internal; RID's cannot influence compile time behavior, so they cannot be used to model platform specific public API. That's where the TFM (and TFM+TPM) is different, since that's specifically about exposing and extending platform specific public API.

    @ericstj any thoughts on the naming?

    I know we regretted using win instead of windows. For more recent RID additions we've tried to avoid abbreviations, especially homegrown ones. I tried searching for both maccatalyst vs maccat. The former had a bunch of relevant results, the latter gave me information on a particular model of chainsaw.
    image
    I don't think we need to care too much about confusion between RID and TPM. Folks are going to confuse those regardless of the values. Context is what matters there. cc @terrajobst

  15. akoeplinger commented on Feb 2, 2021

    @akoeplinger
    Member

    the RID is mostly concerned about native binary compatibility

    It is not. It's meant for both native binaries and assemblies. It's meant to model both platform API and native binary compatibility, to allow as much asset reuse as possible.

    Sure but it seems to be rare to use it for managed RID-specific assets, more common are native binaries. The only matches for the former I have in my NuGet packages cache are Microsoft.* and System.* ones :)

    If NuGet authors are mainly using it for native binaries then it'd probably make sense to not derive maccatalyst from ios since the native ABI isn't compatible.

  16. directhex commented on Feb 2, 2021

    @directhex
    Contributor

    the RID is mostly concerned about native binary compatibility

    It is not. It's meant for both native binaries and assemblies. It's meant to model both platform API and native binary compatibility, to allow as much asset reuse as possible.

    Sure but it seems to be rare to use it for managed RID-specific assets, more common are native binaries. The only matches for the former I have in my NuGet packages cache are Microsoft.* and System.* ones :)

    If NuGet authors are mainly using it for native binaries then it'd probably make sense to not derive maccatalyst from ios since the native ABI isn't compatible.

    What about the mobile case? Surely Catalyst can consume iOS managed nugets? Aren't there a whole bunch of Xamarin components out there?

  17. akoeplinger commented on Feb 2, 2021

    @akoeplinger
    Member

    The existing Xamarin.iOS nugets don't use the RID setup so they'd be pulled in because of the compatibility mappings that will be defined as part of dotnet/designs#174

  18. steveisok commented on Feb 2, 2021

    @steveisok
    Member

    If NuGet authors are mainly using it for native binaries then it'd probably make sense to not derive maccatalyst from ios since the native ABI isn't compatible.

    Yeah, I think it makes sense to derive from unix then.

  19. ericstj commented on Feb 2, 2021

    @ericstj
    Member

    Sure but it seems to be rare to use it for managed RID-specific assets, more common are native binaries. The only matches for the former I have in my NuGet packages cache are Microsoft.* and System.*

    You can use Kusto to do a more scientific query. We shouldn't discount our own packages. Those packages are going to grow because of this with a redundant copy of the binary.

    If NuGet authors are mainly using it for native binaries then it'd probably make sense to not derive maccatalyst from ios since the native ABI isn't compatible.

    Yeah, I think it makes sense to derive from unix then.

    Native binaries work with either parenting, since maccatalyst will be more specific. Managed binary reuse only works if you parent from iOS.

  20. ericstj commented on Feb 3, 2021

    @ericstj
    Member

    Just to restate the tradeoff here:

    1. Parenting to unix:
    • Pro: failure behavior of ios package is file not found.
    • Con: Packages which build ios runtime specific binaries will need to duplicate assets.
    1. Parenting to ios :
    • Pro: binary reuse of managed ios assemblies.
    • Con: failure behavior with an ios package is some form of load failure.

    IMHO option 2 enables a scenario without really losing anything meaningful. We also have precedent for this in linux-musl deriving from linux.

  21. steveisok commented on Feb 3, 2021

    @steveisok
    Member

    @ericstj Thanks for breaking it down like that. It doesn't seem like there's harm in deriving from ios.

  22. added a commit that references this issue on Feb 3, 2021
  23. ghost removed
    in-prThere is an active PR which will close this issue when it is merged
    on Feb 3, 2021
  24. ghost locked as resolved and limited conversation to collaborators on Mar 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions