use native osx_arm64 sts bits (#22122)

* use native osx-arm64 sts bits

* universal app

* update package
This commit is contained in:
Alan Ren
2023-03-03 11:09:39 -08:00
committed by GitHub
parent 1a5ae9cf32
commit 9ea3889170
17 changed files with 48 additions and 47 deletions

View File

@@ -28,17 +28,16 @@ async function main() {
const outAppPath = path.join(buildDir, `azuredatastudio-darwin-${arch}`, appName); // {{SQL CARBON EDIT}} - CHANGE VSCode to azuredatastudio
const productJsonPath = path.resolve(outAppPath, 'Contents', 'Resources', 'app', 'product.json');
// {{SQL CARBON EDIT}}
// Current STS arm64 builds doesn't work on osx-arm64, we need to use the x64 version of STS on osx-arm64 until the issue is fixed.
// Tracked by: https://github.com/microsoft/azuredatastudio/issues/20775
// makeUniversalApp function will complain if the x64 ADS and arm64 ADS have the same STS binaries, to workaround the issue, we need
// to delete STS from both of them and then copy it to the universal app.
// STS binaries for x64 and arm64 have different file count and cannot be combined
// Remove them from the package before the makeUniversalApp step and copy them to the universal package after it.
const stsPath = '/Contents/Resources/app/extensions/mssql/sqltoolsservice';
const tempSTSDir = path.join(buildDir, 'sqltoolsservice');
const x64STSDir = path.join(x64AppPath, stsPath);
const arm64STSDir = path.join(arm64AppPath, stsPath);
const targetSTSDirs = [x64STSDir, arm64STSDir];
// backup the x64 STS to a temporary directory, later it will be copied to the universal app directory.
// backup the STS folders to a temporary directory, later they will be copied to the universal app directory.
await fs.copy(x64STSDir, tempSTSDir);
await fs.copy(arm64STSDir, tempSTSDir);
// delete STS directories from both x64 ADS and arm64 ADS.
console.debug(`Removing SqlToolsService folders.`);
targetSTSDirs.forEach(async (dir) => {
@@ -89,7 +88,8 @@ async function main() {
}
// {{SQL CARBON EDIT}}
console.debug(`Copying SqlToolsService to the universal app folder.`);
await fs.copy(tempSTSDir, path.join(outAppPath, stsPath), { overwrite: true });
await fs.copy(path.join(tempSTSDir, 'OSX'), path.join(outAppPath, stsPath, 'OSX'), { overwrite: true });
await fs.copy(path.join(tempSTSDir, 'OSX_ARM64'), path.join(outAppPath, stsPath, 'OSX_ARM64'), { overwrite: true });
}
if (require.main === module) {
main().catch(err => {

View File

@@ -34,17 +34,16 @@ async function main() {
const productJsonPath = path.resolve(outAppPath, 'Contents', 'Resources', 'app', 'product.json');
// {{SQL CARBON EDIT}}
// Current STS arm64 builds doesn't work on osx-arm64, we need to use the x64 version of STS on osx-arm64 until the issue is fixed.
// Tracked by: https://github.com/microsoft/azuredatastudio/issues/20775
// makeUniversalApp function will complain if the x64 ADS and arm64 ADS have the same STS binaries, to workaround the issue, we need
// to delete STS from both of them and then copy it to the universal app.
// STS binaries for x64 and arm64 have different file count and cannot be combined
// Remove them from the package before the makeUniversalApp step and copy them to the universal package after it.
const stsPath = '/Contents/Resources/app/extensions/mssql/sqltoolsservice';
const tempSTSDir = path.join(buildDir, 'sqltoolsservice');
const x64STSDir = path.join(x64AppPath, stsPath);
const arm64STSDir = path.join(arm64AppPath, stsPath);
const targetSTSDirs = [x64STSDir, arm64STSDir];
// backup the x64 STS to a temporary directory, later it will be copied to the universal app directory.
// backup the STS folders to a temporary directory, later they will be copied to the universal app directory.
await fs.copy(x64STSDir, tempSTSDir);
await fs.copy(arm64STSDir, tempSTSDir);
// delete STS directories from both x64 ADS and arm64 ADS.
console.debug(`Removing SqlToolsService folders.`);
targetSTSDirs.forEach(async dir => {
@@ -100,7 +99,8 @@ async function main() {
// {{SQL CARBON EDIT}}
console.debug(`Copying SqlToolsService to the universal app folder.`);
await fs.copy(tempSTSDir, path.join(outAppPath, stsPath), { overwrite: true });
await fs.copy(path.join(tempSTSDir, 'OSX'), path.join(outAppPath, stsPath, 'OSX'), { overwrite: true });
await fs.copy(path.join(tempSTSDir, 'OSX_ARM64'), path.join(outAppPath, stsPath, 'OSX_ARM64'), { overwrite: true });
}
if (require.main === module) {

View File

@@ -108,7 +108,7 @@
},
"dependencies": {
"@microsoft/ads-extension-telemetry": "^2.0.0",
"@microsoft/ads-service-downloader": "^1.2.0",
"@microsoft/ads-service-downloader": "^1.2.1",
"vscode-nls": "^4.1.2"
},
"devDependencies": {

View File

@@ -189,10 +189,10 @@
dependencies:
"@vscode/extension-telemetry" "0.6.1"
"@microsoft/ads-service-downloader@^1.2.0":
version "1.2.0"
resolved "https://registry.yarnpkg.com/@microsoft/ads-service-downloader/-/ads-service-downloader-1.2.0.tgz#e7b1febc89fe310256ed168fbe0aed1b90f1db1d"
integrity sha512-8QYnRGvzYDiJavuITnLcLTGIcXN66LP6AuNByiBA/iRc1SHypjaCqXPOK1gDHDP6KTKuXmTrKBkhojkKFE8GKA==
"@microsoft/ads-service-downloader@^1.2.1":
version "1.2.1"
resolved "https://registry.yarnpkg.com/@microsoft/ads-service-downloader/-/ads-service-downloader-1.2.1.tgz#b0216cb0486db6697ccf9e166ec81a9764bdb3aa"
integrity sha512-xB3VUaEYauXtm3zFko5clHnhF7l7QbX0AnnULGDrd2JANu1zThBR6toUQ9+zAMO+0KCHs71XLSuoP2A24G3WCw==
dependencies:
async-retry "^1.2.3"
eventemitter2 "^5.0.1"

View File

@@ -212,7 +212,7 @@
"dataprotocol-client": "github:Microsoft/sqlops-dataprotocolclient#1.3.1",
"figures": "^2.0.0",
"find-remove": "1.2.1",
"@microsoft/ads-service-downloader": "^1.2.0",
"@microsoft/ads-service-downloader": "^1.2.1",
"@microsoft/ads-extension-telemetry": "^2.0.0",
"vscode-languageclient": "5.2.1",
"vscode-nls": "^4.0.0"

View File

@@ -9,10 +9,10 @@
dependencies:
"@vscode/extension-telemetry" "0.6.1"
"@microsoft/ads-service-downloader@^1.2.0":
version "1.2.0"
resolved "https://registry.yarnpkg.com/@microsoft/ads-service-downloader/-/ads-service-downloader-1.2.0.tgz#e7b1febc89fe310256ed168fbe0aed1b90f1db1d"
integrity sha512-8QYnRGvzYDiJavuITnLcLTGIcXN66LP6AuNByiBA/iRc1SHypjaCqXPOK1gDHDP6KTKuXmTrKBkhojkKFE8GKA==
"@microsoft/ads-service-downloader@^1.2.1":
version "1.2.1"
resolved "https://registry.yarnpkg.com/@microsoft/ads-service-downloader/-/ads-service-downloader-1.2.1.tgz#b0216cb0486db6697ccf9e166ec81a9764bdb3aa"
integrity sha512-xB3VUaEYauXtm3zFko5clHnhF7l7QbX0AnnULGDrd2JANu1zThBR6toUQ9+zAMO+0KCHs71XLSuoP2A24G3WCw==
dependencies:
async-retry "^1.2.3"
eventemitter2 "^5.0.1"

View File

@@ -106,7 +106,7 @@
},
"dependencies": {
"@microsoft/ads-extension-telemetry": "^2.0.0",
"@microsoft/ads-service-downloader": "^1.2.0",
"@microsoft/ads-service-downloader": "^1.2.1",
"dataprotocol-client": "github:Microsoft/sqlops-dataprotocolclient#1.3.2",
"vscode-nls": "^5.2.0"
},

View File

@@ -213,10 +213,10 @@
dependencies:
"@vscode/extension-telemetry" "0.6.1"
"@microsoft/ads-service-downloader@^1.2.0":
version "1.2.0"
resolved "https://registry.yarnpkg.com/@microsoft/ads-service-downloader/-/ads-service-downloader-1.2.0.tgz#e7b1febc89fe310256ed168fbe0aed1b90f1db1d"
integrity sha512-8QYnRGvzYDiJavuITnLcLTGIcXN66LP6AuNByiBA/iRc1SHypjaCqXPOK1gDHDP6KTKuXmTrKBkhojkKFE8GKA==
"@microsoft/ads-service-downloader@^1.2.1":
version "1.2.1"
resolved "https://registry.yarnpkg.com/@microsoft/ads-service-downloader/-/ads-service-downloader-1.2.1.tgz#b0216cb0486db6697ccf9e166ec81a9764bdb3aa"
integrity sha512-xB3VUaEYauXtm3zFko5clHnhF7l7QbX0AnnULGDrd2JANu1zThBR6toUQ9+zAMO+0KCHs71XLSuoP2A24G3WCw==
dependencies:
async-retry "^1.2.3"
eventemitter2 "^5.0.1"

View File

@@ -79,7 +79,7 @@
"dependencies": {
"dataprotocol-client": "github:Microsoft/sqlops-dataprotocolclient#1.3.1",
"htmlparser2": "^3.10.1",
"@microsoft/ads-service-downloader": "^1.2.0",
"@microsoft/ads-service-downloader": "^1.2.1",
"@microsoft/ads-extension-telemetry": "^2.0.0",
"vscode-nls": "^4.1.2"
},

View File

@@ -189,10 +189,10 @@
dependencies:
"@vscode/extension-telemetry" "0.6.1"
"@microsoft/ads-service-downloader@^1.2.0":
version "1.2.0"
resolved "https://registry.yarnpkg.com/@microsoft/ads-service-downloader/-/ads-service-downloader-1.2.0.tgz#e7b1febc89fe310256ed168fbe0aed1b90f1db1d"
integrity sha512-8QYnRGvzYDiJavuITnLcLTGIcXN66LP6AuNByiBA/iRc1SHypjaCqXPOK1gDHDP6KTKuXmTrKBkhojkKFE8GKA==
"@microsoft/ads-service-downloader@^1.2.1":
version "1.2.1"
resolved "https://registry.yarnpkg.com/@microsoft/ads-service-downloader/-/ads-service-downloader-1.2.1.tgz#b0216cb0486db6697ccf9e166ec81a9764bdb3aa"
integrity sha512-xB3VUaEYauXtm3zFko5clHnhF7l7QbX0AnnULGDrd2JANu1zThBR6toUQ9+zAMO+0KCHs71XLSuoP2A24G3WCw==
dependencies:
async-retry "^1.2.3"
eventemitter2 "^5.0.1"

View File

@@ -430,7 +430,7 @@
"dataprotocol-client": "github:Microsoft/sqlops-dataprotocolclient#1.3.1",
"figures": "^2.0.0",
"find-remove": "1.2.1",
"@microsoft/ads-service-downloader": "^1.2.0",
"@microsoft/ads-service-downloader": "^1.2.1",
"@microsoft/ads-extension-telemetry": "^2.0.0",
"vscode-languageclient": "5.2.1",
"vscode-nls": "^4.0.0"

View File

@@ -9,10 +9,10 @@
dependencies:
"@vscode/extension-telemetry" "0.6.1"
"@microsoft/ads-service-downloader@^1.2.0":
version "1.2.0"
resolved "https://registry.yarnpkg.com/@microsoft/ads-service-downloader/-/ads-service-downloader-1.2.0.tgz#e7b1febc89fe310256ed168fbe0aed1b90f1db1d"
integrity sha512-8QYnRGvzYDiJavuITnLcLTGIcXN66LP6AuNByiBA/iRc1SHypjaCqXPOK1gDHDP6KTKuXmTrKBkhojkKFE8GKA==
"@microsoft/ads-service-downloader@^1.2.1":
version "1.2.1"
resolved "https://registry.yarnpkg.com/@microsoft/ads-service-downloader/-/ads-service-downloader-1.2.1.tgz#b0216cb0486db6697ccf9e166ec81a9764bdb3aa"
integrity sha512-xB3VUaEYauXtm3zFko5clHnhF7l7QbX0AnnULGDrd2JANu1zThBR6toUQ9+zAMO+0KCHs71XLSuoP2A24G3WCw==
dependencies:
async-retry "^1.2.3"
eventemitter2 "^5.0.1"

View File

@@ -6,6 +6,7 @@
"Windows_64": "win-x64-net7.0.zip",
"Windows_ARM64": "win-arm64-net7.0.zip",
"OSX": "osx-x64-net7.0.tar.gz",
"OSX_ARM64": "osx-arm64-net7.0.tar.gz",
"Linux": "rhel-x64-net7.0.tar.gz"
},
"installDirectory": "./sqltoolsservice/{#platform#}/{#version#}",

View File

@@ -1423,7 +1423,7 @@
},
"dependencies": {
"@microsoft/ads-extension-telemetry": "^2.0.0",
"@microsoft/ads-service-downloader": "^1.2.0",
"@microsoft/ads-service-downloader": "^1.2.1",
"dataprotocol-client": "github:Microsoft/sqlops-dataprotocolclient#1.3.2",
"find-remove": "1.2.1",
"vscode-languageclient": "5.2.1",

View File

@@ -189,10 +189,10 @@
dependencies:
"@vscode/extension-telemetry" "0.6.1"
"@microsoft/ads-service-downloader@^1.2.0":
version "1.2.0"
resolved "https://registry.yarnpkg.com/@microsoft/ads-service-downloader/-/ads-service-downloader-1.2.0.tgz#e7b1febc89fe310256ed168fbe0aed1b90f1db1d"
integrity sha512-8QYnRGvzYDiJavuITnLcLTGIcXN66LP6AuNByiBA/iRc1SHypjaCqXPOK1gDHDP6KTKuXmTrKBkhojkKFE8GKA==
"@microsoft/ads-service-downloader@^1.2.1":
version "1.2.1"
resolved "https://registry.yarnpkg.com/@microsoft/ads-service-downloader/-/ads-service-downloader-1.2.1.tgz#b0216cb0486db6697ccf9e166ec81a9764bdb3aa"
integrity sha512-xB3VUaEYauXtm3zFko5clHnhF7l7QbX0AnnULGDrd2JANu1zThBR6toUQ9+zAMO+0KCHs71XLSuoP2A24G3WCw==
dependencies:
async-retry "^1.2.3"
eventemitter2 "^5.0.1"

View File

@@ -154,7 +154,7 @@
},
"dependencies": {
"dataprotocol-client": "github:Microsoft/sqlops-dataprotocolclient#1.3.1",
"@microsoft/ads-service-downloader": "^1.2.0",
"@microsoft/ads-service-downloader": "^1.2.1",
"@microsoft/ads-extension-telemetry": "^2.0.0",
"uuid": "^8.3.2",
"vscode-nls": "^4.1.2"

View File

@@ -9,10 +9,10 @@
dependencies:
"@vscode/extension-telemetry" "0.6.1"
"@microsoft/ads-service-downloader@^1.2.0":
version "1.2.0"
resolved "https://registry.yarnpkg.com/@microsoft/ads-service-downloader/-/ads-service-downloader-1.2.0.tgz#e7b1febc89fe310256ed168fbe0aed1b90f1db1d"
integrity sha512-8QYnRGvzYDiJavuITnLcLTGIcXN66LP6AuNByiBA/iRc1SHypjaCqXPOK1gDHDP6KTKuXmTrKBkhojkKFE8GKA==
"@microsoft/ads-service-downloader@^1.2.1":
version "1.2.1"
resolved "https://registry.yarnpkg.com/@microsoft/ads-service-downloader/-/ads-service-downloader-1.2.1.tgz#b0216cb0486db6697ccf9e166ec81a9764bdb3aa"
integrity sha512-xB3VUaEYauXtm3zFko5clHnhF7l7QbX0AnnULGDrd2JANu1zThBR6toUQ9+zAMO+0KCHs71XLSuoP2A24G3WCw==
dependencies:
async-retry "^1.2.3"
eventemitter2 "^5.0.1"