From 8c48790083b4b671f925fe4e4b5503c44725e7ef Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Fri, 18 Dec 2020 08:49:34 +0100 Subject: [PATCH 1/7] Bump to .NET 6.0.100-alpha.1.21060.3. --- Make.config | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Make.config b/Make.config index 0fdeb9beac18..8ff2ae2b18eb 100644 --- a/Make.config +++ b/Make.config @@ -475,10 +475,10 @@ DOTNET_FEED_DIR ?= $(DOTNET_DESTDIR)/nuget-feed # We're using preview versions, and there will probably be many of them, so install locally (into builds/downloads) if there's no system version to # avoid consuming a lot of disk space (since they're never automatically deleted). The system-dependencies.sh script will install locally as long # as there's a TARBALL url. -DOTNET6_VERSION=6.0.100-alpha.1.20562.2 +DOTNET6_VERSION=6.0.100-alpha.1.21060.3 DOTNET6_VERSION_BAND=$(firstword $(subst -, ,$(DOTNET6_VERSION))) -DOTNET6_URL=https://dotnetcli.blob.core.windows.net/dotnet/Sdk/6.0.100-alpha.1.20562.2/dotnet-sdk-6.0.100-alpha.1.20562.2-osx-x64.pkg -DOTNET6_TARBALL=https://dotnetcli.blob.core.windows.net/dotnet/Sdk/6.0.100-alpha.1.20562.2/dotnet-sdk-6.0.100-alpha.1.20562.2-osx-x64.tar.gz +DOTNET6_URL=https://dotnetcli.blob.core.windows.net/dotnet/Sdk/6.0.100-alpha.1.21060.3/dotnet-sdk-6.0.100-alpha.1.21060.3-osx-x64.pkg +DOTNET6_TARBALL=https://dotnetcli.blob.core.windows.net/dotnet/Sdk/6.0.100-alpha.1.21060.3/dotnet-sdk-6.0.100-alpha.1.21060.3-osx-x64.tar.gz DOTNET6_TARBALL_NAME=$(notdir $(DOTNET6_TARBALL)) DOTNET6_DIR=$(abspath $(TOP)/builds/downloads/$(basename $(basename $(DOTNET6_TARBALL_NAME)))) DOTNET6=$(DOTNET6_DIR)/dotnet From 96f39195acad5f7201a371a77de8a5aa6f31c0df Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Fri, 4 Dec 2020 14:04:30 +0100 Subject: [PATCH 2/7] Fix dotnet command line arguments. * dotnet build: the project file must be the first argument. * dotnet build/publish: use the documented verbosity format. --- mk/quiet.mk | 3 +++ src/Makefile.generator | 2 +- tools/common/create-makefile-fragment.sh | 8 ++++++-- tools/dotnet-linker/Makefile | 3 ++- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/mk/quiet.mk b/mk/quiet.mk index b665c88adec4..46d938343fdc 100644 --- a/mk/quiet.mk +++ b/mk/quiet.mk @@ -70,6 +70,7 @@ MMP_VERBOSITY=-q MTOUCH_VERBOSITY=-q MDTOOL_VERBOSITY= DOTNET_PACK_VERBOSITY=--verbosity:quiet --nologo +DOTNET_BUILD_VERBOSITY=--verbosity quiet NUGET_VERBOSITY=-verbosity quiet else # CI build @@ -79,6 +80,7 @@ MMP_VERBOSITY=-vvvv MTOUCH_VERBOSITY=-vvvv MDTOOL_VERBOSITY=-v -v -v -v DOTNET_PACK_VERBOSITY= +DOTNET_BUILD_VERBOSITY= NUGET_VERBOSITY= endif else @@ -89,6 +91,7 @@ MMP_VERBOSITY=-vvvv MTOUCH_VERBOSITY=-vvvv MDTOOL_VERBOSITY=-v -v -v -v DOTNET_PACK_VERBOSITY=--verbosity:detailed +DOTNET_BUILD_VERBOSITY=--verbosity detailed NUGET_VERBOSITY=-verbosity detailed endif MSBUILD_VERBOSITY=$(XBUILD_VERBOSITY) diff --git a/src/Makefile.generator b/src/Makefile.generator index a34dd1b7236c..3e7e93135bc9 100644 --- a/src/Makefile.generator +++ b/src/Makefile.generator @@ -14,7 +14,7 @@ $(BUILD_DIR)/common/bgen.exe: $(generator_dependencies) Makefile.generator $(BUI $(Q_GEN) $(SYSTEM_MSBUILD) $(XBUILD_VERBOSITY) /p:Configuration=Debug generator.csproj /p:IntermediateOutputPath=$(BUILD_DIR)/IDE/obj/common/ /p:OutputPath=$(BUILD_DIR)/common $(DOTNET_BUILD_DIR)/bgen/bgen: $(generator_dependencies) Makefile.generator $(BUILD_DIR)/generator-frameworks.g.cs global.json | $(DOTNET_BUILD_DIR)/bgen - $(Q_DOTNET_BUILD) $(DOTNET6) publish $(XBUILD_VERBOSITY) /p:Configuration=Debug bgen/bgen.csproj /p:IntermediateOutputPath=$(abspath $(DOTNET_BUILD_DIR)/IDE/obj/common)/ /p:OutputPath=$(abspath $(DOTNET_BUILD_DIR)/IDE/bin/common)/ + $(Q_DOTNET_BUILD) $(DOTNET6) publish bgen/bgen.csproj $(DOTNET_BUILD_VERBOSITY) /p:Configuration=Debug /p:IntermediateOutputPath=$(abspath $(DOTNET_BUILD_DIR)/IDE/obj/common)/ /p:OutputPath=$(abspath $(DOTNET_BUILD_DIR)/IDE/bin/common)/ $(Q) $(CP) $(DOTNET_BUILD_DIR)/IDE/bin/common/bgen* $(dir $@) $(Q) printf 'exec $(DOTNET6) "$$(dirname "$$0")"/bgen.dll $$@\n' > $@ $(Q) chmod +x $@ diff --git a/tools/common/create-makefile-fragment.sh b/tools/common/create-makefile-fragment.sh index b1f147012186..42bf3a7882f2 100755 --- a/tools/common/create-makefile-fragment.sh +++ b/tools/common/create-makefile-fragment.sh @@ -37,6 +37,10 @@ if test -z "$BUILD_EXECUTABLE"; then BUILD_EXECUTABLE=msbuild fi +if test -z "$BUILD_VERBOSITY"; then + BUILD_VERBOSITY=/verbosity:diag +fi + # ProjectInspector.csproj is an MSBuild file with a target # (WriteProjectReferences) that takes another project file as input (the # ProjectFile variable) and writes all the project references (recursively) to @@ -44,7 +48,7 @@ fi ( cp ProjectInspector.csproj "$PROJECT_DIR" cd "$PROJECT_DIR" -$BUILD_EXECUTABLE ProjectInspector.csproj "/t:WriteProjectReferences" "/p:ProjectFile=$PROJECT_FILE" "/p:ReferenceListPath=$REFERENCES_PATH" /verbosity:quiet /nologo +$BUILD_EXECUTABLE ProjectInspector.csproj "/t:WriteProjectReferences" "/p:ProjectFile=$PROJECT_FILE" "/p:ReferenceListPath=$REFERENCES_PATH" $BUILD_VERBOSITY /nologo rm -f ProjectInspector.csproj ) @@ -91,7 +95,7 @@ for proj in $(sort "$REFERENCES_PATH" | uniq); do ( cd "$(dirname "$proj")" - $BUILD_EXECUTABLE "$TMPPROJ" "/t:WriteInputs" "/p:ProjectFile=$proj" "/p:InputsPath=$inputs_path" /verbosity:quiet /nologo + $BUILD_EXECUTABLE "$TMPPROJ" "/t:WriteInputs" "/p:ProjectFile=$proj" "/p:InputsPath=$inputs_path" $BUILD_VERBOSITY /nologo ) # The output contains relative paths, relative to the csproj directory diff --git a/tools/dotnet-linker/Makefile b/tools/dotnet-linker/Makefile index 601db0fbdeaf..17e4930596a5 100644 --- a/tools/dotnet-linker/Makefile +++ b/tools/dotnet-linker/Makefile @@ -15,11 +15,12 @@ DOTNET_DIRECTORIES += \ # dotnet-linker.csproj.inc contains the dotnet_linker_dependencies variable used to determine if mtouch needs to be rebuilt or not. dotnet-linker.csproj.inc: export BUILD_EXECUTABLE=$(DOTNET6) build +dotnet-linker.csproj.inc: export BUILD_VERBOSITY=$(DOTNET_BUILD_VERBOSITY) dotnet-linker.csproj.inc: global.json -include dotnet-linker.csproj.inc $(BUILD_DIR)/dotnet-linker%dll $(BUILD_DIR)/dotnet-linker%pdb: Makefile global.json $(dotnet_linker_dependencies) - $(Q_DOTNET_BUILD) $(DOTNET6) build $(XBUILD_VERBOSITY) + $(Q_DOTNET_BUILD) $(DOTNET6) build dotnet-linker.csproj $(DOTNET_BUILD_VERBOSITY) $(DOTNET_DESTDIR)/Microsoft.iOS.Sdk/tools/dotnet-linker/%: $(BUILD_DIR)/% | $(DOTNET_DESTDIR)/Microsoft.iOS.Sdk/tools/dotnet-linker $(Q) $(CP) $< $@ From 88f7bfddb4eb177f01726a451b1203edcda4c76f Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Tue, 12 Jan 2021 16:50:52 +0100 Subject: [PATCH 3/7] Update version number in tests. --- tests/linker/CommonLinkAllTest.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/linker/CommonLinkAllTest.cs b/tests/linker/CommonLinkAllTest.cs index 4817a95ef3f6..f6c473b1ce55 100644 --- a/tests/linker/CommonLinkAllTest.cs +++ b/tests/linker/CommonLinkAllTest.cs @@ -78,7 +78,7 @@ public void TypeConverter_BuiltIn () string name = (typeof (BuiltInConverter).GetCustomAttributes (false) [0] as TypeConverterAttribute).ConverterTypeName; #if NET - var typename = "System.ComponentModel.BooleanConverter, System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"; + var typename = "System.ComponentModel.BooleanConverter, System.ComponentModel.TypeConverter, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"; #else var typename = "System.ComponentModel.BooleanConverter, System, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e"; #endif From 686d93c2566ffced47cb0d0d64286ee65d56d2c6 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Wed, 13 Jan 2021 09:53:11 +0100 Subject: [PATCH 4/7] [tests/introspection] Adjust introspection to cope with different library names in the new .NET version. --- tests/introspection/ApiPInvokeTest.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/introspection/ApiPInvokeTest.cs b/tests/introspection/ApiPInvokeTest.cs index c57d72083694..682f7a2d4d81 100644 --- a/tests/introspection/ApiPInvokeTest.cs +++ b/tests/introspection/ApiPInvokeTest.cs @@ -211,7 +211,7 @@ protected void Check (Assembly a) path = null; break; #if NET - case "QCall": + case "libSystem.Globalization.Native": // Globalization hasn't been implemented yet: https://github.com/xamarin/xamarin-macios/issues/8906 if (name.StartsWith ("GlobalizationNative_", StringComparison.Ordinal)) continue; @@ -244,7 +244,7 @@ protected void Check (Assembly a) var lib = Dlfcn.dlopen (path, 0); var h = Dlfcn.dlsym (lib, name); if (h == IntPtr.Zero) - ReportError ("Could not find the symbol '{0}' in {1}", name, path); + ReportError ("Could not find the symbol '{0}' in {1} for the P/Invoke {2}.{3} in {4}", name, path, t.FullName, m.Name, a.GetName ().Name); Dlfcn.dlclose (lib); n++; } From 88c1a34b85c8b19eabb1d1b59f5765db7b65d51d Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Wed, 13 Jan 2021 09:55:04 +0100 Subject: [PATCH 5/7] [tests/link sdk] Adjust the LinkSdkRegressionTest.SpecialFolder test according to the new version of .NET 6. --- tests/linker/ios/link sdk/LinkSdkRegressionTest.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/linker/ios/link sdk/LinkSdkRegressionTest.cs b/tests/linker/ios/link sdk/LinkSdkRegressionTest.cs index 2a71a265b5bd..98be6cd7d489 100644 --- a/tests/linker/ios/link sdk/LinkSdkRegressionTest.cs +++ b/tests/linker/ios/link sdk/LinkSdkRegressionTest.cs @@ -902,7 +902,13 @@ public void SpecialFolder () Assert.That (path, Is.EqualTo ("/usr/share"), "path - CommonApplicationData"); // and the simulator is more lax -#if !NET // https://github.com/dotnet/runtime/issues/41383 +#if NET + // ProgramFiles is different on .NET: https://github.com/dotnet/runtime/pull/41959#discussion_r485069017 + path = TestFolder (Environment.SpecialFolder.ProgramFiles, readOnly: device, exists: false); + var applicationsPath = NSSearchPath.GetDirectories (NSSearchPathDirectory.ApplicationDirectory, NSSearchPathDomain.All, true).FirstOrDefault (); + Assert.That (path, Is.EqualTo (applicationsPath), "path - ProgramFiles"); +#else + path = TestFolder (Environment.SpecialFolder.ProgramFiles, readOnly: device); Assert.That (path, Is.EqualTo ("/Applications"), "path - ProgramFiles"); #endif @@ -935,7 +941,11 @@ public void SpecialFolder () path = TestFolder (Environment.SpecialFolder.MyDocuments); Assert.That (path, Is.EqualTo (docs), "path - MyDocuments"); +#if NET + path = TestFolder (Environment.SpecialFolder.ApplicationData, exists: false); +#else path = TestFolder (Environment.SpecialFolder.ApplicationData); +#endif Assert.That (path, Is.EqualTo (docs + "/.config"), "path - ApplicationData"); path = TestFolder (Environment.SpecialFolder.LocalApplicationData); From ece7188a2e68f0aec16062f6847190869da7e6ca Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Wed, 13 Jan 2021 09:10:02 +0100 Subject: [PATCH 6/7] [tests/link sdk] Preserve a required method in System.Private.CoreLib to work around a bug in .NET 6. Ref: https://github.com/dotnet/runtime/issues/46908. --- tests/linker/ios/link sdk/dotnet/extra-linker-defs.xml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/linker/ios/link sdk/dotnet/extra-linker-defs.xml b/tests/linker/ios/link sdk/dotnet/extra-linker-defs.xml index 68892fa38e68..8a095d66b355 100644 --- a/tests/linker/ios/link sdk/dotnet/extra-linker-defs.xml +++ b/tests/linker/ios/link sdk/dotnet/extra-linker-defs.xml @@ -11,4 +11,11 @@ + + + + + + + From 6d9fa3c18034288a76a8fea653f7a895785860ba Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Thu, 14 Jan 2021 08:47:52 +0100 Subject: [PATCH 7/7] Revert "[CI][VSTS] Add the donet 6 pkg as a dependency. (#10348)" This reverts commit 6de4e717e735e02dc0eb28869113d53634b33bc7. There's no need to provision .NET 6, it's done automatically. --- tools/devops/Makefile | 1 - tools/devops/build-provisioning.csx.in | 1 - 2 files changed, 2 deletions(-) diff --git a/tools/devops/Makefile b/tools/devops/Makefile index 8a59c088d982..3e6babfb7cda 100644 --- a/tools/devops/Makefile +++ b/tools/devops/Makefile @@ -17,7 +17,6 @@ build-provisioning.csx: build-provisioning.csx.in Makefile $(TOP)/Make.config -e 's#@VS_PACKAGE@#$(MIN_VISUAL_STUDIO_URL)#g' \ -e 's#@MIN_SHARPIE_URL@#$(MIN_SHARPIE_URL)#g' \ -e 's#@DOTNET_VERSION@#$(DOTNET_VERSION)#g' \ - -e 's#@DOTNET6_VERSION@#$(DOTNET6_VERSION)#g' \ $< > $@; all check: diff --git a/tools/devops/build-provisioning.csx.in b/tools/devops/build-provisioning.csx.in index 1dcb8b5f4458..767a435a8804 100644 --- a/tools/devops/build-provisioning.csx.in +++ b/tools/devops/build-provisioning.csx.in @@ -14,4 +14,3 @@ Item ("@MONO_PACKAGE@"); Item ("@MIN_SHARPIE_URL@"); Item ("@VS_PACKAGE@"); DotNetCoreSdk ("@DOTNET_VERSION@"); -DotNetCoreSdk ("@DOTNET6_VERSION@");