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

Design for unified behavior controls #2974

Closed
Tracked by #2975
mmitche opened this issue Aug 9, 2022 · 10 comments
Closed
Tracked by #2975

Design for unified behavior controls #2974

mmitche opened this issue Aug 9, 2022 · 10 comments
Assignees
Labels
area-infra Source-build infrastructure and reporting

Comments

@mmitche
Copy link
Member

mmitche commented Aug 9, 2022

Describe the Problem

Right now, there is a rough assumption that the DotNetBuildFromSource property means building from source on Linux. This property is used to trim away package references, sources, target frameworks, and behaviors that should not be present when building from source on Linux (in offline mode).

The eventual goal is that Windows and Mac will use the same approach as Linux source build for building (a single all-up build per platforms), however the behavior and requirements will likely differ per platform. Examples:

  • Mac and Windows source builds may use pre-builts not allowable on Linux
  • Mac and Windows source builds may not trim away certain sources or package references not allowable on Linux.

Because the current source build schema is focused on Linux, we will need to redesign it to support multiple platforms.

In addition to this, improvements to the way that .NET builds will allow more organizations to build the product, and more organizations to include code or behavior in the source base that is not active during other builds. For instance, Microsoft may use specific functionality to sign binaries for its distribution, while other organizations may use another, Today, this pivot is largely represented by DotNetBuildFromSource

Describe the Solution

We need a coherent design for source build on other platforms. This design should:

  • Allow for an arbitrary set of platforms
  • Allow for different pre-built sets.
  • Allow for online vs. offline behavior.
  • Allow for different organizational behavior.
  • Allow for trimming of TFM targets (e.g. don't target net472 on Linux). This ideally does not involve conditionalization in a vast number of projects.
  • Still allow for platform-agnostic source build behavior (maybe use the existing properties)
  • Provide a rollout plan that is a smooth offramp from the current design and into the new one. It would be ideal if this was a scriptable, mechanical change.

Additional Context

Sub-issues

@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@mmitche
Copy link
Member Author

mmitche commented Aug 9, 2022

/cc @MichaelSimons @richlander @crummel

@jkotas
Copy link
Member

jkotas commented Aug 10, 2022

Mac and Windows source builds may not trim away certain sources or package references not allowable on Linux.

Not allowable in Linux distros. These dependencies can be perfectly fine when building for Linux in less stringent environments. There are number of reasons why it should be ok to allow these dependencies in less stringent environments. For example, some tests have dependencies like that.

We should decouple full stack build and offline build. Full stack build means that we are building the whole thing from VMR. Offline build means that everything has to be built from sources, no binary-only external packages allowed.

@mmitche
Copy link
Member Author

mmitche commented Aug 10, 2022

Mac and Windows source builds may not trim away certain sources or package references not allowable on Linux.

Not allowable in Linux distros. These dependencies can be perfectly fine when building for Linux in less stringent environments. There are number of reasons why it should be ok to allow these dependencies in less stringent environments. For example, some tests have dependencies like that.

We should decouple full stack build and offline build. Full stack build means that we are building the whole thing from VMR. Offline build means that everything has to be built from sources, no binary-only external packages allowed.

Good points. So there are a few pivots:

  • Platform - Differentiates what platform we're building for
  • Source-build enabled? (eventually most of these switches go away) - These would go away in most repos (some repos with dual insertions like roslyn may keep them) after the current official build methodology is removed.
  • Offline vs. Online - Switches allowable pre-builts and build behavior. This would not be functional on certain platforms, like Mac and Windows.

Maybe Offline vs. Online isn't the right terminology for this. Perhaps it should be Strict vs. Non-strict, or Full vs Source-Only?

@mmitche mmitche changed the title .NET 8: Design support to build multiple source-build platforms .NET 8: Design support to build multiple source-build platforms and organizations Aug 10, 2022
@mmitche mmitche changed the title .NET 8: Design support to build multiple source-build platforms and organizations .NET 8: Redesign source-build behavior controls Aug 10, 2022
@MichaelSimons MichaelSimons added area-infra Source-build infrastructure and reporting and removed untriaged labels Aug 11, 2022
@MichaelSimons
Copy link
Member

@mmitche - is this something that is still in scope for .NET 8?

@mmitche
Copy link
Member Author

mmitche commented Jun 15, 2023

Unsure whether we'd implement, but we'll get to the design in the .NET 8 timeframe. This is what we put on the schedule yesterday.

@MichaelSimons MichaelSimons changed the title .NET 8: Redesign source-build behavior controls .NET 9: Redesign source-build behavior controls Jul 20, 2023
@mmitche
Copy link
Member Author

mmitche commented Jan 3, 2024

T Shirt size (remaining): Small

@mmitche mmitche changed the title .NET 9: Redesign source-build behavior controls Design for source-build behavior controls Jan 12, 2024
@mmitche mmitche changed the title Design for source-build behavior controls Design for unified behavior controls Jan 12, 2024
@mmitche
Copy link
Member Author

mmitche commented Jan 17, 2024

Unless there are additional comments here, I am going to md-ify this doc and put it in the UnifiedBuild docs and call it done.

@mmitche
Copy link
Member Author

mmitche commented Jan 23, 2024

Completed when dotnet/arcade#14407 is merged

@mmitche mmitche closed this as completed Jan 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-infra Source-build infrastructure and reporting
Projects
Archived in project
Status: Done
Development

No branches or pull requests

3 participants