Skip to content

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

Merged
matthid merged 3 commits into
fsprojects:release/nextfrom
teo-tsirpanis:release/next
Apr 13, 2020
Merged

matthid merged 3 commits into
fsprojects:release/nextfrom
teo-tsirpanis:release/next

Conversation

@teo-tsirpanis

Copy link
Copy Markdown
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

matthid commented Apr 13, 2020

Copy link
Copy Markdown
Member

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.

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