Skip to content

Commit

Permalink
Merge branch 'main' into Nullable-Metal
Browse files Browse the repository at this point in the history
  • Loading branch information
mandel-macaque authored May 31, 2022
2 parents aa68cbe + 8fff154 commit 10d60e8
Show file tree
Hide file tree
Showing 50 changed files with 1,245 additions and 560 deletions.
2 changes: 2 additions & 0 deletions ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ For support requests use https://www.xamarin.com/support

<details>
<summary>Version information</summary>

```
```

</details>

### Build Logs
Expand Down
4 changes: 2 additions & 2 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Dependencies>
<ProductDependencies>
<Dependency Name="Microsoft.Dotnet.Sdk.Internal" Version="6.0.301-rtm.22274.16">
<Dependency Name="Microsoft.Dotnet.Sdk.Internal" Version="6.0.301-rtm.22280.1">
<Uri>https://github.com/dotnet/installer</Uri>
<Sha>2cd1eed21f146e37527ff93e547ad89214c5e759</Sha>
<Sha>283e9cfd1967d94e7d6dbc53b166c58e847b31e3</Sha>
</Dependency>
<Dependency Name="Microsoft.NET.ILLink.Tasks" Version="6.0.200-1.22219.3" CoherentParentDependency="Microsoft.Dotnet.Sdk.Internal">
<Uri>https://github.com/dotnet/linker</Uri>
Expand Down
2 changes: 1 addition & 1 deletion eng/Versions.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<!--Package versions-->
<PropertyGroup>
<MicrosoftDotnetSdkInternalPackageVersion>6.0.301-rtm.22274.16</MicrosoftDotnetSdkInternalPackageVersion>
<MicrosoftDotnetSdkInternalPackageVersion>6.0.301-rtm.22280.1</MicrosoftDotnetSdkInternalPackageVersion>
<MicrosoftNETILLinkTasksPackageVersion>6.0.200-1.22219.3</MicrosoftNETILLinkTasksPackageVersion>
<MicrosoftDotNetBuildTasksFeedPackageVersion>6.0.0-beta.21212.6</MicrosoftDotNetBuildTasksFeedPackageVersion>
<MicrosoftNETILStripTasksPackageVersion>6.0.0-rc.2.21468.3</MicrosoftNETILStripTasksPackageVersion>
Expand Down
2 changes: 1 addition & 1 deletion mk/xamarin.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ MONO_BRANCH := $(shell cd $(MONO_PATH) 2> /dev/null && git symbolic-ref --sho
endif

ifdef ENABLE_XAMARIN
NEEDED_MACCORE_VERSION := 0f0ca14cf22de341b0e1e8d6109e8b8753ada903
NEEDED_MACCORE_VERSION := 713bcb2442ac70e1741f4dccd2afa5cfed546fdb
NEEDED_MACCORE_BRANCH := main

MACCORE_DIRECTORY := maccore
Expand Down
2 changes: 1 addition & 1 deletion msbuild/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<MessagingVersion>1.6.24</MessagingVersion>
<HotRestartVersion>1.0.92</HotRestartVersion>
<HotRestartVersion>1.0.93</HotRestartVersion>
</PropertyGroup>
</Project>
53 changes: 44 additions & 9 deletions msbuild/Xamarin.Shared/Xamarin.Shared.targets
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ Copyright (C) 2018 Microsoft. All rights reserved.

<!-- Delete any crash dumps in the app bundle that might exist. Ref: https://github.com/xamarin/xamarin-macios/issues/12320 -->
<!-- Use a task to collect the files, so that we get the correct behavior on Windows -->
<!-- This is enabled by default, but can be disabled by setting EnableAutomaticAppBundleRootDirectoryCleanup=false -->
<GetFileSystemEntries
SessionId="$(BuildSessionId)"
Condition="'$(IsMacEnabled)' == 'true' And ('$(_PlatformName)' == 'MacCatalyst' Or '$(_PlatformName)' == 'macOS')"
Expand All @@ -312,22 +313,48 @@ Copyright (C) 2018 Microsoft. All rights reserved.
</GetFileSystemEntries>
<Delete
SessionId="$(BuildSessionId)"
Condition="'$(IsMacEnabled)' == 'true' And ('$(_PlatformName)' == 'MacCatalyst' Or '$(_PlatformName)' == 'macOS')"
Condition="'$(IsMacEnabled)' == 'true' And ('$(_PlatformName)' == 'MacCatalyst' Or '$(_PlatformName)' == 'macOS') And '$(EnableAutomaticAppBundleRootDirectoryCleanup)' != 'false'"
Files="@(_MonoCrashDumpsInAppBundle)"
/>

<!-- Warn about any files that are left -->
<!-- These can be deleted automatically by setting EnableAutomaticAppBundleRootDirectoryCleanup=true (in which case we won't show the warning) -->
<GetFileSystemEntries
SessionId="$(BuildSessionId)"
Condition="'$(IsMacEnabled)' == 'true' And ('$(_PlatformName)' == 'MacCatalyst' Or '$(_PlatformName)' == 'macOS')"
DirectoryPath="$(AppBundleDir)"
Pattern="*"
Recursive="false"
IncludeDirectories="false"
Recursive="true"
IncludeDirectories="true"
>
<Output TaskParameter="Entries" ItemName="_FilesInAppBundleRootDirectory" />
</GetFileSystemEntries>
<Warning Text="Found files in the root directory of the app bundle. This will likely cause codesign to fail. Files:%0a@(_FilesInAppBundleRootDirectory, '%0a')" Condition="@(_FilesInAppBundleRootDirectory->Count()) &gt; 0"/>
<!-- Remove anything in the Contents subdirectory from the list of files -->
<!-- You would think that it would be possible to remove using something like this:
<_FilesInAppBundleRootDirectory Remove="$(AppBundleDir)/Contents/**" />
but that doesn't remove directories, only files -->
<ItemGroup>
<_FilesInAppBundleRootDirectoryToRemove Include="@(_FilesInAppBundleRootDirectory)" Condition="$([MSBuild]::ValueOrDefault('%(Identity)', '').StartsWith('$(AppBundleDir)/Contents/'))" />
<_FilesInAppBundleRootDirectory Remove="@(_FilesInAppBundleRootDirectoryToRemove);$(AppBundleDir)/Contents" />
</ItemGroup>
<!-- We may have both files and directories, so just run both the Delete and RemoveDir task on all entries we're to delete -->
<Delete
SessionId="$(BuildSessionId)"
Condition="'$(IsMacEnabled)' == 'true' And ('$(_PlatformName)' == 'MacCatalyst' Or '$(_PlatformName)' == 'macOS') And '$(EnableAutomaticAppBundleRootDirectoryCleanup)' == 'true'"
Files="@(_FilesInAppBundleRootDirectory)"
/>
<!-- Create a separate item group for directories, excluding anything with length <= 1. This is an additional protection against accidentally wiping out the hard drive: https://github.com/dotnet/msbuild/issues/4105 -->
<ItemGroup>
<_DirectoriesInAppBundleRootDirectory Include="@(_FilesInAppBundleRootDirectory)" Condition="$([MSBuild]::ValueOrDefault('%(Identity)', '').Length) &gt; 1" />
</ItemGroup>
<RemoveDir
SessionId="$(BuildSessionId)"
Condition="'$(IsMacEnabled)' == 'true' And ('$(_PlatformName)' == 'MacCatalyst' Or '$(_PlatformName)' == 'macOS') And '$(EnableAutomaticAppBundleRootDirectoryCleanup)' == 'true'"
Directories="@(_DirectoriesInAppBundleRootDirectory)"
/>
<Warning
Text="Found files in the root directory of the app bundle. This will likely cause codesign to fail. Files:%0a@(_FilesInAppBundleRootDirectory, '%0a')"
Condition="'$(EnableAutomaticAppBundleRootDirectoryCleanup)' != 'true' And @(_FilesInAppBundleRootDirectory->Count()) &gt; 0"/>
</Target>

<Target Name="_CleanBindingResourcePackage">
Expand Down Expand Up @@ -2389,6 +2416,17 @@ Copyright (C) 2018 Microsoft. All rights reserved.
<Output TaskParameter="Items" ItemName="_WatchAppPostProcessingItems" />
</ReadItemsFromFile>

<!--
For App Extensions, we delay running dsymutil & strip until it has been copied into the main app bundle.
This means that we need the path to the symbols list in the main app's project, and it needs to be a full path when executing remotely from Windows,
because the projects are not in the same position relative to eachother when building remotely (so a relative path doesn't work).
This needs to be executed in a task (and not here inside the target) so the execution always occur on the mac, even when the build is done from Windows.
Ref: https://github.com/xamarin/xamarin-macios/issues/15046
-->
<GetFullPath SessionId="$(BuildSessionId)" Condition="'$(IsMacEnabled)' == 'true'" RelativePath="$(_MtouchSymbolsList)">
<Output TaskParameter="FullPath" PropertyName="_SymbolsListFullPath" />
</GetFullPath>

<ItemGroup>
<!-- add frameworks, with the path relative to the app bundle -->
<_PostProcessingItem Include="@(_ResolvedNativeReference->'$(_AppBundleName)$(AppBundleExtension/$(_AppFrameworksRelativePath)%(Filename).framework/%(Filename)')" Condition="'%(_ResolvedNativeReference.Kind' == 'Framework'">
Expand All @@ -2409,7 +2447,7 @@ Copyright (C) 2018 Microsoft. All rights reserved.
<DSymName>%(_ResolvedNativeReference.Filename)%(_ResolvedNativeReference.Extension).dSYM</DSymName>
</_PostProcessingItem>
<_PostProcessingItem Include="$([System.IO.Path]::GetFileName('$(AppBundleDir)'))/$(_NativeExecutableRelativePath)" Condition="'$(IsWatchApp)' != 'true'">
<SymbolFile>$(_MtouchSymbolsList)</SymbolFile>
<SymbolFile>$(_SymbolsListFullPath)</SymbolFile>
<DSymName>$(_AppBundleName)$(AppBundleExtension).dSYM</DSymName>
</_PostProcessingItem>

Expand All @@ -2425,10 +2463,7 @@ Copyright (C) 2018 Microsoft. All rights reserved.
</_PostProcessingItem>

<!-- Add any items from app extensions -->
<!-- We must update metadata with paths relative to the root of the contained app bundle to be relative to the root of the current app bundle -->
<_PostProcessingItem Include="@(_AppExtensionPostProcessingItems -> '$(_AppBundleName)$(AppBundleExtension)\$(_AppPlugInsRelativePath)%(Identity)')" Condition="@(_AppExtensionPostProcessingItems->Count()) &gt; 0"> <!-- The condition here shouldn't be necessary, but https://github.com/dotnet/msbuild/issues/4056 -->
<SymbolFile>$([MSBuild]::MakeRelative('$(MSBuildProjectDirectory)','%(_AppExtensionPostProcessingItems.SourceProjectPath)/%(_AppExtensionPostProcessingItems.SymbolFile)'))</SymbolFile>
</_PostProcessingItem>
<_PostProcessingItem Include="@(_AppExtensionPostProcessingItems -> '$(_AppBundleName)$(AppBundleExtension)\$(_AppPlugInsRelativePath)%(Identity)')" Condition="@(_AppExtensionPostProcessingItems->Count()) &gt; 0" /> <!-- The condition here shouldn't be necessary, but https://github.com/dotnet/msbuild/issues/4056 -->

<!-- Add any items from watch app -->
<!-- We must update metadata with paths relative to the root of the app bundle to be relative to the root of the current app bundle -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@
AppIdentifier="$(_AppIdentifier)"
BundleIdentifier="$(_BundleIdentifier)"
Entitlements="$(_HotRestartEntitlementsFile)"
CompiledEntitlements="$(DeviceSpecificIntermediateOutputPath)Entitlements.xcent"
CompiledEntitlements="$(HotRestartAppBundlePath)\Entitlements.plist"
IsAppExtension="$(IsAppExtension)"
ProvisioningProfile="$(_ProvisioningProfileId)"
SdkIsSimulator="False"
Expand Down
3 changes: 3 additions & 0 deletions src/CoreFoundation/CFArray.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ namespace CoreFoundation {
// interesting bits: https://github.com/opensource-apple/CF/blob/master/CFArray.c
public partial class CFArray : NativeObject {

// this cache the handle instead of issuing a native call
internal static NativeHandle CFNullHandle = _CFNullHandle;

#if !NET
internal CFArray (NativeHandle handle)
: base (handle, false)
Expand Down
Loading

0 comments on commit 10d60e8

Please sign in to comment.