Skip to content

Commit 232cece

Browse files
SLVSCODE-1655 Remove client-side on-demand download for CFamily and OmniSharp analyzers
1 parent 0cc9ada commit 232cece

14 files changed

Lines changed: 10 additions & 370 deletions

build-sonarlint/common.mjs

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
* Licensed under the LGPLv3 License. See LICENSE.txt in the project root for license information.
66
* ------------------------------------------------------------------------------------------ */
77
'use strict';
8-
import { createVSIX } from '@vscode/vsce';
9-
import { clean, cleanOmnisharpDir } from './fsUtils.mjs';
8+
import { createVSIX } from '@vscode/vsce';
9+
import { clean } from './fsUtils.mjs';
1010
import { info } from 'fancy-log';
1111
import downloadJre from './jreDownload.mjs';
1212
import cycloneDx from './sbomGeneration.mjs';
@@ -15,12 +15,7 @@ import { deployBuildInfo, deployVsixWithPattern } from './deployUtils.mjs';
1515
import populateBuildNumber from './populateBuildNumber.mjs';
1616
import signVsix from './sign.mjs';
1717
import _default from './constants.mjs';
18-
import {
19-
downloadOmnisharpAllPlatformDistributions,
20-
downloadAndExtractOmnisharp,
21-
omnisharpPlatformMapping
22-
} from './omnisharpDownload.mjs';
23-
const { TARGETED_PLATFORMS, LATEST_JRE, OMNISHARP_VERSION } = _default;
18+
const { TARGETED_PLATFORMS, LATEST_JRE } = _default;
2419

2520
export async function deployUniversal() {
2621
commonPreBuildTasks();
@@ -37,7 +32,6 @@ export async function deployAllMicrosoft() {
3732
}
3833

3934
async function buildUniversal() {
40-
await downloadOmnisharpAllPlatformDistributions(OMNISHARP_VERSION);
4135
await createVSIX();
4236
}
4337

@@ -51,10 +45,7 @@ async function buildTargeted() {
5145

5246
async function buildForPlatform(platform) {
5347
await downloadJre(platform, LATEST_JRE);
54-
await downloadAndExtractOmnisharp(OMNISHARP_VERSION, omnisharpPlatformMapping[platform]);
55-
await downloadAndExtractOmnisharp(OMNISHARP_VERSION, 'net6.0');
5648
await createVSIX({ target: platform });
57-
cleanOmnisharpDir();
5849
}
5950

6051
function commonPreBuildTasks() {

build-sonarlint/constants.mjs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,6 @@ Object.defineProperty(constants, 'LATEST_JRE', {
1717
writable: false
1818
});
1919

20-
Object.defineProperty(constants, 'OMNISHARP_VERSION', {
21-
value: '1.39.15',
22-
writable: false
23-
});
24-
2520
Object.defineProperty(constants, 'TARGETED_PLATFORMS', {
2621
value: ['win32-x64', 'linux-x64', 'darwin-x64', 'darwin-arm64'],
2722
writable: false

build-sonarlint/deployAllMarketplaces.mjs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,14 @@ import { executeWithDurationLog, deployAllMicrosoft } from './common.mjs';
99
import { deployAllOpenVSX } from './deployAllOpenVSX.mjs';
1010
import { deployBuildInfo, collectArtifactInfo } from './deployUtils.mjs';
1111

12-
// Deploy Microsoft marketplace variants (with OmniSharp in all packages)
1312
await executeWithDurationLog(async () => {
1413
await deployAllMicrosoft();
1514
}, 'Deploy-all-microsoft');
1615

1716
// Collect Microsoft artifact information (universal + platform-specific VSIXs)
1817
const microsoftArtifacts = collectArtifactInfo();
1918

20-
// Deploy OpenVSX variants (without OmniSharp in platform-specific packages)
19+
// Deploy OpenVSX variants
2120
// This overwrites the platform-specific VSIXs, but we've already captured Microsoft metadata
2221
await executeWithDurationLog(async () => {
2322
await deployAllOpenVSX();

build-sonarlint/deployAllOpenVSX.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ export async function deployAllOpenVSX() {
2323
}
2424

2525
async function buildOpenVSXPackages() {
26-
// Build platform-specific packages WITHOUT OmniSharp
2726
for (const platform of TARGETED_PLATFORMS) {
2827
await executeWithDurationLog(async () => {
2928
await downloadJre(platform, LATEST_JRE);

build-sonarlint/fsUtils.mjs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,6 @@ export function cleanJreDir() {
2121
}
2222
}
2323

24-
export function cleanOmnisharpDir() {
25-
if (pathExistsSync('./omnisharp')) {
26-
removeSync('./omnisharp');
27-
}
28-
}
29-
3024
export function getPackageJSON() {
3125
return JSON.parse(readFileSync('package.json').toString());
3226
}

build-sonarlint/omnisharpDownload.mjs

Lines changed: 0 additions & 84 deletions
This file was deleted.

build-sonarlint/package-all-microsoft.mjs

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,16 @@
66
* ------------------------------------------------------------------------------------------ */
77
'use strict';
88
import _default from './constants.mjs';
9-
const { TARGETED_PLATFORMS, LATEST_JRE, OMNISHARP_VERSION } = _default;
9+
const { TARGETED_PLATFORMS, LATEST_JRE } = _default;
1010
import downloadJre from './jreDownload.mjs';
11-
import { cleanJreDir, cleanOmnisharpDir } from './fsUtils.mjs';
11+
import { cleanJreDir } from './fsUtils.mjs';
1212
import { createVSIX } from '@vscode/vsce';
13-
import {
14-
downloadAndExtractOmnisharp,
15-
downloadOmnisharpAllPlatformDistributions,
16-
omnisharpPlatformMapping
17-
} from './omnisharpDownload.mjs';
1813

1914
(async () => {
2015
for (const platform of TARGETED_PLATFORMS) {
2116
await downloadJre(platform, LATEST_JRE);
22-
await downloadAndExtractOmnisharp(OMNISHARP_VERSION, omnisharpPlatformMapping[platform]);
23-
await downloadAndExtractOmnisharp(OMNISHARP_VERSION, 'net6.0');
2417
await createVSIX({ target: platform });
25-
cleanOmnisharpDir();
2618
}
2719
cleanJreDir();
28-
await downloadOmnisharpAllPlatformDistributions(OMNISHARP_VERSION);
2920
await createVSIX();
3021
})();

build-sonarlint/package-all-ovsx.mjs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,14 @@
66
* ------------------------------------------------------------------------------------------ */
77
'use strict';
88
import _default from './constants.mjs';
9-
const { LATEST_JRE, OMNISHARP_VERSION, TARGETED_PLATFORMS } = _default;
9+
const { LATEST_JRE, TARGETED_PLATFORMS } = _default;
1010
import downloadJre from './jreDownload.mjs';
1111
import { cleanJreDir } from './fsUtils.mjs';
1212
import { createVSIX } from '@vscode/vsce';
13-
import { downloadOmnisharpAllPlatformDistributions } from './omnisharpDownload.mjs';
1413

15-
// Build platform-specific packages WITHOUT OmniSharp
1614
for (const platform of TARGETED_PLATFORMS) {
1715
await downloadJre(platform, LATEST_JRE);
1816
await createVSIX({ target: platform });
1917
}
2018
cleanJreDir();
21-
// Build universal package WITH OmniSharp
22-
await downloadOmnisharpAllPlatformDistributions(OMNISHARP_VERSION);
2319
await createVSIX();

build-sonarlint/package.mjs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,7 @@
66
* ------------------------------------------------------------------------------------------ */
77
'use strict';
88
import { createVSIX } from '@vscode/vsce';
9-
import { downloadOmnisharpAllPlatformDistributions } from './omnisharpDownload.mjs';
10-
import { cleanOmnisharpDir } from './fsUtils.mjs';
11-
import _default from './constants.mjs';
12-
13-
const { OMNISHARP_VERSION } = _default;
149

1510
(async () => {
16-
await downloadOmnisharpAllPlatformDistributions(OMNISHARP_VERSION);
1711
await createVSIX();
18-
cleanOmnisharpDir();
1912
})();

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1495,7 +1495,7 @@
14951495
{
14961496
"groupId": "org.sonarsource.sonarlint.ls",
14971497
"artifactId": "sonarlint-language-server",
1498-
"version": "5.1.0.78319",
1498+
"version": "5.2.0.78330",
14991499
"output": "server/sonarlint-ls.jar"
15001500
},
15011501
{

0 commit comments

Comments
 (0)