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

[net8.0] Merge main into net8.0. #18494

Merged
merged 9 commits into from
Jun 27, 2023
6 changes: 6 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,12 @@ csharp_style_unused_value_expression_statement_preference = discard_variable:sil
# 'using' directive preferences
csharp_using_directive_placement = outside_namespace:suggestion

# nullability checks

dotnet_style_coalesce_expression = true
dotnet_style_null_propagation = true
dotnet_style_prefer_is_null_check_over_reference_equality_method = true

#### C# Formatting Rules ####

# New line preferences
Expand Down
2 changes: 2 additions & 0 deletions DOWNLOADS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

| Date | Version | Package | Release Notes |
|------|---------|---------|---------------|
|2023/05/17|16.4.0.6|[xamarin.ios-16.4.0.6.pkg](https://download.visualstudio.microsoft.com/download/pr/b4928191-de3d-42cb-a24f-709e5d71626c/ac849f1f644aee58ed4e7a79cb35a14e/xamarin.ios-16.4.0.6.pkg)||
|2023/02/21|16.2.0.5|[xamarin.ios-16.2.0.5.pkg](https://download.visualstudio.microsoft.com/download/pr/5f9ea8f6-0afe-46b3-b8e8-5dee4c2dd14c/b357a2b833ba86598aaff58fc013f06c/xamarin.ios-16.2.0.5.pkg)||
|2023/02/14|16.2.0.2|[xamarin.ios-16.2.0.2.pkg](https://download.visualstudio.microsoft.com/download/pr/91371293-2fe3-4392-b5ca-d4f73b07ce0a/d9eab6784e5e3e8557d2b509645e2b7e/xamarin.ios-16.2.0.2.pkg)||
|2022/12/15|16.1.1.27|[xamarin.ios-16.1.1.27.pkg](https://download.visualstudio.microsoft.com/download/pr/c8bc547f-869e-4d64-a271-f8b3a29ee545/3d8cfa414fa3e4005dd5b9b9d3817aa4/xamarin.ios-16.1.1.27.pkg)||
Expand Down Expand Up @@ -172,6 +173,7 @@

| Date | Version | Package | Release Notes |
|------|---------|---------|---------------|
|2023/05/17|9.3.0.6|[xamarin.mac-9.3.0.6.pkg](https://download.visualstudio.microsoft.com/download/pr/b4928191-de3d-42cb-a24f-709e5d71626c/586143733de41c62d8b6179d7eeaf3e5/xamarin.mac-9.3.0.6.pkg)||
|2023/02/21|9.1.0.5|[xamarin.mac-9.1.0.5.pkg](https://download.visualstudio.microsoft.com/download/pr/5f9ea8f6-0afe-46b3-b8e8-5dee4c2dd14c/c5c4f99a992a8cc51b2bad3d31ef6b96/xamarin.mac-9.1.0.5.pkg)||
|2023/02/14|9.1.0.2|[xamarin.mac-9.1.0.2.pkg](https://download.visualstudio.microsoft.com/download/pr/91371293-2fe3-4392-b5ca-d4f73b07ce0a/dbf22c9b27f23d1a8b408ae7d93d4b76/xamarin.mac-9.1.0.2.pkg)||
|2022/12/15|9.0.0.27|[xamarin.mac-9.0.0.27.pkg](https://download.visualstudio.microsoft.com/download/pr/c8bc547f-869e-4d64-a271-f8b3a29ee545/4fbfc55453fe36fe5bf4128d6d495911/xamarin.mac-9.0.0.27.pkg)||
Expand Down
16 changes: 0 additions & 16 deletions msbuild/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -439,14 +439,6 @@ DOTNET_TARGETS += \

endif

# watchOS: contains all of the files for iOS as well (for now, we don't need all of them, so this is optimizable)
ifdef INCLUDE_WATCH
DOTNET_TARGETS += \
$(foreach target,$(DOTNET_SHARED_FILES) ,$(DOTNET_DESTDIR)/$(WATCHOS_NUGET).Sdk/tools/msbuild/iOS/$(notdir $(target))) \
$(foreach target,$(DOTNET_WATCHOS_FILES) ,$(DOTNET_DESTDIR)/$(WATCHOS_NUGET).Sdk/tools/msbuild/watchOS/$(notdir $(target))) \

endif

# macOS
ifdef INCLUDE_MAC
DOTNET_TARGETS += \
Expand All @@ -467,8 +459,6 @@ DOTNET_DIRECTORIES += \
$(DOTNET_DESTDIR)/$(IOS_WINDOWS_NUGET).Sdk/tools/msbuild/iOS \
$(DOTNET_DESTDIR)/$(TVOS_NUGET).Sdk/tools/msbuild/iOS \
$(DOTNET_DESTDIR)/$(TVOS_NUGET).Sdk/tools/msbuild/tvOS \
$(DOTNET_DESTDIR)/$(WATCHOS_NUGET).Sdk/tools/msbuild/iOS \
$(DOTNET_DESTDIR)/$(WATCHOS_NUGET).Sdk/tools/msbuild/watchOS \
$(DOTNET_DESTDIR)/$(MACOS_NUGET).Sdk/tools/msbuild/macOS \
$(DOTNET_DESTDIR)/$(MACCATALYST_NUGET).Sdk/tools/msbuild/iOS \
$(DOTNET_DESTDIR)/$(MACCATALYST_NUGET).Sdk/tools/msbuild/MacCatalyst \
Expand All @@ -485,12 +475,6 @@ $(DOTNET_DESTDIR)/$(TVOS_NUGET).Sdk/tools/msbuild/%: $(IOS_DESTDIR)$(MONOTOUCH_P
$(DOTNET_DESTDIR)/$(TVOS_NUGET).Sdk/tools/msbuild/tvOS/%: $(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/msbuild/TVOS/% | $(DOTNET_DIRECTORIES)
$(Q) $(CP) $< $@

$(DOTNET_DESTDIR)/$(WATCHOS_NUGET).Sdk/tools/msbuild/%: $(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/msbuild/% | $(DOTNET_DIRECTORIES)
$(Q) $(CP) $< $@

$(DOTNET_DESTDIR)/$(WATCHOS_NUGET).Sdk/tools/msbuild/watchOS/%: $(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/msbuild/WatchOS/% | $(DOTNET_DIRECTORIES)
$(Q) $(CP) $< $@

$(DOTNET_DESTDIR)/$(MACCATALYST_NUGET).Sdk/tools/msbuild/%: $(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/msbuild/% | $(DOTNET_DIRECTORIES)
$(Q) $(CP) $< $@

Expand Down
2 changes: 1 addition & 1 deletion msbuild/Xamarin.HotRestart.PreBuilt/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ $(TOP)/tests/dotnet/%:
$(Q) $(MAKE) -C $(dir $@) $*

.build-stamp: $(wildcard Xamarin.PreBuilt.iOS/*) Makefile
$(Q_GEN) $(DOTNET) build Xamarin.PreBuilt.iOS/Xamarin.PreBuilt.iOS.csproj "/bl:$(abspath ./msbuild.binlog)" $(DOTNET_BUILD_VERBOSITY)
$(Q_GEN) if ! $(DOTNET) build Xamarin.PreBuilt.iOS/Xamarin.PreBuilt.iOS.csproj "/bl:$(abspath ./msbuild.binlog)" $(DOTNET_BUILD_VERBOSITY); then echo "Binlog: $(abspath ./msbuild.binlog)"; exit 1; fi
$(Q) touch $@

$(DOTNET_DESTDIR)/$(IOS_WINDOWS_NUGET).Sdk/tools/msbuild/iOS/Xamarin.PreBuilt.iOS.app.zip: Xamarin.PreBuilt.iOS.app.zip
Expand Down
134 changes: 0 additions & 134 deletions msbuild/Xamarin.MacDev.Tasks/Tasks/ClassRedirectorTask.cs

This file was deleted.

6 changes: 0 additions & 6 deletions msbuild/Xamarin.MacDev.Tasks/Xamarin.MacDev.Tasks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,6 @@
<Compile Include="..\..\tools\common\SdkVersions.cs">
<Link>external\SdkVersions.cs</Link>
</Compile>
<Compile Include="..\..\tools\common\CSToObjCMap.cs">
<Link>external\CSToObjCMap.cs</Link>
</Compile>
<Compile Include="..\..\tools\common\ObjCNameIndex.cs">
<Link>external\ObjCNameIndex.cs</Link>
</Compile>
</ItemGroup>

<ItemGroup>
Expand Down
10 changes: 6 additions & 4 deletions src/Foundation/NSUrlSessionHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -935,9 +935,6 @@ public override void DidCompleteWithError (NSUrlSession session, NSUrlSessionTas

// this can happen if the HTTP request times out and it is removed as part of the cancellation process
if (inflight is not null) {
// set the stream as finished
inflight.Stream.TrySetReceivedAllData ();

// send the error or send the response back
if (error is not null || serverError is not null) {
// got an error, cancel the stream operatios before we do anything
Expand All @@ -948,6 +945,9 @@ public override void DidCompleteWithError (NSUrlSession session, NSUrlSessionTas
inflight.CompletionSource.TrySetException (exc);
inflight.Stream.TrySetException (exc);
} else {
// set the stream as finished
inflight.Stream.TrySetReceivedAllData ();

inflight.Completed = true;
SetResponse (inflight);
}
Expand Down Expand Up @@ -1334,8 +1334,10 @@ public override async Task<int> ReadAsync (byte [] buffer, int offset, int count

while (current is null) {
lock (dataLock) {
if (data.Count == 0 && receivedAllData && position == length)
if (data.Count == 0 && receivedAllData && position == length) {
ThrowIfNeeded (cancellationToken);
return 0;
}

if (data.Count > 0 && current is null) {
current = data.Peek ();
Expand Down
6 changes: 6 additions & 0 deletions src/ObjCRuntime/Runtime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,12 @@ unsafe static void Initialize (InitializationOptions* options)
throw ErrorHelper.CreateError (8010, msg);
}

#if NET
if (options->RegistrationMap is not null && options->RegistrationMap->map is not null) {
ClassHandles.InitializeClassHandles (options->RegistrationMap->map);
}
#endif

IntPtrEqualityComparer = new IntPtrEqualityComparer ();
TypeEqualityComparer = new TypeEqualityComparer ();

Expand Down
22 changes: 9 additions & 13 deletions src/bgen/Generator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1269,22 +1269,18 @@ void DeclareInvoker (MethodInfo mi)
if (AttributeManager.HasAttribute<WrapAttribute> (mi))
return;

try {
// arm64 never requires stret, so we'll always need the non-stret variants
RegisterMethod (false, mi, MakeSig (mi, false), false);
RegisterMethod (false, mi, MakeSuperSig (mi, false), false);
// arm64 never requires stret, so we'll always need the non-stret variants
RegisterMethod (false, mi, MakeSig (mi, false), false);
RegisterMethod (false, mi, MakeSuperSig (mi, false), false);

if (CheckNeedStret (mi)) {
RegisterMethod (true, mi, MakeSig (mi, true), false);
RegisterMethod (true, mi, MakeSuperSig (mi, true), false);
if (CheckNeedStret (mi)) {
RegisterMethod (true, mi, MakeSig (mi, true), false);
RegisterMethod (true, mi, MakeSuperSig (mi, true), false);

if (AttributeManager.HasAttribute<AlignAttribute> (mi)) {
RegisterMethod (true, mi, MakeSig (mi, true, true), true);
RegisterMethod (true, mi, MakeSuperSig (mi, true, true), true);
}
if (AttributeManager.HasAttribute<AlignAttribute> (mi)) {
RegisterMethod (true, mi, MakeSig (mi, true, true), true);
RegisterMethod (true, mi, MakeSuperSig (mi, true, true), true);
}
} catch (BindingException ex) {
throw ex;
}
}
static char [] invalid_selector_chars = new char [] { '*', '^', '(', ')' };
Expand Down
Loading
Loading