From 50f088e750a425f05cb4d1b9f5be17897981c12b Mon Sep 17 00:00:00 2001 From: Christopher Granade Date: Fri, 5 Mar 2021 11:43:58 -0800 Subject: [PATCH 1/6] Update simulation code tests to use latest LSP API. --- .../CSharpGeneration.Tests/SimulationCodeTests.fs | 7 ++++--- .../CSharpGeneration.Tests/Tests.CSharpGeneration.fsproj | 5 +++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/Simulation/CSharpGeneration.Tests/SimulationCodeTests.fs b/src/Simulation/CSharpGeneration.Tests/SimulationCodeTests.fs index f1902a91616..dfe7a2e216d 100644 --- a/src/Simulation/CSharpGeneration.Tests/SimulationCodeTests.fs +++ b/src/Simulation/CSharpGeneration.Tests/SimulationCodeTests.fs @@ -89,9 +89,10 @@ namespace N1 let parse files = let mutable errors = [] : Diagnostic list let addError (diag : Diagnostic) = - match diag.Severity with - | DiagnosticSeverity.Error -> errors <- diag :: errors - | _ -> () + if diag.Severity.HasValue then + match diag.Severity.Value with + | DiagnosticSeverity.Error -> errors <- diag :: errors + | _ -> () let addSourceFile (mgr:CompilationUnitManager) fileName = let fileId = new Uri(Path.GetFullPath fileName) let file = CompilationUnitManager.InitializeFileManager(fileId, File.ReadAllText fileName) diff --git a/src/Simulation/CSharpGeneration.Tests/Tests.CSharpGeneration.fsproj b/src/Simulation/CSharpGeneration.Tests/Tests.CSharpGeneration.fsproj index 0a421156c67..d89919a96c5 100644 --- a/src/Simulation/CSharpGeneration.Tests/Tests.CSharpGeneration.fsproj +++ b/src/Simulation/CSharpGeneration.Tests/Tests.CSharpGeneration.fsproj @@ -57,4 +57,9 @@ + + + + + From e8daa10fb1634c2a9ec206c0ead29d3a0c8a1b0e Mon Sep 17 00:00:00 2001 From: Christopher Granade Date: Fri, 5 Mar 2021 11:46:18 -0800 Subject: [PATCH 2/6] Update entry point generator tests as well. --- .../Tests.Microsoft.Quantum.EntryPointDriver.fsproj | 5 +++++ src/Simulation/EntryPointDriver.Tests/Tests.fs | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Simulation/EntryPointDriver.Tests/Tests.Microsoft.Quantum.EntryPointDriver.fsproj b/src/Simulation/EntryPointDriver.Tests/Tests.Microsoft.Quantum.EntryPointDriver.fsproj index e78068c09ba..ab751569960 100644 --- a/src/Simulation/EntryPointDriver.Tests/Tests.Microsoft.Quantum.EntryPointDriver.fsproj +++ b/src/Simulation/EntryPointDriver.Tests/Tests.Microsoft.Quantum.EntryPointDriver.fsproj @@ -35,4 +35,9 @@ + + + + + diff --git a/src/Simulation/EntryPointDriver.Tests/Tests.fs b/src/Simulation/EntryPointDriver.Tests/Tests.fs index c386ef1014f..3cfb17f8a14 100644 --- a/src/Simulation/EntryPointDriver.Tests/Tests.fs +++ b/src/Simulation/EntryPointDriver.Tests/Tests.fs @@ -63,7 +63,7 @@ let private compileQSharp source = let compilation = compilationManager.Build () let errors = compilation.Diagnostics () - |> Seq.filter (fun diagnostic -> diagnostic.Severity = DiagnosticSeverity.Error) + |> Seq.filter (fun diagnostic -> diagnostic.Severity = Nullable DiagnosticSeverity.Error) Assert.Empty errors compilation.BuiltCompilation From 767c8bb402b7db2b268cff6a4df213dc99fb136f Mon Sep 17 00:00:00 2001 From: Christopher Granade Date: Fri, 5 Mar 2021 14:55:47 -0800 Subject: [PATCH 3/6] Update to latest compiler beta. --- .../CSharpGeneration.Tests/Tests.CSharpGeneration.fsproj | 5 ----- .../Microsoft.Quantum.CSharpGeneration.fsproj | 2 +- .../Tests.Microsoft.Quantum.EntryPointDriver.fsproj | 5 ----- 3 files changed, 1 insertion(+), 11 deletions(-) diff --git a/src/Simulation/CSharpGeneration.Tests/Tests.CSharpGeneration.fsproj b/src/Simulation/CSharpGeneration.Tests/Tests.CSharpGeneration.fsproj index d89919a96c5..0a421156c67 100644 --- a/src/Simulation/CSharpGeneration.Tests/Tests.CSharpGeneration.fsproj +++ b/src/Simulation/CSharpGeneration.Tests/Tests.CSharpGeneration.fsproj @@ -57,9 +57,4 @@ - - - - - diff --git a/src/Simulation/CSharpGeneration/Microsoft.Quantum.CSharpGeneration.fsproj b/src/Simulation/CSharpGeneration/Microsoft.Quantum.CSharpGeneration.fsproj index 589624b2877..2b666f6ee5d 100644 --- a/src/Simulation/CSharpGeneration/Microsoft.Quantum.CSharpGeneration.fsproj +++ b/src/Simulation/CSharpGeneration/Microsoft.Quantum.CSharpGeneration.fsproj @@ -22,7 +22,7 @@ - + diff --git a/src/Simulation/EntryPointDriver.Tests/Tests.Microsoft.Quantum.EntryPointDriver.fsproj b/src/Simulation/EntryPointDriver.Tests/Tests.Microsoft.Quantum.EntryPointDriver.fsproj index ab751569960..e78068c09ba 100644 --- a/src/Simulation/EntryPointDriver.Tests/Tests.Microsoft.Quantum.EntryPointDriver.fsproj +++ b/src/Simulation/EntryPointDriver.Tests/Tests.Microsoft.Quantum.EntryPointDriver.fsproj @@ -35,9 +35,4 @@ - - - - - From 9bddf662dbceef86bdeaa60b78653293eb9c6297 Mon Sep 17 00:00:00 2001 From: Chris Granade Date: Tue, 9 Mar 2021 19:35:21 -0800 Subject: [PATCH 4/6] Update ci.yml --- build/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/ci.yml b/build/ci.yml index 662f7f6f33b..111b68c0595 100644 --- a/build/ci.yml +++ b/build/ci.yml @@ -22,7 +22,7 @@ variables: Drops.Dir: $(Build.ArtifactStagingDirectory)/drops Drop.Native: $(System.DefaultWorkingDirectory)/xplat CI: "true" - ENABLE_QIRRUNTIME: "true" + ENABLE_QIRRUNTIME: "false" jobs: - job: build From 0ebc85c47f1d9f44610b592b7707e47982d56940 Mon Sep 17 00:00:00 2001 From: Ricardo Espinoza Date: Wed, 10 Mar 2021 09:46:37 -0800 Subject: [PATCH 5/6] Update SDK version across repository to 0.15.2103130749-beta --- AdvantageBenchmark/privateBuild/host.csproj | 2 +- AdvantageBenchmark/releasedBuild/quantum/quantum.csproj | 2 +- .../qsharp/qir-standalone-input-reference.csproj | 2 +- src/QirRuntime/test/QIR-static/qsharp/qir-gen.csproj | 2 +- ....Microsoft.Quantum.Simulation.QCTraceSimulatorRuntime.csproj | 2 +- src/Simulation/QSharpCore/Microsoft.Quantum.QSharp.Core.csproj | 2 +- .../QSharpFoundation/Microsoft.Quantum.QSharp.Foundation.csproj | 2 +- .../TestProjects/HoneywellExe/HoneywellExe.csproj | 2 +- .../TestProjects/IntrinsicTests/IntrinsicTests.csproj | 2 +- .../Simulators.Tests/TestProjects/IonQExe/IonQExe.csproj | 2 +- .../Simulators.Tests/TestProjects/Library1/Library1.csproj | 2 +- .../Simulators.Tests/TestProjects/Library2/Library2.csproj | 2 +- .../Simulators.Tests/TestProjects/QCIExe/QCIExe.csproj | 2 +- .../Simulators.Tests/TestProjects/QSharpExe/QSharpExe.csproj | 2 +- .../TestProjects/TargetedExe/TargetedExe.csproj | 2 +- .../Simulators.Tests/TestProjects/UnitTests/UnitTests.csproj | 2 +- .../Simulators.Tests/Tests.Microsoft.Quantum.Simulators.csproj | 2 +- .../Tests.Microsoft.Quantum.Simulators.Type1.csproj | 2 +- .../Tests.Microsoft.Quantum.Simulators.Type2.csproj | 2 +- .../Tests.Microsoft.Quantum.Simulators.Type3.csproj | 2 +- src/Simulation/Simulators/Microsoft.Quantum.Simulators.csproj | 2 +- src/Simulation/Type1Core/Microsoft.Quantum.Type1.Core.csproj | 2 +- src/Simulation/Type2Core/Microsoft.Quantum.Type2.Core.csproj | 2 +- src/Simulation/Type3Core/Microsoft.Quantum.Type3.Core.csproj | 2 +- 24 files changed, 24 insertions(+), 24 deletions(-) diff --git a/AdvantageBenchmark/privateBuild/host.csproj b/AdvantageBenchmark/privateBuild/host.csproj index c38a2e4750d..422cd590f67 100644 --- a/AdvantageBenchmark/privateBuild/host.csproj +++ b/AdvantageBenchmark/privateBuild/host.csproj @@ -1,4 +1,4 @@ - + diff --git a/AdvantageBenchmark/releasedBuild/quantum/quantum.csproj b/AdvantageBenchmark/releasedBuild/quantum/quantum.csproj index d92408e6a0e..50c82fa9032 100644 --- a/AdvantageBenchmark/releasedBuild/quantum/quantum.csproj +++ b/AdvantageBenchmark/releasedBuild/quantum/quantum.csproj @@ -1,4 +1,4 @@ - + diff --git a/src/QirRuntime/samples/StandaloneInputReference/qsharp/qir-standalone-input-reference.csproj b/src/QirRuntime/samples/StandaloneInputReference/qsharp/qir-standalone-input-reference.csproj index 6508397f9e8..dc30ec6b33f 100644 --- a/src/QirRuntime/samples/StandaloneInputReference/qsharp/qir-standalone-input-reference.csproj +++ b/src/QirRuntime/samples/StandaloneInputReference/qsharp/qir-standalone-input-reference.csproj @@ -1,4 +1,4 @@ - + Exe diff --git a/src/QirRuntime/test/QIR-static/qsharp/qir-gen.csproj b/src/QirRuntime/test/QIR-static/qsharp/qir-gen.csproj index cafd2d3365a..75a033a2193 100644 --- a/src/QirRuntime/test/QIR-static/qsharp/qir-gen.csproj +++ b/src/QirRuntime/test/QIR-static/qsharp/qir-gen.csproj @@ -1,4 +1,4 @@ - + Exe diff --git a/src/Simulation/QCTraceSimulator.Tests/Tests.Microsoft.Quantum.Simulation.QCTraceSimulatorRuntime.csproj b/src/Simulation/QCTraceSimulator.Tests/Tests.Microsoft.Quantum.Simulation.QCTraceSimulatorRuntime.csproj index 6d68cbcfd1f..4ddaacb5478 100644 --- a/src/Simulation/QCTraceSimulator.Tests/Tests.Microsoft.Quantum.Simulation.QCTraceSimulatorRuntime.csproj +++ b/src/Simulation/QCTraceSimulator.Tests/Tests.Microsoft.Quantum.Simulation.QCTraceSimulatorRuntime.csproj @@ -1,4 +1,4 @@ - + diff --git a/src/Simulation/QSharpCore/Microsoft.Quantum.QSharp.Core.csproj b/src/Simulation/QSharpCore/Microsoft.Quantum.QSharp.Core.csproj index ca3c3be6651..5a3259aaefe 100644 --- a/src/Simulation/QSharpCore/Microsoft.Quantum.QSharp.Core.csproj +++ b/src/Simulation/QSharpCore/Microsoft.Quantum.QSharp.Core.csproj @@ -1,4 +1,4 @@ - + diff --git a/src/Simulation/QSharpFoundation/Microsoft.Quantum.QSharp.Foundation.csproj b/src/Simulation/QSharpFoundation/Microsoft.Quantum.QSharp.Foundation.csproj index d06dc33ddc3..6e2ebc85e7f 100644 --- a/src/Simulation/QSharpFoundation/Microsoft.Quantum.QSharp.Foundation.csproj +++ b/src/Simulation/QSharpFoundation/Microsoft.Quantum.QSharp.Foundation.csproj @@ -1,4 +1,4 @@ - + diff --git a/src/Simulation/Simulators.Tests/TestProjects/HoneywellExe/HoneywellExe.csproj b/src/Simulation/Simulators.Tests/TestProjects/HoneywellExe/HoneywellExe.csproj index 0e85b9642da..41d13f419bd 100644 --- a/src/Simulation/Simulators.Tests/TestProjects/HoneywellExe/HoneywellExe.csproj +++ b/src/Simulation/Simulators.Tests/TestProjects/HoneywellExe/HoneywellExe.csproj @@ -1,4 +1,4 @@ - + Exe diff --git a/src/Simulation/Simulators.Tests/TestProjects/IntrinsicTests/IntrinsicTests.csproj b/src/Simulation/Simulators.Tests/TestProjects/IntrinsicTests/IntrinsicTests.csproj index 676d025b48b..1a751162446 100644 --- a/src/Simulation/Simulators.Tests/TestProjects/IntrinsicTests/IntrinsicTests.csproj +++ b/src/Simulation/Simulators.Tests/TestProjects/IntrinsicTests/IntrinsicTests.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.1 diff --git a/src/Simulation/Simulators.Tests/TestProjects/IonQExe/IonQExe.csproj b/src/Simulation/Simulators.Tests/TestProjects/IonQExe/IonQExe.csproj index 885b0acb808..9dca549e624 100644 --- a/src/Simulation/Simulators.Tests/TestProjects/IonQExe/IonQExe.csproj +++ b/src/Simulation/Simulators.Tests/TestProjects/IonQExe/IonQExe.csproj @@ -1,4 +1,4 @@ - + Exe diff --git a/src/Simulation/Simulators.Tests/TestProjects/Library1/Library1.csproj b/src/Simulation/Simulators.Tests/TestProjects/Library1/Library1.csproj index df41722f72e..8d99e867492 100644 --- a/src/Simulation/Simulators.Tests/TestProjects/Library1/Library1.csproj +++ b/src/Simulation/Simulators.Tests/TestProjects/Library1/Library1.csproj @@ -1,4 +1,4 @@ - + netstandard2.1 diff --git a/src/Simulation/Simulators.Tests/TestProjects/Library2/Library2.csproj b/src/Simulation/Simulators.Tests/TestProjects/Library2/Library2.csproj index df41722f72e..8d99e867492 100644 --- a/src/Simulation/Simulators.Tests/TestProjects/Library2/Library2.csproj +++ b/src/Simulation/Simulators.Tests/TestProjects/Library2/Library2.csproj @@ -1,4 +1,4 @@ - + netstandard2.1 diff --git a/src/Simulation/Simulators.Tests/TestProjects/QCIExe/QCIExe.csproj b/src/Simulation/Simulators.Tests/TestProjects/QCIExe/QCIExe.csproj index b4470d362ec..8befb110c86 100644 --- a/src/Simulation/Simulators.Tests/TestProjects/QCIExe/QCIExe.csproj +++ b/src/Simulation/Simulators.Tests/TestProjects/QCIExe/QCIExe.csproj @@ -1,4 +1,4 @@ - + Exe diff --git a/src/Simulation/Simulators.Tests/TestProjects/QSharpExe/QSharpExe.csproj b/src/Simulation/Simulators.Tests/TestProjects/QSharpExe/QSharpExe.csproj index c009660dcd5..d807ca12f3d 100644 --- a/src/Simulation/Simulators.Tests/TestProjects/QSharpExe/QSharpExe.csproj +++ b/src/Simulation/Simulators.Tests/TestProjects/QSharpExe/QSharpExe.csproj @@ -1,4 +1,4 @@ - + Exe diff --git a/src/Simulation/Simulators.Tests/TestProjects/TargetedExe/TargetedExe.csproj b/src/Simulation/Simulators.Tests/TestProjects/TargetedExe/TargetedExe.csproj index d9647d6c65a..926e3a698b3 100644 --- a/src/Simulation/Simulators.Tests/TestProjects/TargetedExe/TargetedExe.csproj +++ b/src/Simulation/Simulators.Tests/TestProjects/TargetedExe/TargetedExe.csproj @@ -1,4 +1,4 @@ - + Exe diff --git a/src/Simulation/Simulators.Tests/TestProjects/UnitTests/UnitTests.csproj b/src/Simulation/Simulators.Tests/TestProjects/UnitTests/UnitTests.csproj index f9f22b5d19d..f9bb1941fb3 100644 --- a/src/Simulation/Simulators.Tests/TestProjects/UnitTests/UnitTests.csproj +++ b/src/Simulation/Simulators.Tests/TestProjects/UnitTests/UnitTests.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.1 diff --git a/src/Simulation/Simulators.Tests/Tests.Microsoft.Quantum.Simulators.csproj b/src/Simulation/Simulators.Tests/Tests.Microsoft.Quantum.Simulators.csproj index 013448b7f74..74861b061e7 100644 --- a/src/Simulation/Simulators.Tests/Tests.Microsoft.Quantum.Simulators.csproj +++ b/src/Simulation/Simulators.Tests/Tests.Microsoft.Quantum.Simulators.csproj @@ -1,4 +1,4 @@ - + diff --git a/src/Simulation/Simulators.Type1.Tests/Tests.Microsoft.Quantum.Simulators.Type1.csproj b/src/Simulation/Simulators.Type1.Tests/Tests.Microsoft.Quantum.Simulators.Type1.csproj index 7717b8f1682..e0e3f72e741 100644 --- a/src/Simulation/Simulators.Type1.Tests/Tests.Microsoft.Quantum.Simulators.Type1.csproj +++ b/src/Simulation/Simulators.Type1.Tests/Tests.Microsoft.Quantum.Simulators.Type1.csproj @@ -1,4 +1,4 @@ - + diff --git a/src/Simulation/Simulators.Type2.Tests/Tests.Microsoft.Quantum.Simulators.Type2.csproj b/src/Simulation/Simulators.Type2.Tests/Tests.Microsoft.Quantum.Simulators.Type2.csproj index 7f7435faf90..a48ce4a0e54 100644 --- a/src/Simulation/Simulators.Type2.Tests/Tests.Microsoft.Quantum.Simulators.Type2.csproj +++ b/src/Simulation/Simulators.Type2.Tests/Tests.Microsoft.Quantum.Simulators.Type2.csproj @@ -1,4 +1,4 @@ - + diff --git a/src/Simulation/Simulators.Type3.Tests/Tests.Microsoft.Quantum.Simulators.Type3.csproj b/src/Simulation/Simulators.Type3.Tests/Tests.Microsoft.Quantum.Simulators.Type3.csproj index fa4bb43fa21..a667973bb0f 100644 --- a/src/Simulation/Simulators.Type3.Tests/Tests.Microsoft.Quantum.Simulators.Type3.csproj +++ b/src/Simulation/Simulators.Type3.Tests/Tests.Microsoft.Quantum.Simulators.Type3.csproj @@ -1,4 +1,4 @@ - + diff --git a/src/Simulation/Simulators/Microsoft.Quantum.Simulators.csproj b/src/Simulation/Simulators/Microsoft.Quantum.Simulators.csproj index bccfd4022a8..e16bde73d07 100644 --- a/src/Simulation/Simulators/Microsoft.Quantum.Simulators.csproj +++ b/src/Simulation/Simulators/Microsoft.Quantum.Simulators.csproj @@ -1,4 +1,4 @@ - + diff --git a/src/Simulation/Type1Core/Microsoft.Quantum.Type1.Core.csproj b/src/Simulation/Type1Core/Microsoft.Quantum.Type1.Core.csproj index 48d17d33cfa..5987caf0baa 100644 --- a/src/Simulation/Type1Core/Microsoft.Quantum.Type1.Core.csproj +++ b/src/Simulation/Type1Core/Microsoft.Quantum.Type1.Core.csproj @@ -1,4 +1,4 @@ - + diff --git a/src/Simulation/Type2Core/Microsoft.Quantum.Type2.Core.csproj b/src/Simulation/Type2Core/Microsoft.Quantum.Type2.Core.csproj index 0bdc65ac1aa..3cd88162088 100644 --- a/src/Simulation/Type2Core/Microsoft.Quantum.Type2.Core.csproj +++ b/src/Simulation/Type2Core/Microsoft.Quantum.Type2.Core.csproj @@ -1,4 +1,4 @@ - + diff --git a/src/Simulation/Type3Core/Microsoft.Quantum.Type3.Core.csproj b/src/Simulation/Type3Core/Microsoft.Quantum.Type3.Core.csproj index a0d68f37051..9e4252461a8 100644 --- a/src/Simulation/Type3Core/Microsoft.Quantum.Type3.Core.csproj +++ b/src/Simulation/Type3Core/Microsoft.Quantum.Type3.Core.csproj @@ -1,4 +1,4 @@ - + From 29b426d967dabd8708adffca82d7e2619a314f6f Mon Sep 17 00:00:00 2001 From: Ricardo Espinoza Date: Wed, 10 Mar 2021 09:47:57 -0800 Subject: [PATCH 6/6] Fixing remaining file for SDK version --- .../TestProjects/Library with Spaces/Library with Spaces.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Simulation/Simulators.Tests/TestProjects/Library with Spaces/Library with Spaces.csproj b/src/Simulation/Simulators.Tests/TestProjects/Library with Spaces/Library with Spaces.csproj index 8236575e628..9ffe7425982 100644 --- a/src/Simulation/Simulators.Tests/TestProjects/Library with Spaces/Library with Spaces.csproj +++ b/src/Simulation/Simulators.Tests/TestProjects/Library with Spaces/Library with Spaces.csproj @@ -1,4 +1,4 @@ - + netstandard2.1 false