From b9e0f78b4d0728fddfc300e5472848e819c59b24 Mon Sep 17 00:00:00 2001 From: Andres Paz Date: Fri, 20 Nov 2020 02:19:51 -0700 Subject: [PATCH 1/6] Setting KV task to v1 (#743) --- .github/workflows/qdk-sync.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/qdk-sync.yml b/.github/workflows/qdk-sync.yml index 26b4da3d7d..d95a0ea8f7 100644 --- a/.github/workflows/qdk-sync.yml +++ b/.github/workflows/qdk-sync.yml @@ -15,7 +15,7 @@ jobs: creds: ${{ secrets.AZURE_CREDENTIALS }} - id: AzureKeyVault - uses: Azure/get-keyvault-secrets@v1.0 + uses: Azure/get-keyvault-secrets@v1 with: keyvault: 'kv-qdk-build' secrets: 'qdkBuildPAT' From b12dfd5a3ef51884a36903e15a8b7e5581b8e4ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9sar=20Zaragoza=20Cort=C3=A9s?= Date: Fri, 20 Nov 2020 13:59:11 -0800 Subject: [PATCH 2/6] Create a new DotnetCoreDll property for the current syntax tree resource name (#741) * Create a new DotnetCoreDll property that always provides the name of the resource currently used by the compiler to attach the syntax tree to a DLL. * Fix typo. --- src/QsCompiler/Compiler/CompilationLoader.cs | 2 +- src/QsCompiler/DataStructures/ReservedKeywords.fs | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/QsCompiler/Compiler/CompilationLoader.cs b/src/QsCompiler/Compiler/CompilationLoader.cs index e2cf64da97..c7f01ee2ef 100644 --- a/src/QsCompiler/Compiler/CompilationLoader.cs +++ b/src/QsCompiler/Compiler/CompilationLoader.cs @@ -1083,7 +1083,7 @@ bool CanBeIncluded(string dll) using var outputStream = File.OpenWrite(outputPath); serialization.Seek(0, SeekOrigin.Begin); - var astResource = new CodeAnalysis.ResourceDescription(DotnetCoreDll.ResourceNameQsDataBondV1, () => serialization, true); + var astResource = new CodeAnalysis.ResourceDescription(DotnetCoreDll.SyntaxTreeResourceName, () => serialization, true); var result = compilation.Emit( outputStream, options: new CodeAnalysis.Emit.EmitOptions(), diff --git a/src/QsCompiler/DataStructures/ReservedKeywords.fs b/src/QsCompiler/DataStructures/ReservedKeywords.fs index 36e3b4bd36..0e4fab015e 100644 --- a/src/QsCompiler/DataStructures/ReservedKeywords.fs +++ b/src/QsCompiler/DataStructures/ReservedKeywords.fs @@ -278,6 +278,8 @@ module DotnetCoreDll = [] let ResourceName = "__qsharp_data__.bson" let ResourceNameQsDataBondV1 = "__qsharp_data_bond_v1__.bson" + // Should always provide the name of the resource currently used by the compiler to attach the syntax tree to a DLL. + let SyntaxTreeResourceName = ResourceNameQsDataBondV1 let MetadataNamespace = "__qsharp__" let ReferenceAlias = "__qsharp_reference__" let MetadataType = "Metadata" From d2d2b539ede123d6292eec55c4f3e0f9e1228846 Mon Sep 17 00:00:00 2001 From: Andres Paz Date: Mon, 23 Nov 2020 10:58:20 -0800 Subject: [PATCH 3/6] Explicitly build language server during pack-extension.ps1 --- build/pack-extensions.ps1 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/build/pack-extensions.ps1 b/build/pack-extensions.ps1 index 90676396e1..f3fb164e35 100644 --- a/build/pack-extensions.ps1 +++ b/build/pack-extensions.ps1 @@ -57,6 +57,14 @@ function Pack-SelfContained() { [string] $PackageData = $null ); + # Make sure the LanguageServer is built on its own: + dotnet build (Join-Path $PSScriptRoot $project) ` + -c $Env:BUILD_CONFIGURATION ` + -v $Env:BUILD_VERBOSITY ` + @args ` + /property:Version=$Env:ASSEMBLY_VERSION ` + /property:InformationalVersion=$Env:SEMVER_VERSION + Write-Host "##[info]Packing $Project as a self-contained deployment..."; $Runtimes.GetEnumerator() | ForEach-Object { $DotNetRuntimeID = $_.Key; From 88debafc7b7bcedc974c1c115998df74a954a1f9 Mon Sep 17 00:00:00 2001 From: Andres Paz Date: Mon, 23 Nov 2020 11:48:27 -0800 Subject: [PATCH 4/6] Missing ASSEMBLY_CONSTANTS --- build/pack-extensions.ps1 | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/build/pack-extensions.ps1 b/build/pack-extensions.ps1 index f3fb164e35..cfdefa557f 100644 --- a/build/pack-extensions.ps1 +++ b/build/pack-extensions.ps1 @@ -57,6 +57,13 @@ function Pack-SelfContained() { [string] $PackageData = $null ); + Write-Host "##[info]Building $project ($action)..." + if ("" -ne "$Env:ASSEMBLY_CONSTANTS") { + $args = @("/property:DefineConstants=$Env:ASSEMBLY_CONSTANTS"); + } else { + $args = @(); + } + # Make sure the LanguageServer is built on its own: dotnet build (Join-Path $PSScriptRoot $project) ` -c $Env:BUILD_CONFIGURATION ` @@ -75,11 +82,6 @@ function Pack-SelfContained() { New-Item -ItemType Directory -Path $ArchiveDir -Force -ErrorAction SilentlyContinue; try { - if ("" -ne "$Env:ASSEMBLY_CONSTANTS") { - $args = @("/property:DefineConstants=$Env:ASSEMBLY_CONSTANTS"); - } else { - $args = @(); - } $ArchivePath = Join-Path $ArchiveDir "$BaseName-$DotNetRuntimeID-$Env:SEMVER_VERSION.zip"; dotnet publish (Join-Path $PSScriptRoot $Project) ` -c $Env:BUILD_CONFIGURATION ` From b47329d50f2e42678f194e5099fa52608dbdf117 Mon Sep 17 00:00:00 2001 From: Andres Paz Date: Mon, 23 Nov 2020 12:32:58 -0800 Subject: [PATCH 5/6] Add args back --- build/267DevDivSNKey2048.snk | Bin 0 -> 288 bytes build/pack-extensions.ps1 | 5 +++++ 2 files changed, 5 insertions(+) create mode 100644 build/267DevDivSNKey2048.snk diff --git a/build/267DevDivSNKey2048.snk b/build/267DevDivSNKey2048.snk new file mode 100644 index 0000000000000000000000000000000000000000..7a1fffb890a43a90273251a13141c1b92d5b2672 GIT binary patch literal 288 zcmV+*0pI=rBme*mfB*m#0RR970ssI2Bme+XQ$aBR2mk;90097DGnudPj`5axxzmR}d}v>#e4lBjR&}2Era&fE7}!jUWnTqBY9YFX4_ zm5IimTdxd3d8Bg@*(FuY0BX#OSy}SEZV=;O!$mit(q`I#g@t8<$X$Wje?Gt-*;Y(g z**$SQ&=)L@BcTrhIk*g#uy;1~*svm0Do%7I8ec;wBr%IMIi;Y7_~kt>6JMO9e><|_ z3jYf5gp~yQeCj{(lH85p?X6_Sj{W0IR?`BlRsC*&^8(fH&Fbk>WsNjaRvTY7#X|4f m-JghsIMZ~_@dm8-**Zi;!^b??5%5 Date: Mon, 23 Nov 2020 13:20:23 -0800 Subject: [PATCH 6/6] remove file --- build/267DevDivSNKey2048.snk | Bin 288 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 build/267DevDivSNKey2048.snk diff --git a/build/267DevDivSNKey2048.snk b/build/267DevDivSNKey2048.snk deleted file mode 100644 index 7a1fffb890a43a90273251a13141c1b92d5b2672..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 288 zcmV+*0pI=rBme*mfB*m#0RR970ssI2Bme+XQ$aBR2mk;90097DGnudPj`5axxzmR}d}v>#e4lBjR&}2Era&fE7}!jUWnTqBY9YFX4_ zm5IimTdxd3d8Bg@*(FuY0BX#OSy}SEZV=;O!$mit(q`I#g@t8<$X$Wje?Gt-*;Y(g z**$SQ&=)L@BcTrhIk*g#uy;1~*svm0Do%7I8ec;wBr%IMIi;Y7_~kt>6JMO9e><|_ z3jYf5gp~yQeCj{(lH85p?X6_Sj{W0IR?`BlRsC*&^8(fH&Fbk>WsNjaRvTY7#X|4f m-JghsIMZ~_@dm8-**Zi;!^b??5%5