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

One pager writeups #11045

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Conversation

maridematte
Copy link
Contributor

These are the one pagers for 3 features.

documentation/specs/proposed/decoupling-vs-sdk.md Outdated Show resolved Hide resolved
documentation/specs/proposed/decoupling-vs-sdk.md Outdated Show resolved Hide resolved
documentation/specs/proposed/decoupling-vs-sdk.md Outdated Show resolved Hide resolved
- Decoupling the Dotnet SDK from VS.


The reason we are persuing this is for a better experience when using or writting Roslyn analyzers and MSBuild Tasks. Currently tooling authors need to target NetStandard2.0 for their projects to be recognized by VS. Another options is to multi-target but it takes a lot more effort and time spent on that. Another aspect is the user experience, if the Roslyn version for VS analyzers and generators doesn't match the one in Visual Studio, they do not work.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This paragraph seems to be combining what TFM analyzers need to target and SDK / VS analyzer tearing. Think we should split up those concerns.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. Roslyn analyzers/generators targeting netstandard2 are one concern, multitargeting tasks is another, SDK tearing is a third.

documentation/specs/proposed/decoupling-vs-sdk.md Outdated Show resolved Hide resolved
documentation/specs/proposed/decoupling-vs-sdk.md Outdated Show resolved Hide resolved
documentation/specs/proposed/evaluation-perf.md Outdated Show resolved Hide resolved
@maridematte maridematte marked this pull request as ready for review December 12, 2024 15:01
@baronfel
Copy link
Member

baronfel commented Jan 8, 2025

This LGTM to merge.

@@ -0,0 +1,40 @@
# Decoupling VS builds of .NET SDK projects
The experience of building a .NET SDK project can differ significantly depending if the project was built using Visla Studio / MSBuild or `dotnet build`. The build can produce different diagnostics, use different language rules, etc... and that is because building a .NET SDK project from Visual Studio mixes components from MSBuild and the .NET SDK. This means core tooling, like the compiler, can be substantially different between the two types of build. This leads to customer confusion and hard to diagnose problems, as well as increased code workload. To solve this want to ensure that when building a .NET SDK project we use the components from the .NET SDK to do so.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The experience of building a .NET SDK project can differ significantly depending if the project was built using Visla Studio / MSBuild or `dotnet build`. The build can produce different diagnostics, use different language rules, etc... and that is because building a .NET SDK project from Visual Studio mixes components from MSBuild and the .NET SDK. This means core tooling, like the compiler, can be substantially different between the two types of build. This leads to customer confusion and hard to diagnose problems, as well as increased code workload. To solve this want to ensure that when building a .NET SDK project we use the components from the .NET SDK to do so.
The experience of building a .NET SDK project can differ significantly depending if the project was built using Visual Studio / MSBuild or `dotnet build`. The build can produce different diagnostics, use different language rules, etc. This is because building a .NET SDK project from Visual Studio mixes components from Visual Studio and the .NET SDK. This means core tooling, like the compiler, can be substantially different between the two types of build. This leads to customer confusion and hard-to-diagnose problems. To solve this want to ensure that when building a .NET SDK project we use more components from the .NET SDK to do so.

I cut "code workload" because I don't think I know what it is.

## Goals and Motivation

We are aiming for:
- Consistent end-user eperience for build in either DotNet CLI or Visual Studio.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Consistent end-user eperience for build in either DotNet CLI or Visual Studio.
- More consistent end-user experience for build between .NET CLI and Visual Studio.

Comment on lines +8 to +9
- Decoupling the .NET SDK experience from Visual Studio
- Decoupling the .NET SDK from VS.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do these differ?

Suggested change
- Decoupling the .NET SDK experience from Visual Studio
- Decoupling the .NET SDK from VS.
- Decoupling the .NET SDK experience from Visual Studio

- Decoupling the Dotnet SDK from VS.


The reason we are persuing this is for a better experience when using or writting Roslyn analyzers and MSBuild Tasks. Currently tooling authors need to target NetStandard2.0 for their projects to be recognized by VS. Another options is to multi-target but it takes a lot more effort and time spent on that. Another aspect is the user experience, if the Roslyn version for VS analyzers and generators doesn't match the one in Visual Studio, they do not work.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. Roslyn analyzers/generators targeting netstandard2 are one concern, multitargeting tasks is another, SDK tearing is a third.


## Impact
There are a few area of impact:
- .NET SDK style project builds will be more stable between VS and CLI builds, as the tooling will not be devided between different versions.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- .NET SDK style project builds will be more stable between VS and CLI builds, as the tooling will not be devided between different versions.
- .NET SDK style project builds will be more stable between VS and CLI builds, as the tooling will be less divided between different versions.

(there will still be tearing on core targets for the medium term)

MSBuild currently does not have a lot of performance data outside of Visual Studio performance tracking, which has a lot of variables that are beyond the team's control. PerfStar enables us to measure our performance without interference of elements that the team does not own. As such, we can measure the performance of in-development features and how it will impact build times, as well as have concrete numbers when working on performance improvement tasks.

## Impact
Perfstar's impact is focused on the team. We will be able to track performance with concrete numbers. Because of that the team will be able to take more informed decisions about taking performance improvement work, as well as future and implementation of new features.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Perfstar's impact is focused on the team. We will be able to track performance with concrete numbers. Because of that the team will be able to take more informed decisions about taking performance improvement work, as well as future and implementation of new features.
Perfstar's impact is focused on the team. We will be able to track performance with concrete numbers. Because of that the team will be able to take more informed decisions about performance improvement work, as well as implementation of new features. In turn, those decisions will accrue value to users via higher build performance.

Perfstar's impact is focused on the team. We will be able to track performance with concrete numbers. Because of that the team will be able to take more informed decisions about taking performance improvement work, as well as future and implementation of new features.

## Risks
The risks associated with our dependencies is about Crank, which is owned by the ASP.NET team and we use it to help us with machine setup to run the performance tests.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd extend this: PerfStar is a service, even if it's one primarily for our own use, and introduces a bunch of risks related to service maintenance.

- Around 1 dev week.
2. The PowerBI reporting is working and updating the new information
- Around 2 dev weeks.
3. New performance tests for new features, and writting docs on how to write those tests. Next feature planned for tests: BuildCheck.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
3. New performance tests for new features, and writting docs on how to write those tests. Next feature planned for tests: BuildCheck.
3. New performance tests for new features, and writing docs on how to write those tests. Next feature planned for tests: BuildCheck.

- Around 3 dev days per feature.
4. Analyze stability of performance tests, and fix any noise found. This will be done through multiple iterations of the same test in the same machine, as well as updating the PowerBI report to handle the new data.
- Around 2 dev weeks.
5. Add more tests using `msbuild.exe` for build instead of `dotnet build`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
5. Add more tests using `msbuild.exe` for build instead of `dotnet build`.
5. Add more tests using `msbuild.exe` for build in addition to `dotnet build`.

7. Add more test cases. For example, build time with different verbosity levels.
- Around 1 dev week.

There are more improvements form PerfStar, but these are not established for .NET 10 yet as they depend on the team's feedback to PerfStar.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
There are more improvements form PerfStar, but these are not established for .NET 10 yet as they depend on the team's feedback to PerfStar.
There are more improvements form PerfStar, but these are not planned for .NET 10 as they depend on the team's feedback to PerfStar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants