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

Define policy for usage of source-built system packages #1798

Closed
dseefeld opened this issue Oct 12, 2020 · 4 comments
Closed

Define policy for usage of source-built system packages #1798

dseefeld opened this issue Oct 12, 2020 · 4 comments
Labels
area-build Improvements in source-build's own build process

Comments

@dseefeld
Copy link
Contributor

dseefeld commented Oct 12, 2020

Source-build System.* packages built in runtime are only built for one TFM (i.e. net5.0 in the 5.0 build). When using these packages in a tarball build, complications arise when trying to build using these source-built packages. A policy needs to be defined to decide how to handle these situations

An example:
roslyn/src/Compilers/Server/VBCSCompiler.csproj builds with TFMs netcoreapp3.1 and net472 and it uses a reference to System.Collections.Immutable. In the standard roslyn build, this reference is supplied by a preview8 version of this package which has previously been built and contains assemblies for both TFMs.

In a tarball build for this same project, the version of System.Collections.Immutable is supplied via Package Flow and is an RC1 version of the package built from source. This package only contains a net5.0 TFM. Because of this, building the project for net472 fails to find a valid assembly in the package and so fails the build.

Potential solutions:

  • Only build the project for netcorapp3.1
  • Use a reference package for the System.Collections.Immutable reference (this solution has other ramifications with cascading dependencies on other packages)
@dagood
Copy link
Member

dagood commented Oct 12, 2020

Related:

(I also edited to fix net50 to net5.0. 5.0 adds the . to let us count to 10. 😮)

@dseefeld
Copy link
Contributor Author

Investigation has been done on including --allconfigurations to the runtime build. This is the desired solution, but there are some issues with including that at this point.

@dseefeld dseefeld added area-build Improvements in source-build's own build process triaged labels Oct 22, 2020
@dseefeld
Copy link
Contributor Author

As mentioned above, there are 3 potential solutions when encountering an issue building with a System.* source-built package that only builds for one TFM.

  1. Update consumer's TFM to build only the TFM supported by the consumed package.
  2. Change the version of the consumed package to one built in source-build-reference-packages.
  3. Build System.* packages for all configurations. See Build runtime repo using --allconfigurations #1838

The 3rd option would be best, but until that is added, options 1 or 2 are the best options.

@MichaelSimons
Copy link
Member

[Triage] net4* TFMs are being removed with #3014. In .NET 8.0 timeframe there is a goal to target the current TFM or a netstandard tfm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-build Improvements in source-build's own build process
Projects
None yet
Development

No branches or pull requests

3 participants