From 3a09531e9edca91df9be2221e1d470d4148a0aa3 Mon Sep 17 00:00:00 2001 From: Marco Visser Date: Tue, 19 Oct 2021 10:36:59 +0200 Subject: [PATCH 01/12] - Cleanup up project files - dependencies updates in test projects --- .../Hl7.Fhir.ElementModel.csproj | 4 - .../Hl7.Fhir.Serialization.csproj | 4 - .../Hl7.Fhir.Support.Poco.Tests.csproj | 3 +- .../Hl7.Fhir.Support.Poco.csproj | 11 +- .../Hl7.Fhir.Support.Tests.csproj | 5 - src/Hl7.Fhir.Support/Hl7.Fhir.Support.csproj | 6 +- .../HL7.FhirPath.Tests.csproj | 5 - src/Hl7.FhirPath/Hl7.FhirPath.csproj | 4 - src/firely-net-common-tests.props | 8 +- src/firely-net-common.props | 108 +++++++++--------- src/firely-net-common.targets | 34 ------ 11 files changed, 65 insertions(+), 127 deletions(-) delete mode 100644 src/firely-net-common.targets diff --git a/src/Hl7.Fhir.ElementModel/Hl7.Fhir.ElementModel.csproj b/src/Hl7.Fhir.ElementModel/Hl7.Fhir.ElementModel.csproj index 71d4eeca3..d35637360 100644 --- a/src/Hl7.Fhir.ElementModel/Hl7.Fhir.ElementModel.csproj +++ b/src/Hl7.Fhir.ElementModel/Hl7.Fhir.ElementModel.csproj @@ -1,10 +1,6 @@  - - net5.0;net452;netstandard2.0 - - Hl7.Fhir.ElementModel diff --git a/src/Hl7.Fhir.Serialization/Hl7.Fhir.Serialization.csproj b/src/Hl7.Fhir.Serialization/Hl7.Fhir.Serialization.csproj index 9f3be9a70..0a6436df2 100644 --- a/src/Hl7.Fhir.Serialization/Hl7.Fhir.Serialization.csproj +++ b/src/Hl7.Fhir.Serialization/Hl7.Fhir.Serialization.csproj @@ -1,10 +1,6 @@  - - net5.0;net452;netstandard2.0 - - Hl7.Fhir.Serialization diff --git a/src/Hl7.Fhir.Support.Poco.Tests/Hl7.Fhir.Support.Poco.Tests.csproj b/src/Hl7.Fhir.Support.Poco.Tests/Hl7.Fhir.Support.Poco.Tests.csproj index b8a28d973..29ab58914 100644 --- a/src/Hl7.Fhir.Support.Poco.Tests/Hl7.Fhir.Support.Poco.Tests.csproj +++ b/src/Hl7.Fhir.Support.Poco.Tests/Hl7.Fhir.Support.Poco.Tests.csproj @@ -1,7 +1,5 @@  - - @@ -12,4 +10,5 @@ + diff --git a/src/Hl7.Fhir.Support.Poco/Hl7.Fhir.Support.Poco.csproj b/src/Hl7.Fhir.Support.Poco/Hl7.Fhir.Support.Poco.csproj index de68747cc..86bf6b077 100644 --- a/src/Hl7.Fhir.Support.Poco/Hl7.Fhir.Support.Poco.csproj +++ b/src/Hl7.Fhir.Support.Poco/Hl7.Fhir.Support.Poco.csproj @@ -1,11 +1,6 @@  - - net5.0;net452;netstandard2.0 - - - Hl7.Fhir.Support.Poco @@ -22,8 +17,8 @@ - - + + @@ -31,5 +26,5 @@ - + diff --git a/src/Hl7.Fhir.Support.Tests/Hl7.Fhir.Support.Tests.csproj b/src/Hl7.Fhir.Support.Tests/Hl7.Fhir.Support.Tests.csproj index 0762991d3..4a0d062ac 100644 --- a/src/Hl7.Fhir.Support.Tests/Hl7.Fhir.Support.Tests.csproj +++ b/src/Hl7.Fhir.Support.Tests/Hl7.Fhir.Support.Tests.csproj @@ -1,7 +1,5 @@  - - @@ -26,7 +24,4 @@ - - - \ No newline at end of file diff --git a/src/Hl7.Fhir.Support/Hl7.Fhir.Support.csproj b/src/Hl7.Fhir.Support/Hl7.Fhir.Support.csproj index 9212dc833..29f974073 100644 --- a/src/Hl7.Fhir.Support/Hl7.Fhir.Support.csproj +++ b/src/Hl7.Fhir.Support/Hl7.Fhir.Support.csproj @@ -1,10 +1,6 @@  - - net5.0;net452;netstandard2.0 - - Hl7.Fhir.Support @@ -15,7 +11,7 @@ Hl7.Fhir.Support - + \ No newline at end of file diff --git a/src/Hl7.FhirPath.Tests/HL7.FhirPath.Tests.csproj b/src/Hl7.FhirPath.Tests/HL7.FhirPath.Tests.csproj index 86ce2e240..31c8d4418 100644 --- a/src/Hl7.FhirPath.Tests/HL7.FhirPath.Tests.csproj +++ b/src/Hl7.FhirPath.Tests/HL7.FhirPath.Tests.csproj @@ -1,8 +1,6 @@  - - @@ -18,7 +16,4 @@ - - - \ No newline at end of file diff --git a/src/Hl7.FhirPath/Hl7.FhirPath.csproj b/src/Hl7.FhirPath/Hl7.FhirPath.csproj index e5216858c..d6c5a81c4 100644 --- a/src/Hl7.FhirPath/Hl7.FhirPath.csproj +++ b/src/Hl7.FhirPath/Hl7.FhirPath.csproj @@ -1,10 +1,6 @@  - - net5.0;net452;netstandard2.0 - - Hl7.FhirPath diff --git a/src/firely-net-common-tests.props b/src/firely-net-common-tests.props index 430b0fa86..b0d42f7e2 100644 --- a/src/firely-net-common-tests.props +++ b/src/firely-net-common-tests.props @@ -18,15 +18,15 @@ - - - + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/src/firely-net-common.props b/src/firely-net-common.props index f9341e806..c33a2d25c 100644 --- a/src/firely-net-common.props +++ b/src/firely-net-common.props @@ -1,58 +1,62 @@ - - - - 4.0.0 - alpha - Firely (info@fire.ly) and contributors - Firely (https://fire.ly) - Copyright 2013-2021 Firely. Contains materials (C) HL7 International - https://github.com/FirelyTeam/firely-net-common - https://github.com/FirelyTeam/firely-net-common - git - icon-fhir-32.png - See https://github.com/FirelyTeam/firely-net-sdk/releases - LICENSE - true - - - - - - - - + + 4.0.0 + alpha + Firely (info@fire.ly) and contributors + Firely (https://fire.ly) + Copyright 2013-2021 Firely. Contains materials (C) HL7 International + https://github.com/FirelyTeam/firely-net-common + https://github.com/FirelyTeam/firely-net-common + git + icon-fhir-32.png + See https://github.com/FirelyTeam/firely-net-sdk/releases + LICENSE + true + + + + + + + + - - $(DefineConstants) - - - - - 9.0 - True - Debug;Release;FullDebug - - - - portable - True - 1591 - false - $(DefineConstants);DEBUG;TRACE - - - - - True - true - ..\FhirNetApi.publickey - True - False - snupkg - 1591 - + + $(DefineConstants) + + + + + 9.0 + True + Debug;Release;FullDebug + + + + portable + True + 1591 + false + $(DefineConstants);DEBUG;TRACE + + + + + True + true + ..\FhirNetApi.publickey + True + False + snupkg + 1591 + diff --git a/src/firely-net-common.targets b/src/firely-net-common.targets deleted file mode 100644 index 225dce6cd..000000000 --- a/src/firely-net-common.targets +++ /dev/null @@ -1,34 +0,0 @@ - - - - <_TestTargetFramework Include="$(TargetFrameworks)" /> - - - - - - - - - - - - - <_VSTestFramework>%(_TestTargetFramework.Identity) - - - <_VSTestFrameworkString>.NETFramework,Version=v4.5 - - - <_VSTestFrameworkString>.NETFramework,Version=v4.5.2 - - - <_VSTestFrameworkString>.NETFramework,Version=v4.0 - - - <_VSTestFrameworkString>.NETCoreApp,Version=v2.1 - - - - - \ No newline at end of file From 6329e3f667d150923abe4cd98840e52bf86b9b61 Mon Sep 17 00:00:00 2001 From: Marco Visser Date: Tue, 19 Oct 2021 11:00:03 +0200 Subject: [PATCH 02/12] Adding README.md in NuGet package. See also https://docs.microsoft.com/en-us/nuget/nuget-org/package-readme-on-nuget-org --- src/firely-net-common.props | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/firely-net-common.props b/src/firely-net-common.props index c33a2d25c..5cff1142b 100644 --- a/src/firely-net-common.props +++ b/src/firely-net-common.props @@ -17,12 +17,14 @@ icon-fhir-32.png See https://github.com/FirelyTeam/firely-net-sdk/releases LICENSE + README.md true + + 1591 + + From 39a7af7fa887c17cc35a7ff0053516d80ce1768a Mon Sep 17 00:00:00 2001 From: Marco Visser Date: Tue, 19 Oct 2021 17:38:06 +0200 Subject: [PATCH 04/12] Adding detailed logging for packing phase --- build/azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index 62ff3237b..ea3f4f4e0 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -91,7 +91,7 @@ stages: searchPatternPack: '**/*.csproj;!**/*.Tests.csproj;!**/Sprache.csproj' configurationToPack: $(buildConfiguration) nobuild: true - verbosityPack: Normal + verbosityPack: Detailed - task: PublishBuildArtifacts@1 displayName: Publish Artifact From 621569fc4171494a405c6e6315f8712008bb18fb Mon Sep 17 00:00:00 2001 From: Marco Visser Date: Tue, 19 Oct 2021 17:47:02 +0200 Subject: [PATCH 05/12] Adding .NET 6 preview --- build/azure-pipelines.yml | 1 + build/build-variables.yml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index ea3f4f4e0..254ac0ef2 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -41,6 +41,7 @@ stages: displayName: 'Use .NET Core sdk $(NET_CORE_SDK)' inputs: version: $(NET_CORE_SDK) + includePreviewVersions: true - task: DotNetCoreCLI@2 displayName: Restore diff --git a/build/build-variables.yml b/build/build-variables.yml index a2de3331c..6eecf7415 100644 --- a/build/build-variables.yml +++ b/build/build-variables.yml @@ -3,7 +3,7 @@ # Variables used during builds. variables: - NET_CORE_SDK: 5.0.x + NET_CORE_SDK: 6.0.x DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true TEST_TARGETFRAMEWORK: net5.0 buildConfiguration: Release \ No newline at end of file From da7ba6249770a4002b79b158c09003416de3e841 Mon Sep 17 00:00:00 2001 From: Marco Visser Date: Tue, 19 Oct 2021 17:55:25 +0200 Subject: [PATCH 06/12] verbosity of Pack back to normal --- build/azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index 254ac0ef2..cf747f080 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -92,7 +92,7 @@ stages: searchPatternPack: '**/*.csproj;!**/*.Tests.csproj;!**/Sprache.csproj' configurationToPack: $(buildConfiguration) nobuild: true - verbosityPack: Detailed + verbosityPack: Normal - task: PublishBuildArtifacts@1 displayName: Publish Artifact From 0f3852c21419e7bf628c8a6acfa45b3a93ab4866 Mon Sep 17 00:00:00 2001 From: Marco Visser Date: Wed, 10 Nov 2021 11:54:14 +0100 Subject: [PATCH 07/12] Do not use preview SDK anymore --- build/azure-pipelines.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index cf747f080..62ff3237b 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -41,7 +41,6 @@ stages: displayName: 'Use .NET Core sdk $(NET_CORE_SDK)' inputs: version: $(NET_CORE_SDK) - includePreviewVersions: true - task: DotNetCoreCLI@2 displayName: Restore From ff4c2c8321f5594abe8facd3e2dfce29b6c76be6 Mon Sep 17 00:00:00 2001 From: Marco Visser Date: Thu, 11 Nov 2021 11:29:29 +0100 Subject: [PATCH 08/12] Move to net6.0 (replacement of net5.0) --- build/build-variables.yml | 2 +- src/firely-net-common-tests.props | 2 +- src/firely-net-common.props | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build/build-variables.yml b/build/build-variables.yml index 6eecf7415..7cb96882c 100644 --- a/build/build-variables.yml +++ b/build/build-variables.yml @@ -5,5 +5,5 @@ variables: NET_CORE_SDK: 6.0.x DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true - TEST_TARGETFRAMEWORK: net5.0 + TEST_TARGETFRAMEWORK: net6.0 buildConfiguration: Release \ No newline at end of file diff --git a/src/firely-net-common-tests.props b/src/firely-net-common-tests.props index 60d64b52f..050f41cde 100644 --- a/src/firely-net-common-tests.props +++ b/src/firely-net-common-tests.props @@ -1,6 +1,6 @@ - net5.0 + net6.0 diff --git a/src/firely-net-common.props b/src/firely-net-common.props index 5cff1142b..25a00bb2f 100644 --- a/src/firely-net-common.props +++ b/src/firely-net-common.props @@ -1,7 +1,7 @@ - net5.0;net452;netstandard2.0 + net6.0;net452;netstandard2.0 From c5e9815337b34114d486e6355b7f6665d6d16d17 Mon Sep 17 00:00:00 2001 From: Marco Visser Date: Thu, 11 Nov 2021 11:43:10 +0100 Subject: [PATCH 09/12] Use the task DotNet 6.0 for unit testing --- build/azure-pipelines.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index 62ff3237b..dae7e6d1f 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -108,6 +108,10 @@ stages: displayName: Tests common test projects steps: - checkout: none + - task: UseDotNet@2 + displayName: 'Use .NET Core sdk $(NET_CORE_SDK)' + inputs: + version: $(NET_CORE_SDK) - template: templates/test-job-template.yml parameters: testRunTitle: Tests common test projects From 8e935bdec9e48e7b39e73409a8001fd77cad8a44 Mon Sep 17 00:00:00 2001 From: Marco Visser Date: Thu, 11 Nov 2021 11:52:09 +0100 Subject: [PATCH 10/12] Use the task DotNet 6.0 for unit testing --- build/azure-pipelines.yml | 4 ---- build/templates/test-job-template.yml | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index dae7e6d1f..62ff3237b 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -108,10 +108,6 @@ stages: displayName: Tests common test projects steps: - checkout: none - - task: UseDotNet@2 - displayName: 'Use .NET Core sdk $(NET_CORE_SDK)' - inputs: - version: $(NET_CORE_SDK) - template: templates/test-job-template.yml parameters: testRunTitle: Tests common test projects diff --git a/build/templates/test-job-template.yml b/build/templates/test-job-template.yml index 1fb3c9343..879a21537 100644 --- a/build/templates/test-job-template.yml +++ b/build/templates/test-job-template.yml @@ -6,6 +6,10 @@ parameters: - name: projects steps: +- task: UseDotNet@2 + displayName: 'Use .NET Core sdk $(NET_CORE_SDK)' + inputs: + version: $(NET_CORE_SDK) - task: DownloadPipelineArtifact@2 inputs: displayName: Download Build artifacts From 70a49387350e345898771cd73f46562c7fa78b35 Mon Sep 17 00:00:00 2001 From: Marco Visser Date: Wed, 8 Dec 2021 16:07:48 +0100 Subject: [PATCH 11/12] Clean up a bit more --- src/Benchmarks/Benchmarks.csproj | 2 +- .../Hl7.Fhir.Support.Poco.Tests.csproj | 29 ++----------------- .../TestDictionaryImplementation.cs | 12 ++++---- 3 files changed, 10 insertions(+), 33 deletions(-) diff --git a/src/Benchmarks/Benchmarks.csproj b/src/Benchmarks/Benchmarks.csproj index 3f299bd45..d6587780d 100644 --- a/src/Benchmarks/Benchmarks.csproj +++ b/src/Benchmarks/Benchmarks.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 Benchmarks Firely.Sdk.Benchmarks.Common diff --git a/src/Hl7.Fhir.Support.Poco.Tests/Hl7.Fhir.Support.Poco.Tests.csproj b/src/Hl7.Fhir.Support.Poco.Tests/Hl7.Fhir.Support.Poco.Tests.csproj index 84d38d196..27ac69855 100644 --- a/src/Hl7.Fhir.Support.Poco.Tests/Hl7.Fhir.Support.Poco.Tests.csproj +++ b/src/Hl7.Fhir.Support.Poco.Tests/Hl7.Fhir.Support.Poco.Tests.csproj @@ -7,32 +7,9 @@ - - - - - - - - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - + + PreserveNewest + diff --git a/src/Hl7.Fhir.Support.Tests/Serialization/TestDictionaryImplementation.cs b/src/Hl7.Fhir.Support.Tests/Serialization/TestDictionaryImplementation.cs index 4e5560ee1..cf0e5e7a9 100644 --- a/src/Hl7.Fhir.Support.Tests/Serialization/TestDictionaryImplementation.cs +++ b/src/Hl7.Fhir.Support.Tests/Serialization/TestDictionaryImplementation.cs @@ -58,9 +58,9 @@ public void CanEnumerateNarrative() { IReadOnlyDictionary b = new Narrative("

bla

"); b.Count.Should().Be(2); - b.Should().BeEquivalentTo( - KeyValuePair.Create("div", new XHtml("

bla

")), - KeyValuePair.Create("status", new Code(Narrative.NarrativeStatus.Generated))); + b.Should().BeEquivalentTo(new KeyValuePair[] { + KeyValuePair.Create("div", new XHtml("

bla

")), + KeyValuePair.Create("status", new Code(Narrative.NarrativeStatus.Generated)) }); } [TestMethod] @@ -69,9 +69,9 @@ public void CanEnumerateExtension() // Explicitly test hand-written IROD implementation. IReadOnlyDictionary b = new Extension("http://nu.nl", new FhirBoolean(true)); b.Count.Should().Be(2); - b.Should().BeEquivalentTo( - KeyValuePair.Create("url", "http://nu.nl"), - KeyValuePair.Create("value", new FhirBoolean(true))); + b.Should().BeEquivalentTo(new KeyValuePair[] { + KeyValuePair.Create("url", "http://nu.nl"), + KeyValuePair.Create("value", new FhirBoolean(true)) }); b.TryGetValue("valueString", out _).Should().BeFalse(); b.TryGetValue("valueBoolean", out _).Should().BeFalse(); From f8137957e727c305264c6ab9ad8fe36d30512d97 Mon Sep 17 00:00:00 2001 From: Marco Visser Date: Wed, 8 Dec 2021 16:22:21 +0100 Subject: [PATCH 12/12] Update unittests (BeEquivalentTo works differently in 6.1.0) --- .../Serialization/TestDictionaryImplementation.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Hl7.Fhir.Support.Tests/Serialization/TestDictionaryImplementation.cs b/src/Hl7.Fhir.Support.Tests/Serialization/TestDictionaryImplementation.cs index cf0e5e7a9..3eeaea99d 100644 --- a/src/Hl7.Fhir.Support.Tests/Serialization/TestDictionaryImplementation.cs +++ b/src/Hl7.Fhir.Support.Tests/Serialization/TestDictionaryImplementation.cs @@ -50,7 +50,7 @@ public void CanEnumerateFhirPrimitive() public void CanEnumerateCodedValue() { IReadOnlyDictionary b = new Code(Narrative.NarrativeStatus.Additional); - b.Should().BeEquivalentTo(KeyValuePair.Create("value", Narrative.NarrativeStatus.Additional.GetLiteral())); + b.Should().BeEquivalentTo(new[] { KeyValuePair.Create("value", Narrative.NarrativeStatus.Additional.GetLiteral()) }); } [TestMethod] @@ -58,7 +58,7 @@ public void CanEnumerateNarrative() { IReadOnlyDictionary b = new Narrative("

bla

"); b.Count.Should().Be(2); - b.Should().BeEquivalentTo(new KeyValuePair[] { + b.Should().BeEquivalentTo(new[] { KeyValuePair.Create("div", new XHtml("

bla

")), KeyValuePair.Create("status", new Code(Narrative.NarrativeStatus.Generated)) }); } @@ -69,7 +69,7 @@ public void CanEnumerateExtension() // Explicitly test hand-written IROD implementation. IReadOnlyDictionary b = new Extension("http://nu.nl", new FhirBoolean(true)); b.Count.Should().Be(2); - b.Should().BeEquivalentTo(new KeyValuePair[] { + b.Should().BeEquivalentTo(new[] { KeyValuePair.Create("url", "http://nu.nl"), KeyValuePair.Create("value", new FhirBoolean(true)) });