Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Target .NET 6 #2906

Merged
merged 16 commits into from
May 5, 2022
Merged

Target .NET 6 #2906

merged 16 commits into from
May 5, 2022

Conversation

fealebenpae
Copy link
Member

@fealebenpae fealebenpae commented Apr 13, 2022

Update our NuGet package with support for net6-android and net6-ios runtimes:

  • Split the iOS wrappers into a framework for iOS and a framework for iOS Simulator. The binaries go to runtimes/ios/native and runtimes/iossimulator/native, respectively.
  • Move the Android wrappers to runtimes/android-${ABI}/native.
  • Build the Realm assembly for .NET Standard 2.0 and .NET 6. That's because the .NET 6 runtime doesn't support the dll-mapping feature of Mono we used to redirect P/Invoke to the right realm-wrappers.framework binary at runtime. .NET 6 introduces the NativeLibrary API that allows native library resolution to be controlled at runtime.
  • Split the old wrappers props file into TFM-specific props files for monoandroid, xamarinios, xamarinmac, and net461. Everything else relies on NuGet to resolve runtime-specific binaries from the right runtimes folder.

# Conflicts:
#	Tools/SetupUnityPackage/CommandLineOptions/RealmOptions.cs
#	wrappers/build-ios.ps1
#	wrappers/build-ios.sh
@fealebenpae fealebenpae self-assigned this Apr 13, 2022
@cla-bot cla-bot bot added the cla: yes label Apr 13, 2022
@coveralls
Copy link

coveralls commented Apr 19, 2022

Pull Request Test Coverage Report for Build 2190169135

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.06%) to 83.3%

Totals Coverage Status
Change from base Build 2154600608: 0.06%
Covered Lines: 5615
Relevant Lines: 6627

💛 - Coveralls

@fealebenpae fealebenpae marked this pull request as ready for review April 19, 2022 15:43
Copy link
Member

@nirinchev nirinchev left a comment

Choose a reason for hiding this comment

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

Looks like we have a failing test for string.Contains - likely due to now having that in the BCL. You'll probably need to #ifdef the StringExtenstions.Contains method as well as have the expression visitor use the system type instead.

retention-days: 1
ios:
runs-on: macos-latest
name: iOS XCframework
Copy link
Member

Choose a reason for hiding this comment

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

Are we no longer producing an xcframework?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, we ship the device framework under runtimes/ios and the simulator framework under runtimes/iossimulator.

<PackagePath>contentFiles\any\xamarinios\$(AssemblyName).dll.config</PackagePath>
<PackageCopyToOutput>true</PackageCopyToOutput>
</Content>
<Content Include="wrappers-props\xamarinios\wrappers.props" Pack="true" PackagePath="build\xamarinios\Realm.props" />
Copy link
Member

Choose a reason for hiding this comment

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

Is build/xamarinios the folder being used both for Xamarin.iOS and net6-ios TFMs?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, it's only the Xamarin.iOS TFM that uses it.

@fealebenpae fealebenpae force-pushed the yg/net6-targeting branch from ec5189b to 4accfac Compare May 4, 2022 18:00
@fealebenpae fealebenpae merged commit 441a08e into main May 5, 2022
@fealebenpae fealebenpae deleted the yg/net6-targeting branch May 5, 2022 11:26
@fealebenpae fealebenpae mentioned this pull request May 12, 2022
2 tasks
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants