Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimization: Enable on-demand plugin download #8038

Closed
pavel-mikula-sonarsource opened this issue Sep 21, 2023 · 3 comments · Fixed by #8160
Closed

Optimization: Enable on-demand plugin download #8038

pavel-mikula-sonarsource opened this issue Sep 21, 2023 · 3 comments · Fixed by #8160
Assignees
Labels
Area: SQ Plugin Java plugin related issues.
Milestone

Comments

@pavel-mikula-sonarsource
Copy link
Contributor

pavel-mikula-sonarsource commented Sep 21, 2023

We need to add Plugin-RequiredForLanguages to plugin manifest file to enable SC optimize download sizes.

Exact values needs to be verified with SC team (see Cody's email Optimizing Language Plugin Downloads).

The impact on download is significant.

Example PR (unfortunately from Gradle): https://github.com/SonarSource/sonar-kotlin/pull/366/files

ToDo: Ping @cody-simms-sonarsource before release, so SC can do additional testing.

@pavel-mikula-sonarsource
Copy link
Contributor Author

From #8053

Applicable immediately in SonarCloud and scheduled for SQ 10.4.

Related: https://sonarsource.atlassian.net/browse/SC-8970

On hold until we clarify how this will play with incremental PR analysis and files like CSHTML, JSON, XML which are not C# language.

@andrei-epure-sonarsource andrei-epure-sonarsource added Status: On Hold Postponed or waiting for an answer. and removed Status: On Hold Postponed or waiting for an answer. labels Sep 22, 2023
@andrei-epure-sonarsource
Copy link
Contributor

andrei-epure-sonarsource commented Sep 29, 2023

From the discussions with @dbmeneses

  • our .NET plugins only declare .cs, .vb and .razor suffixes but are able to analyze also .XML, .json and .cshtml files.
  • the new feature in the the scanner-cli takes into account all files, even in PRs.
    • however note that if the plugin is optimized and there are no vb razor and cs files and there are XML files, the plugin won't be downloaded and the XML files won't be analyzed by it.
    • Indeed, a project ("solution" in .NET vocabulary) with only CSHTML, XML and JSON won't be analyzed by sonar-dotnet.

IMO it's fine to have this behavior.

This will need an update to the parent POM.

@andrei-epure-sonarsource andrei-epure-sonarsource added this to the 9.12 milestone Sep 29, 2023
@pavel-mikula-sonarsource
Copy link
Contributor Author

If there's no CS/VB file, the .NET compilation will not happen and XML/JSON will not be analyzed anyway.

I'm not sure CSHTML behaves after the latest changes. Although valuable CSHTML without sounds CS unlikely.

@gregory-paidis-sonarsource gregory-paidis-sonarsource changed the title Add Plugin-RequiredForLanguages to optimize plugin download size Optimization: Enable on-demand download #8160 Oct 9, 2023
@gregory-paidis-sonarsource gregory-paidis-sonarsource changed the title Optimization: Enable on-demand download #8160 Optimization: Enable on-demand download Oct 9, 2023
@gregory-paidis-sonarsource gregory-paidis-sonarsource changed the title Optimization: Enable on-demand download Optimization: Enable on-demand plugin download Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: SQ Plugin Java plugin related issues.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants