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

[SBRP] Move back to project-to-project references for arcade-powered source-build #1690

Open
dagood opened this issue Jul 29, 2020 · 3 comments
Labels
area-sbrp Source build reference packages

Comments

@dagood
Copy link
Member

dagood commented Jul 29, 2020

In 3.1, SBRP does something similar to project-to-project references via PackageReferences, nupkgs, and individual dotnet restores per project with very specific package feeds.

In 5.0 (dev branch as of writing), SBRP instead uses prebuilts for PackageReferences. This isn't actually a problem for building from source, because the bootstrap process rebuilds these against source-built artifacts. (It seems reasonable to leave it like this for 5.0 GA if we can't find time to address this.)

We can have the best of both worlds. The projects should build using each other's output DLLs as references, and then each project should package up its outputs. This removes the prebuilts but doesn't require an individual dotnet restore for every single project. ProjectReference is designed to do this kind of thing. (An early attempt to use ProjectReference didn't work out, leading to the 3.1 approach.)

@dagood dagood added the area-infra Source-build infrastructure and reporting label Jul 29, 2020
@dagood dagood changed the title [SBRP] Move back to project-to-project references for 5.0+ [SBRP] Move back to project-to-project references for arcade-powered source-build Dec 23, 2020
@MichaelSimons MichaelSimons added area-sbrp Source build reference packages and removed area-infra Source-build infrastructure and reporting labels Nov 2, 2022
@MichaelSimons
Copy link
Member

@dagood - do you recall any specifics regarding An early attempt to use ProjectReference didn't work out, leading to the 3.1 approach.)?

The current approach has a number of UX issues specifically when adding new packages and ensuring the build order, addressing CG alerts requires multiple commits (the second commit is needed to update the SBRP intermediate after a build is available with the fix) and lastly this is the only reason we have to carry the SBRPs in the source-build artifacts which is a significant impact on the size.

@dagood
Copy link
Member Author

dagood commented Nov 2, 2022

IIRC @dseefeld told me he'd tried that earlier, and that's what the note is about. I don't think the issues were ever investigated in depth, we both just went with low-risk approaches that fairly obviously end up working instead of digging in and making ProjectReference work for us (potentially conflicting with SDK/MSBuild assumptions, etc).

I do think it's solvable with the right people and effort.

@ViktorHofer
Copy link
Member

ViktorHofer commented Mar 16, 2023

I agree with @dagood that SBRP should use ProjectReferences instead of PackageReferences which will solve a number of issues:

Targeting packs like NETStandard.Library, Microsoft.NETFramework.ReferenceAssemblies and the *.Ref packs make this a bit challenging but I'm sure we could come up with a solution.

IMO we should start with changing the reference package source generator to emit ProjectReferences instead of PackageReferences. Targeting packs don't come into play here, as we don't directly reference them anymore now that we use implicit framework references.

After that, it would be good to clean-up all the existing non needed reference packages and then re-generate everything with the new template layout. During that, we will likely identify a few roslyn based GenAPI issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-sbrp Source build reference packages
Projects
Status: Backlog
Development

No branches or pull requests

4 participants