Paket: Reduce size of "packages" folder for netcoreapp2.0/netstandard2.0 projects

Created on 23 Aug 2017  ยท  19Comments  ยท  Source: fsprojects/Paket

I've published a beta version of Fable upgraded to netcoreapp2.0 and I'm making some tests. I was hoping that if Fable and Fable related packages were upgraded to netcoreapp2.0/netstandard2.0, the size of the packages folder would be reduced a lot as all the extra System.XXX dependencies shouldn't be needed (same way as when you target net45). However I'm still getting all the System.XXX dependencies in the packages folder, and I think it's because the FSharp.Core 4.2.3 dependency, which still targets netstandard1.6 so it brings all the bloated dependencies with it.

Would it be possible to ignore all dependencies netstandard1.X related when targeting >= netcoreapp2.0/netstandard2.0? I tried adding framework: netcoreapp2.0 on top of paket.dependencies, but it didn't help.

BTW, I remember there was a discussion whether the new FSharp.Core should target netstandard1.6 or netstandard2.0 and I think Immo Landwerth recommended to target the lowest framework possible.

Pinging @enricosada

Most helpful comment

It will work fine and will be considered big success. :-)

Am 23.08.2017 10:59 vorm. schrieb "Matthias Dittrich" <
[email protected]>:

btw the packages opt out will work by package as well (regarding cli tools
and netstandard library). But I don't promise anything (how good it will
work in practice, because that part is kind of dangerous)...

โ€”
You are receiving this because you commented.

Reply to this email directly, view it on GitHub
https://github.com/fsprojects/Paket/issues/2650#issuecomment-324267157,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AADgNKFY5-nfz5UC2qN8vUtiahijs6crks5sa-oMgaJpZM4O_pO7
.

All 19 comments

@matthid is already working on a switch for groups to work completely
without packages. So you could opt out for the main group. For 5hr build
group you would still restore to the packages folder do that fake finds its
stuff

Am 23.08.2017 10:08 vorm. schrieb "Alfonso Garcia-Caro" <
[email protected]>:

I've published a beta version of Fable upgraded to netcoreapp2.0 and I'm
making some tests. I was hoping that if Fable and Fable related packages
were upgraded to netcoreapp2.0/netstandard2.0, the size of the packages
folder would be reduced a lot as all the extra System.XXX dependencies
shouldn't be needed (same way as when you target net45). However I'm
still getting all the System.XXX dependencies in the packages folder, and I
think it's because the FSharp.Core 4.2.3 dependency, which still targets
netstandard1.6 so it brings all the bloated dependencies with it.

Would it be possible to ignore all dependencies netstandard1.X related
when targeting >= netcoreapp2.0/netstandard2.0? I tried adding framework:
netcoreapp2.0 on top of paket.dependencies, but it didn't help.

BTW, I remember there was a discussion whether the new FSharp.Core should
target netstandard1.6 or netstandard2.0 and I think Immo Landwerth
recommended to target the lowest framework possible.

Pinging @enricosada https://github.com/enricosada

โ€”
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/fsprojects/Paket/issues/2650, or mute the thread
https://github.com/notifications/unsubscribe-auth/AADgNPNEsJvost1uAWMprRyqvFkXyPLqks5sa93_gaJpZM4O_pO7
.

Regarding netstandard 2. The FSharp.Core still does not have it. @matth and
myself are lobbying for it. /cc @dsyme @kevinransom

Am 23.08.2017 10:10 vorm. schrieb "Steffen Forkmann" sforkmann@gmail.com:

@matthid is already working on a switch for groups to work completely
without packages. So you could opt out for the main group. For 5hr build
group you would still restore to the packages folder do that fake finds its
stuff

Am 23.08.2017 10:08 vorm. schrieb "Alfonso Garcia-Caro" <
[email protected]>:

I've published a beta version of Fable upgraded to netcoreapp2.0 and I'm
making some tests. I was hoping that if Fable and Fable related packages
were upgraded to netcoreapp2.0/netstandard2.0, the size of the packages
folder would be reduced a lot as all the extra System.XXX dependencies
shouldn't be needed (same way as when you target net45). However I'm
still getting all the System.XXX dependencies in the packages folder, and I
think it's because the FSharp.Core 4.2.3 dependency, which still targets
netstandard1.6 so it brings all the bloated dependencies with it.

Would it be possible to ignore all dependencies netstandard1.X related
when targeting >= netcoreapp2.0/netstandard2.0? I tried adding framework:
netcoreapp2.0 on top of paket.dependencies, but it didn't help.

BTW, I remember there was a discussion whether the new FSharp.Core should
target netstandard1.6 or netstandard2.0 and I think Immo Landwerth
recommended to target the lowest framework possible.

Pinging @enricosada https://github.com/enricosada

โ€”
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/fsprojects/Paket/issues/2650, or mute the thread
https://github.com/notifications/unsubscribe-auth/AADgNPNEsJvost1uAWMprRyqvFkXyPLqks5sa93_gaJpZM4O_pO7
.

We even suggested an interesting technical solutuin which doesn't require adding a new binary. But there was no feedback on it whatsoever...

Lobbying yes...

Giving how fast the community is moving to netcore2, I guess it makes sense to move to netstandard2.0. But as now the FSharp.Core reference is added implicitly by the SDK I'm not sure if that would need a new dotnet SDK release.

In any case, I'm up for the lobbying part ;)

Don't get me started on the implicit referencing...

Am 23.08.2017 10:19 vorm. schrieb "Alfonso Garcia-Caro" <
[email protected]>:

Giving how fast the community is moving to netcore2, I guess it makes sense
to move to netstandard2.0. But as now the FSharp.Core reference is added
implicitly by the SDK I'm not sure if that would need a new dotnet SDK
release.

In any case, I'm up for the lobbying part ;)

โ€”
You are receiving this because you commented.

Reply to this email directly, view it on GitHub
https://github.com/fsprojects/Paket/issues/2650#issuecomment-324257051,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AADgNHri5amkcNGP99dkAIOjfi8oKE6Iks5sa-CdgaJpZM4O_pO7
.

@matthid is already working on a switch for groups to work completely without packages. So you could opt out for the main group. For 5hr build group you would still restore to the packages folder do that fake finds its stuff

Interesting, is that about using the global Nuget cache for Paket too as it was talked in the past? That'd be very nice to prevent explosion of project folders, but it'd be great if it can be opted-out for some groups, as Fable libraries must be placed in the packages local dir (and Fable groups will always reference FSharp.Core, would that still bring all the System.XXX extra dependencies?).

We already use the global cache.
The change we are about to make is to allow users to opt out of the
packages folder for specific groups.

So this might be not the solution for fable (yet) since it's relying on
packages folder. But we will get there eventually. This is a great first
step.

On the other front we need an updated fsharp.core package with explicit
netstandard 2 support. But I have a feeling that we get that as well. Maybe
not today, but pressure is increasing ;-)

Am 23.08.2017 10:46 vorm. schrieb "Alfonso Garcia-Caro" <
[email protected]>:

@matthid https://github.com/matthid is already working on a switch for
groups to work completely without packages. So you could opt out for the
main group. For 5hr build group you would still restore to the packages
folder do that fake finds its stuff

Interesting, is that about using the global Nuget cache for Paket too as
it was talked in the past? That'd be very nice to prevent explosion of
project folders, but it'd be great if it can be opted-out for some groups,
as Fable libraries must be placed in the packages local dir (and Fable
groups will always reference FSharp.Core, would that still bring all the
System.XXX extra dependencies?).

โ€”
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/fsprojects/Paket/issues/2650#issuecomment-324263725,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AADgNHx1gy9V0Cml16ZBh3kHPgWfcAQjks5sa-bggaJpZM4O_pO7
.

btw the packages opt out will work by package as well (regarding cli tools and netstandard library). But I don't promise anything (how good it will work in practice, because that part is kind of dangerous)...

It will work fine and will be considered big success. :-)

Am 23.08.2017 10:59 vorm. schrieb "Matthias Dittrich" <
[email protected]>:

btw the packages opt out will work by package as well (regarding cli tools
and netstandard library). But I don't promise anything (how good it will
work in practice, because that part is kind of dangerous)...

โ€”
You are receiving this because you commented.

Reply to this email directly, view it on GitHub
https://github.com/fsprojects/Paket/issues/2650#issuecomment-324267157,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AADgNKFY5-nfz5UC2qN8vUtiahijs6crks5sa-oMgaJpZM4O_pO7
.

I'll close this, please open issues if storage:none is not working for fable.

Regarding the netstandard library packages, please try to add nuget NetStandard.Library storage:none to the dependencies file, it should (not tested) remove NetStandard.Library and all transitives from the packages folder.

We can now follow-up with smaller requests :)

Also regarding FSharp.Core: Since https://github.com/Microsoft/visualfsharp/pull/3454 was merged I expect that "problem" to reduce with netstandard20 and the next FSharp.Core release anyway.

Fantastic, it's working! Great job, @matthid! :clap: :clap: :clap:

I still get some System.XXX packages, I guess they're FSharp.Core dependencies so hopefully they should be also removed soon :)

FSharp.Core                     System.Net.WebHeaderCollection
Fable.Core                      System.Threading.Tasks.Parallel
Fable.Import.Browser            System.Threading.Thread
System.Linq.Queryable           System.Threading.ThreadPool
System.Net.Requests

Now packages folder is jus 24MB, finally smaller than node_modules! ;)

Interestingly, it seems that adding framework: netstandard2.0 to paket.dependencies forced downloading all netstandard1.6 packages again.

One of the issues with storage:none and fable is that fable ships source
code files in the package. So usually it was possible to reference them
with relative path from the packages folder. Is this now done via
content:overwrite or things like that?

Am 27.08.2017 6:00 nachm. schrieb "Alfonso Garcia-Caro" <
[email protected]>:

Fantastic, it's working
https://github.com/fable-compiler/fable-templates/blob/899dad6ee95455b5ca4c35a3ccbbeb0219e5b86b/simple/Content/paket.dependencies!
Great job, @matthid https://github.com/matthid! ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘

I still get some System.XXX packages, I guess they're FSharp.Core
dependencies so hopefully they should be also removed soon :)

FSharp.Core System.Net.WebHeaderCollection
Fable.Core System.Threading.Tasks.Parallel
Fable.Import.Browser System.Threading.Thread
System.Linq.Queryable System.Threading.ThreadPool
System.Net.Requests

Now packages folder is jus 24MB, finally smaller than node_modules! ;)

Interestingly, it seems that adding framework: netstandard2.0 to
paket.dependencies forced downloading all netstandard1.6 packages again.

โ€”
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/fsprojects/Paket/issues/2650#issuecomment-325207288,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AADgNIlWZJMbwsu1h_xc15RFj7sGvyOjks5scZK4gaJpZM4O_pO7
.

Looks like I'm too old school and that issue is already gone. Following
file does not have the direct file link
https://github.com/fable-compiler/fable-react_native-demo/blob/master/src/Nightwatch.fsproj

So @alfonsogcnunez can it work without packages folder?

Am 27.08.2017 6:12 nachm. schrieb "Steffen Forkmann" sforkmann@gmail.com:

One of the issues with storage:none and fable is that fable ships source
code files in the package. So usually it was possible to reference them
with relative path from the packages folder. Is this now done via
content:overwrite or things like that?

Am 27.08.2017 6:00 nachm. schrieb "Alfonso Garcia-Caro" <
[email protected]>:

Fantastic, it's working
https://github.com/fable-compiler/fable-templates/blob/899dad6ee95455b5ca4c35a3ccbbeb0219e5b86b/simple/Content/paket.dependencies!
Great job, @matthid https://github.com/matthid! ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘

I still get some System.XXX packages, I guess they're FSharp.Core
dependencies so hopefully they should be also removed soon :)

FSharp.Core System.Net.WebHeaderCollection
Fable.Core System.Threading.Tasks.Parallel
Fable.Import.Browser System.Threading.Thread
System.Linq.Queryable System.Threading.ThreadPool
System.Net.Requests

Now packages folder is jus 24MB, finally smaller than node_modules! ;)

Interestingly, it seems that adding framework: netstandard2.0 to
paket.dependencies forced downloading all netstandard1.6 packages again.

โ€”
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/fsprojects/Paket/issues/2650#issuecomment-325207288,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AADgNIlWZJMbwsu1h_xc15RFj7sGvyOjks5scZK4gaJpZM4O_pO7
.

In my quick tests with the paket.dependencies file linked above, just using nuget Fable.Core puts the package into the packages folder, so everything works as normal :)

@forki yes but with fabe you don't actually need some of the transitives. They can now be disabled

But I should add that it's dangerous

If you can remove it completely even better. But as fallback you can essentially cut of subtrees of the deps tree.

Most noteworthy is the subtree of Netstandard.Library1.6. So even fable 1.0 with old fsharp.core can now have minimal packages folder (if I'm not overlooking anything)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alfonsogarciacaro picture alfonsogarciacaro  ยท  8Comments

johlrich picture johlrich  ยท  5Comments

enricosada picture enricosada  ยท  4Comments

haraldsteinlechner picture haraldsteinlechner  ยท  4Comments

ModernRonin picture ModernRonin  ยท  7Comments