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

Reduce size of "packages" folder for netcoreapp2.0/netstandard2.0 projects #2650

Closed
alfonsogarciacaro opened this issue Aug 23, 2017 · 19 comments

Comments

@alfonsogarciacaro
Copy link

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

@forki
Copy link
Member

forki commented Aug 23, 2017 via email

@forki
Copy link
Member

forki commented Aug 23, 2017 via email

@matthid
Copy link
Member

matthid commented Aug 23, 2017

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...

@alfonsogarciacaro
Copy link
Author

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 ;)

@forki
Copy link
Member

forki commented Aug 23, 2017 via email

@alfonsogarciacaro
Copy link
Author

@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?).

@matthid
Copy link
Member

matthid commented Aug 23, 2017

see #2638

@forki
Copy link
Member

forki commented Aug 23, 2017 via email

@matthid
Copy link
Member

matthid commented Aug 23, 2017

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)...

@forki
Copy link
Member

forki commented Aug 23, 2017 via email

@matthid
Copy link
Member

matthid commented Aug 27, 2017

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 :)

@matthid matthid closed this as completed Aug 27, 2017
@matthid
Copy link
Member

matthid commented Aug 27, 2017

Also regarding FSharp.Core: Since dotnet/fsharp#3454 was merged I expect that "problem" to reduce with netstandard20 and the next FSharp.Core release anyway.

@alfonsogarciacaro
Copy link
Author

Fantastic, it's working! Great job, @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.

@forki
Copy link
Member

forki commented Aug 27, 2017 via email

@forki
Copy link
Member

forki commented Aug 27, 2017 via email

@alfonsogarciacaro
Copy link
Author

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 :)

@matthid
Copy link
Member

matthid commented Aug 27, 2017

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

@matthid
Copy link
Member

matthid commented Aug 27, 2017

But I should add that it's dangerous

@matthid
Copy link
Member

matthid commented Aug 27, 2017

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)

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

No branches or pull requests

3 participants