Skip to content

WIP Make Paket work with dotnet cli preview3 - #1977

Merged
forki merged 354 commits into
masterfrom
core3
Mar 15, 2017
Merged

forki merged 354 commits into
masterfrom
core3

Conversation

@forki

@forki forki commented Oct 24, 2016 •

Copy link
Copy Markdown
Member
  • - Make "paket install" hook into MSBuild 15 / dotnet cli preview3 restore
  • - Make Paket restore it's own PaketRestoreTask.dll
  • - Do not emit dll references for MSBuild 15 projects
  • - Use magic mode
  • - Make everything work in ionide
  • - Make Paket create it's own Nuget.Config or hook into that in MSBuild
  • - Convert from Nuget should read / remvoe PackageReferences from *proj - (@theimowski ?)

@matthid matthid left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

Comment thread build.sh
exit_code=$?
if [ $exit_code -ne 0 ]; then
certificate_count=$(certmgr -list -c Trust | grep X.509 | wc -l)
if [ $certificate_count -le 1 ]; then

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we might still need this, just later at the paket.exe call...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread src/Paket.Core/LockFile.fs Outdated

g.NugetPackages
|> List.iter (fun package ->
|> List.iter (fun package ->

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?


namespace Paket.Build.Tasks
{
public class PaketRestoreTask : Task

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some crasy thinking: Would it make sense to think about extension points in paket?

Considering all those different use cases we might have soon (dotnetcore, toml, legacy, fable?) shouldn't we try to get things like these out of paket core into modules or something like that?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure. bringe them on

@forki

forki commented Oct 25, 2016

Copy link
Copy Markdown
Member Author

paketcore

@theimowski

Copy link
Copy Markdown
Member

Re convert - there's no packages.config anymore, but rather every dep is moved to *proj? Is it a 1-1 mapping?

@forki

forki commented Oct 25, 2016

Copy link
Copy Markdown
Member Author

It's looking like this now:

<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" />
  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>netcoreapp1.0</TargetFramework>
  </PropertyGroup>
  <ItemGroup>
    <Compile Include="**\*.cs" />
    <EmbeddedResource Include="**\*.resx" />
  </ItemGroup>
  <ItemGroup>
    <PackageReference Include="Microsoft.NETCore.App">
      <Version>1.0.1</Version>
    </PackageReference>
    <PackageReference Include="Microsoft.NET.Sdk">
      <Version>1.0.0-alpha-20161019-1</Version>
      <PrivateAssets>All</PrivateAssets>
    </PackageReference>
  </ItemGroup>
  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

@theimowski

Copy link
Copy Markdown
Member

I can give it a try, but can take a week or two - little spare time right now

@forki

forki commented Oct 25, 2016

Copy link
Copy Markdown
Member Author

yeah don't worry. no need to hurry

@theimowski

Copy link
Copy Markdown
Member

@forki

forki commented Nov 1, 2016

Copy link
Copy Markdown
Member Author

@theimowski you must run paket install once before you can restore.

@theimowski

Copy link
Copy Markdown
Member

Thanks, that was the case. Also turns out, in latest dotnet core there's no more "3" suffix for commands https://github.com/dotnet/cli/issues/4205

@theimowski

Copy link
Copy Markdown
Member

I'm hacking around convert - pushing changes directly to this branch - is it fine with you?
What I'm struggling with is:
Paket failed with: Could not find versions for package Microsoft.NET.Sdk on any of ["https://www.nuget.org/api/v2"; "http://api.nuget.org/v3/index.json"].
which should probably work, as dotnet restore outputs: Feeds used: https://api.nuget.org/v3/index.json

@forki

forki commented Nov 3, 2016

Copy link
Copy Markdown
Member Author

Yes that's fine. Maybe we need another feed. @enricosada?

@forki

forki commented Nov 3, 2016

Copy link
Copy Markdown
Member Author

@enricosada

Copy link
Copy Markdown
Contributor

https://github.com/dotnet/netcorecli-fsc/blob/master/examples/preview3/lib/NuGet.Config

Sent from mobile


From: Steffen Forkmann [email protected]
Sent: Thursday, November 3, 2016 7:39:01 AM
To: fsprojects/Paket
Cc: Enrico Sada; Mention
Subject: Re: [fsprojects/Paket] WIP Make Paket work with dotnet cli preview3 (#1977)

Yes that's fine. Maybe we need another feed. @enricosadahttps://github.com/enricosada?

You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com//pull/1977#issuecomment-258073022, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AAI_Ky2zzbqroMH9hJjaaMg4EII-hfduks5q6YGFgaJpZM4Keq6C.

@enricosada

Copy link
Copy Markdown
Contributor

Also the dotnet sdk feeds

https://github.com/dotnet/cli/blob/rel/1.0.0/NuGet.Config

Sent from mobile


From: Steffen Forkmann [email protected]
Sent: Thursday, November 3, 2016 1:01:30 PM
To: fsprojects/Paket
Cc: Enrico Sada; Mention
Subject: Re: [fsprojects/Paket] WIP Make Paket work with dotnet cli preview3 (#1977)

maybe https://github.com/dotnet/netcorecli-fsc/blob/master/examples/preview3/console/NuGet.Config#L4 ?

You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com//pull/1977#issuecomment-258124337, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AAI_K0jDV_NNHdHqC9fEaNX8c47Jmw9_ks5q6c0agaJpZM4Keq6C.

@forki

forki commented Nov 3, 2016

Copy link
Copy Markdown
Member Author

@theimowski we can consume v3 API. just make sure all the nuget feeds are added to paket.deps and I think it's without the last part of the url

@theimowski

Copy link
Copy Markdown
Member

yeah sorry my fault - didn't spot last @enricosada comment. It seems it's resolving deps now with those 4 additional feeds, but taking ages...

@forki

forki commented Nov 3, 2016

Copy link
Copy Markdown
Member Author

@theimowski welcome to the brave new world of dotnet shipping via nuget

@theimowski

Copy link
Copy Markdown
Member

Huh...

c:\sandbox\core3paket (master)
λ paket convert-from-nuget --force
Paket version 4.0.0-alpha021
Adding Microsoft.NET.Sdk 1.0.0-alpha-20161026-2 to c:\sandbox\core3paket\paket.dependencies into group Main
Adding Microsoft.NETCore.App 1.0.1 to c:\sandbox\core3paket\paket.dependencies into group Main
Dependencies files saved to c:\sandbox\core3paket\paket.dependencies
Resolving packages for group Main:
 - Microsoft.NETCore.App is pinned to 1.0.1
 - Microsoft.NET.Sdk is pinned to 1.0.0-alpha-20161026-2
 - newtonsoft.json 9.0.1
 - ...
Locked version resolution written to c:\sandbox\core3paket\paket.lock
Downloading ...
Garbage collecting ...
34 minutes, 5 seconds - ready.

and that's for just 3 deps:

source https://www.nuget.org/api/v2
source https://api.nuget.org/v3/index.json
source https://www.myget.org/F/xunit/api/v3/index.json
source https://www.myget.org/F/netcorecli-fsc-preview3/api/v3/index.json
source https://dotnet.myget.org/F/dotnet-core/api/v3/index.json
source https://dotnet.myget.org/F/cli-deps/api/v3/index.json
nuget Microsoft.NET.Sdk 1.0.0-alpha-20161026-2 alpha
nuget Microsoft.NETCore.App 1.0.1
nuget newtonsoft.json

@forki

forki commented Nov 3, 2016

Copy link
Copy Markdown
Member Author

how fast is second update?

@theimowski

Copy link
Copy Markdown
Member

you mean running now paket install --force ?

@enricosada

Copy link
Copy Markdown
Contributor

Cold cache.
The sdk and packages ship with .net core sdk package so usually is not a problem.

And other packages are from nuget.orghttp://nuget.org so faster.
It's possible to tweak the feeds, and use less big feeds.
Or create a new feed for paket-dev with mirror of useful packages.
Pretty much all are in nuget.orghttp://nuget.orgv (minus msbuild/xunit dev/fsharp.sdk)

Sent from mobile


From: Tomasz Heimowski [email protected]
Sent: Thursday, November 3, 2016 2:13:18 PM
To: fsprojects/Paket
Cc: Enrico Sada; Mention
Subject: Re: [fsprojects/Paket] WIP Make Paket work with dotnet cli preview3 (#1977)

Huh...

c:\sandbox\core3paket (master)
? paket convert-from-nuget --force
Paket version 4.0.0-alpha021
Adding Microsoft.NET.Sdk 1.0.0-alpha-20161026-2 to c:\sandbox\core3paket\paket.dependencies into group Main
Adding Microsoft.NETCore.App 1.0.1 to c:\sandbox\core3paket\paket.dependencies into group Main
Dependencies files saved to c:\sandbox\core3paket\paket.dependencies
Resolving packages for group Main:

  • Microsoft.NETCore.App is pinned to 1.0.1
  • Microsoft.NET.Sdk is pinned to 1.0.0-alpha-20161026-2
  • newtonsoft.json 9.0.1
  • ...
    Locked version resolution written to c:\sandbox\core3paket\paket.lock
    Downloading ...
    Garbage collecting ...
    34 minutes, 5 seconds - ready.

and that's for just 3 deps:

source https://www.nuget.org/api/v2
source https://api.nuget.org/v3/index.json
source https://www.myget.org/F/xunit/api/v3/index.json
source https://www.myget.org/F/netcorecli-fsc-preview3/api/v3/index.json
source https://dotnet.myget.org/F/dotnet-core/api/v3/index.json
source https://dotnet.myget.org/F/cli-deps/api/v3/index.json
nuget Microsoft.NET.Sdk 1.0.0-alpha-20161026-2 alpha
nuget Microsoft.NETCore.App 1.0.1
nuget newtonsoft.json

You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com//pull/1977#issuecomment-258138209, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AAI_K9Y8SIJz7RD4mHY04te9cYIkm5IXks5q6d3ugaJpZM4Keq6C.

@forki

forki commented Nov 3, 2016

Copy link
Copy Markdown
Member Author

@theimowski no --force would take same time (since it skips cache). just run paket update

@theimowski

theimowski commented Nov 3, 2016 •

Copy link
Copy Markdown
Member

56 seconds - ready.
much better ;)

How does it work now? Paket downloads the nupkgs to ./packages dir and then copies them to %HOME%.nuget.packages ?
Or do we somehow tell dotnet to take deps from "./packages"?

@forki

forki commented Nov 3, 2016

Copy link
Copy Markdown
Member Author

Currently we download to both locations.

Am 03.11.2016 14:27 schrieb "Tomasz Heimowski" [email protected]:

56 seconds - ready.
much better ;)

How does it work now? Paket downloads the nupkgs to ./packages dir and
then copies them to %HOME%.nuget.packages ?
Or do we somehow tell dotnet to take deps from "./packages"?

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#1977 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AADgNHaPgRs3i1f177zqcLHIDX96qRnBks5q6eEzgaJpZM4Keq6C
.

@enricosada

enricosada commented Nov 4, 2016 •

Copy link
Copy Markdown
Contributor

ok i started the work in #2004
so Paket.Core is ok atm, working on Paket

@forki
forki merged commit e198b7f into master Mar 15, 2017
@matthid
matthid deleted the core3 branch May 6, 2017 14:08
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.

9 participants