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

Optimize package references of modules, uncluttering paket.lock. #2493

Merged
merged 3 commits into from
Apr 13, 2020
Merged

Optimize package references of modules, uncluttering paket.lock. #2493

merged 3 commits into from
Apr 13, 2020

Conversation

teo-tsirpanis
Copy link
Contributor

Description

Build script modules reference many packages (such as System.Net.Http) that do not target .NET Standard 2.0. When used by a .NET Standard library (such as our build script), these packages load their dependencies from a lower version of .NET Standard, which causes a truckload of other packages with primitive types (such as System.Runtime, or much worse, native packages) to be loaded, producing a paket.lock like this (the overwhelming majority of these 800ish lines start with System.):

A paket.lock file

Most of these "bad" packages have not been updated since 2016. Fortunately, .NET Standard 2.0 eliminated all this dependency clutter by automatically including these packages, so they were removed. 3rd-part packages that still reference these legacy libraries are NuGet.Protocol which was fixed by its latest version, MSBuild and FSharp.Compiler.Services, for which I have opened PRs to fix their dependencies.

A bad package I could not remove was System.Runtime.Loader (whose existence is a mistake: it allows .NET Framework code to access the .NET Core-only AssemblyLoadContext) because it would require some architectural changes (such as moving the assembly cache over to the FAKE executable). But that's not important whatsoever, and can be eventually resolved by something like targeting .NET 5 everywhere in FAKE 6.

@matthid
Copy link
Member

matthid commented Apr 13, 2020

Thanks!
So this "fixes" some references in the final packages, correct?
And it updates to versions which include the referenced PR-fixes?

To be honest, everything looks pretty good to me. Given that the build is green nothing should be broken and I will just add it to the next alpha release.

@matthid matthid merged commit 45c4a2f into fsprojects:release/next Apr 13, 2020
@matthid matthid mentioned this pull request May 4, 2020
3 tasks
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.

2 participants