From b2560439cfb20d1561ca604f92c9843dce7ef672 Mon Sep 17 00:00:00 2001 From: Scott Carda Date: Thu, 10 Jun 2021 13:15:45 -0700 Subject: [PATCH 1/5] Added tool to pack --- build/pack.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/build/pack.ps1 b/build/pack.ps1 index a3ff5e9c211..66775c61473 100644 --- a/build/pack.ps1 +++ b/build/pack.ps1 @@ -99,6 +99,7 @@ Pack-Dotnet '../src/Simulation/Type1Core/Microsoft.Quantum.Type1.Core.csproj' Pack-Dotnet '../src/Simulation/Type2Core/Microsoft.Quantum.Type2.Core.csproj' Pack-Dotnet '../src/Simulation/Type3Core/Microsoft.Quantum.Type3.Core.csproj' Pack-Dotnet '../src/Qir/Execution/Tools/Microsoft.Quantum.Qir.Tools.csproj' -ForcePrerelease +Pack-Dotnet '../src/Qir/Execution/QirCommandLineTool/QirCommandLineTool.csproj' -ForcePrerelease Pack-One '../src/Simulation/Simulators/Microsoft.Quantum.Simulators.nuspec' Pack-One '../src/Quantum.Development.Kit/Microsoft.Quantum.Development.Kit.nuspec' Pack-One '../src/Xunit/Microsoft.Quantum.Xunit.csproj' From 0f67516366e49bc0c526a8bed76b832ef26db75c Mon Sep 17 00:00:00 2001 From: Scott Carda Date: Thu, 10 Jun 2021 14:51:21 -0700 Subject: [PATCH 2/5] Rename --- Simulation.sln | 38 +++++++++---------- build/pack.ps1 | 2 +- ...rosoft.Quantum.Qir.CommandLineTool.csproj} | 6 +++ .../Program.cs | 2 +- 4 files changed, 27 insertions(+), 21 deletions(-) rename src/Qir/Execution/{QirCommandLineTool/QirCommandLineTool.csproj => CommandLineTool/Microsoft.Quantum.Qir.CommandLineTool.csproj} (65%) rename src/Qir/Execution/{QirCommandLineTool => CommandLineTool}/Program.cs (99%) diff --git a/Simulation.sln b/Simulation.sln index f636b1c1a9a..9e953b35278 100644 --- a/Simulation.sln +++ b/Simulation.sln @@ -123,9 +123,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Quantum.Qir.Tools EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tests.Microsoft.Quantum.Qir.Tools", "src\Qir\Execution\Tests.Microsoft.Quantum.Qir.Tools\Tests.Microsoft.Quantum.Qir.Tools.csproj", "{4794FC80-4594-403F-AFEC-4889EFE87EA0}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "QirCommandLineTool", "src\Qir\Execution\QirCommandLineTool\QirCommandLineTool.csproj", "{039D2649-20F6-46C7-8599-C44F3AA2CD4C}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "QirExe", "src\Simulation\Simulators.Tests\TestProjects\QirExe\QirExe.csproj", "{A0B98D0E-FC28-4FD8-8806-4825B9F5489D}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QirExe", "src\Simulation\Simulators.Tests\TestProjects\QirExe\QirExe.csproj", "{A0B98D0E-FC28-4FD8-8806-4825B9F5489D}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Quantum.Qir.CommandLineTool", "src\Qir\Execution\CommandLineTool\Microsoft.Quantum.Qir.CommandLineTool.csproj", "{EAABB911-02EE-4A05-B566-0084013FC5CD}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -811,22 +811,6 @@ Global {4794FC80-4594-403F-AFEC-4889EFE87EA0}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU {4794FC80-4594-403F-AFEC-4889EFE87EA0}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU {4794FC80-4594-403F-AFEC-4889EFE87EA0}.RelWithDebInfo|x64.Build.0 = Release|Any CPU - {039D2649-20F6-46C7-8599-C44F3AA2CD4C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {039D2649-20F6-46C7-8599-C44F3AA2CD4C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {039D2649-20F6-46C7-8599-C44F3AA2CD4C}.Debug|x64.ActiveCfg = Debug|Any CPU - {039D2649-20F6-46C7-8599-C44F3AA2CD4C}.Debug|x64.Build.0 = Debug|Any CPU - {039D2649-20F6-46C7-8599-C44F3AA2CD4C}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU - {039D2649-20F6-46C7-8599-C44F3AA2CD4C}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU - {039D2649-20F6-46C7-8599-C44F3AA2CD4C}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU - {039D2649-20F6-46C7-8599-C44F3AA2CD4C}.MinSizeRel|x64.Build.0 = Debug|Any CPU - {039D2649-20F6-46C7-8599-C44F3AA2CD4C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {039D2649-20F6-46C7-8599-C44F3AA2CD4C}.Release|Any CPU.Build.0 = Release|Any CPU - {039D2649-20F6-46C7-8599-C44F3AA2CD4C}.Release|x64.ActiveCfg = Release|Any CPU - {039D2649-20F6-46C7-8599-C44F3AA2CD4C}.Release|x64.Build.0 = Release|Any CPU - {039D2649-20F6-46C7-8599-C44F3AA2CD4C}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU - {039D2649-20F6-46C7-8599-C44F3AA2CD4C}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU - {039D2649-20F6-46C7-8599-C44F3AA2CD4C}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU - {039D2649-20F6-46C7-8599-C44F3AA2CD4C}.RelWithDebInfo|x64.Build.0 = Release|Any CPU {A0B98D0E-FC28-4FD8-8806-4825B9F5489D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A0B98D0E-FC28-4FD8-8806-4825B9F5489D}.Debug|Any CPU.Build.0 = Debug|Any CPU {A0B98D0E-FC28-4FD8-8806-4825B9F5489D}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -843,6 +827,22 @@ Global {A0B98D0E-FC28-4FD8-8806-4825B9F5489D}.RelWithDebInfo|Any CPU.Build.0 = Debug|Any CPU {A0B98D0E-FC28-4FD8-8806-4825B9F5489D}.RelWithDebInfo|x64.ActiveCfg = Debug|Any CPU {A0B98D0E-FC28-4FD8-8806-4825B9F5489D}.RelWithDebInfo|x64.Build.0 = Debug|Any CPU + {EAABB911-02EE-4A05-B566-0084013FC5CD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EAABB911-02EE-4A05-B566-0084013FC5CD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EAABB911-02EE-4A05-B566-0084013FC5CD}.Debug|x64.ActiveCfg = Debug|Any CPU + {EAABB911-02EE-4A05-B566-0084013FC5CD}.Debug|x64.Build.0 = Debug|Any CPU + {EAABB911-02EE-4A05-B566-0084013FC5CD}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU + {EAABB911-02EE-4A05-B566-0084013FC5CD}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU + {EAABB911-02EE-4A05-B566-0084013FC5CD}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU + {EAABB911-02EE-4A05-B566-0084013FC5CD}.MinSizeRel|x64.Build.0 = Debug|Any CPU + {EAABB911-02EE-4A05-B566-0084013FC5CD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EAABB911-02EE-4A05-B566-0084013FC5CD}.Release|Any CPU.Build.0 = Release|Any CPU + {EAABB911-02EE-4A05-B566-0084013FC5CD}.Release|x64.ActiveCfg = Release|Any CPU + {EAABB911-02EE-4A05-B566-0084013FC5CD}.Release|x64.Build.0 = Release|Any CPU + {EAABB911-02EE-4A05-B566-0084013FC5CD}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU + {EAABB911-02EE-4A05-B566-0084013FC5CD}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU + {EAABB911-02EE-4A05-B566-0084013FC5CD}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU + {EAABB911-02EE-4A05-B566-0084013FC5CD}.RelWithDebInfo|x64.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -901,8 +901,8 @@ Global {442E66C8-F69F-44E9-9CD9-1F52C37EA41B} = {F6C2D4C0-12DC-40E3-9C86-FA5308D9B567} {C60226E3-98DE-4E92-AED4-B4A93D4CA063} = {442E66C8-F69F-44E9-9CD9-1F52C37EA41B} {4794FC80-4594-403F-AFEC-4889EFE87EA0} = {442E66C8-F69F-44E9-9CD9-1F52C37EA41B} - {039D2649-20F6-46C7-8599-C44F3AA2CD4C} = {442E66C8-F69F-44E9-9CD9-1F52C37EA41B} {A0B98D0E-FC28-4FD8-8806-4825B9F5489D} = {09C842CB-930C-4C7D-AD5F-E30DE4A55820} + {EAABB911-02EE-4A05-B566-0084013FC5CD} = {442E66C8-F69F-44E9-9CD9-1F52C37EA41B} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {929C0464-86D8-4F70-8835-0A5EAF930821} diff --git a/build/pack.ps1 b/build/pack.ps1 index 66775c61473..8a73d57af14 100644 --- a/build/pack.ps1 +++ b/build/pack.ps1 @@ -99,7 +99,7 @@ Pack-Dotnet '../src/Simulation/Type1Core/Microsoft.Quantum.Type1.Core.csproj' Pack-Dotnet '../src/Simulation/Type2Core/Microsoft.Quantum.Type2.Core.csproj' Pack-Dotnet '../src/Simulation/Type3Core/Microsoft.Quantum.Type3.Core.csproj' Pack-Dotnet '../src/Qir/Execution/Tools/Microsoft.Quantum.Qir.Tools.csproj' -ForcePrerelease -Pack-Dotnet '../src/Qir/Execution/QirCommandLineTool/QirCommandLineTool.csproj' -ForcePrerelease +Pack-Dotnet '../src/Qir/Execution/CommandLineTool/Microsoft.Quantum.Qir.CommandLineTool.csproj' -ForcePrerelease Pack-One '../src/Simulation/Simulators/Microsoft.Quantum.Simulators.nuspec' Pack-One '../src/Quantum.Development.Kit/Microsoft.Quantum.Development.Kit.nuspec' Pack-One '../src/Xunit/Microsoft.Quantum.Xunit.csproj' diff --git a/src/Qir/Execution/QirCommandLineTool/QirCommandLineTool.csproj b/src/Qir/Execution/CommandLineTool/Microsoft.Quantum.Qir.CommandLineTool.csproj similarity index 65% rename from src/Qir/Execution/QirCommandLineTool/QirCommandLineTool.csproj rename to src/Qir/Execution/CommandLineTool/Microsoft.Quantum.Qir.CommandLineTool.csproj index bbbd132751f..fadadbfe320 100644 --- a/src/Qir/Execution/QirCommandLineTool/QirCommandLineTool.csproj +++ b/src/Qir/Execution/CommandLineTool/Microsoft.Quantum.Qir.CommandLineTool.csproj @@ -3,7 +3,13 @@ Exe netcoreapp3.1 + + + true + QirCommandLineTool + Command-line tool for interacting with QIR. + Quantum QIR diff --git a/src/Qir/Execution/QirCommandLineTool/Program.cs b/src/Qir/Execution/CommandLineTool/Program.cs similarity index 99% rename from src/Qir/Execution/QirCommandLineTool/Program.cs rename to src/Qir/Execution/CommandLineTool/Program.cs index 6bdeb704674..9ffd39908bb 100644 --- a/src/Qir/Execution/QirCommandLineTool/Program.cs +++ b/src/Qir/Execution/CommandLineTool/Program.cs @@ -12,7 +12,7 @@ using System.Threading.Tasks; using Microsoft.Quantum.Qir.Tools; -namespace Microsoft.Quantum.CommandLineCompiler +namespace Microsoft.Quantum.Qir.CommandLineTool { class Program { From 9393625cad3a44bcec61924c5a4b88b741d5278a Mon Sep 17 00:00:00 2001 From: Scott Carda Date: Thu, 10 Jun 2021 17:17:47 -0700 Subject: [PATCH 3/5] Put tool in internal_nuget dir. --- build/pack.ps1 | 1 + build/set-env.ps1 | 2 ++ 2 files changed, 3 insertions(+) diff --git a/build/pack.ps1 b/build/pack.ps1 index 8a73d57af14..a15f61f464c 100644 --- a/build/pack.ps1 +++ b/build/pack.ps1 @@ -104,6 +104,7 @@ Pack-One '../src/Simulation/Simulators/Microsoft.Quantum.Simulators.nuspec' Pack-One '../src/Quantum.Development.Kit/Microsoft.Quantum.Development.Kit.nuspec' Pack-One '../src/Xunit/Microsoft.Quantum.Xunit.csproj' Pack-One '../src/Qir/Runtime/Microsoft.Quantum.Qir.Runtime.nuspec' -ForcePrerelease +Copy-Item (Join-Path $Env:NUGET_OUTDIR Microsoft.Quantum.Qir.CommandLineTool.*) $Env:TOOLS_OUTDIR if (-not $all_ok) { throw "At least one project failed to pack. Check the logs." diff --git a/build/set-env.ps1 b/build/set-env.ps1 index 39799bdf9f7..5c06ab6a861 100644 --- a/build/set-env.ps1 +++ b/build/set-env.ps1 @@ -21,6 +21,8 @@ if ($Env:ENABLE_QIRRUNTIME -ne "false" -and $Env:QIR_DROPS -eq $null) { If ($Env:DROPS_DIR -eq $null) { $Env:DROPS_DIR = [IO.Path]::GetFullPath((Join-Path $PSScriptRoot "..\drops")) } +If ($Env:TOOLS_OUTDIR -eq $null) { $Env:TOOLS_OUTDIR = (Join-Path $Env:DROPS_DIR "internal_nugets") } +If (-not (Test-Path -Path $Env:TOOLS_OUTDIR)) { [IO.Directory]::CreateDirectory($Env:TOOLS_OUTDIR) } If ($Env:NUGET_OUTDIR -eq $null) { $Env:NUGET_OUTDIR = (Join-Path $Env:DROPS_DIR "nugets") } If (-not (Test-Path -Path $Env:NUGET_OUTDIR)) { [IO.Directory]::CreateDirectory($Env:NUGET_OUTDIR) } From a144e6b5265583237d9be940becf914c6d8c825f Mon Sep 17 00:00:00 2001 From: Scott Carda Date: Fri, 11 Jun 2021 16:13:27 -0700 Subject: [PATCH 4/5] use move instead of copy --- build/pack.ps1 | 3 ++- build/set-env.ps1 | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/build/pack.ps1 b/build/pack.ps1 index a15f61f464c..a467e0c0fa5 100644 --- a/build/pack.ps1 +++ b/build/pack.ps1 @@ -104,7 +104,8 @@ Pack-One '../src/Simulation/Simulators/Microsoft.Quantum.Simulators.nuspec' Pack-One '../src/Quantum.Development.Kit/Microsoft.Quantum.Development.Kit.nuspec' Pack-One '../src/Xunit/Microsoft.Quantum.Xunit.csproj' Pack-One '../src/Qir/Runtime/Microsoft.Quantum.Qir.Runtime.nuspec' -ForcePrerelease -Copy-Item (Join-Path $Env:NUGET_OUTDIR Microsoft.Quantum.Qir.CommandLineTool.*) $Env:TOOLS_OUTDIR + +Move-Item -Path (Join-Path $Env:NUGET_OUTDIR Microsoft.Quantum.Qir.CommandLineTool.*) -Destination $Env:INTERNAL_TOOLS_OUTDIR if (-not $all_ok) { throw "At least one project failed to pack. Check the logs." diff --git a/build/set-env.ps1 b/build/set-env.ps1 index 5c06ab6a861..52561fdf2af 100644 --- a/build/set-env.ps1 +++ b/build/set-env.ps1 @@ -21,8 +21,8 @@ if ($Env:ENABLE_QIRRUNTIME -ne "false" -and $Env:QIR_DROPS -eq $null) { If ($Env:DROPS_DIR -eq $null) { $Env:DROPS_DIR = [IO.Path]::GetFullPath((Join-Path $PSScriptRoot "..\drops")) } -If ($Env:TOOLS_OUTDIR -eq $null) { $Env:TOOLS_OUTDIR = (Join-Path $Env:DROPS_DIR "internal_nugets") } -If (-not (Test-Path -Path $Env:TOOLS_OUTDIR)) { [IO.Directory]::CreateDirectory($Env:TOOLS_OUTDIR) } +If ($Env:INTERNAL_TOOLS_OUTDIR -eq $null) { $Env:INTERNAL_TOOLS_OUTDIR = (Join-Path $Env:DROPS_DIR "internal_tools") } +If (-not (Test-Path -Path $Env:INTERNAL_TOOLS_OUTDIR)) { [IO.Directory]::CreateDirectory($Env:INTERNAL_TOOLS_OUTDIR) } If ($Env:NUGET_OUTDIR -eq $null) { $Env:NUGET_OUTDIR = (Join-Path $Env:DROPS_DIR "nugets") } If (-not (Test-Path -Path $Env:NUGET_OUTDIR)) { [IO.Directory]::CreateDirectory($Env:NUGET_OUTDIR) } From 205c5d731cb663e60f1d010e0705240c4009a02a Mon Sep 17 00:00:00 2001 From: Scott Carda Date: Mon, 14 Jun 2021 17:16:42 -0700 Subject: [PATCH 5/5] renamed command --- .../Microsoft.Quantum.Qir.CommandLineTool.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Qir/Execution/CommandLineTool/Microsoft.Quantum.Qir.CommandLineTool.csproj b/src/Qir/Execution/CommandLineTool/Microsoft.Quantum.Qir.CommandLineTool.csproj index fadadbfe320..95fd980a0ec 100644 --- a/src/Qir/Execution/CommandLineTool/Microsoft.Quantum.Qir.CommandLineTool.csproj +++ b/src/Qir/Execution/CommandLineTool/Microsoft.Quantum.Qir.CommandLineTool.csproj @@ -7,7 +7,7 @@ true - QirCommandLineTool + qir-cli Command-line tool for interacting with QIR. Quantum QIR