-
Notifications
You must be signed in to change notification settings - Fork 525
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
fix packaging of FSharp.Core and Paket/Paket.Bootstrapper as tool #3734
fix packaging of FSharp.Core and Paket/Paket.Bootstrapper as tool #3734
Conversation
- publish exe in `bin/net461` and `bin/netcoreapp2.1` - pack nupkg in `temp` - net core is assumed to exists always (the sdk is always installed because needed for build) ## remove dotnet-mergenupkg when `Paket` and `Paket.Boostrapper` are `donet pack` with `PackAsTool=true` property (to pack as .NET Tool) these will include the merged paket.exe/paket.boostrapper.exe into the `tools` dir no need to dotnet mergenupkg the Paket.Core, because now multitarget correctly (it's only one package)
@forki i'll need to check the full run of integration tests in ci to see if ok |
@@ -2,11 +2,5 @@ | |||
"version": 1, | |||
"isRoot": true, | |||
"tools": { | |||
"dotnet-mergenupkg": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not needed any more?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, is not not needed anymore.
before with dotnet mergenupkg
i added the .NET tools (from the netcoreapp
package) inside the package with tools/paket.exe
.
now it does the opposite, it create the .NET tools package (netcoreapp) with dotnet pack
and when packaging add also the already built tools/paket.exe
.
Now is easier to do with .net sdk but it also needed some tweaks to build script that i added in this PR, before was just easier dotnet mergenupkg
, to make it the build script less complicated
This PR is already big enough. |
i tried to add a smoke test to the i tried use a <?xml version="1.0" encoding="utf-8"?>
<configuration>
<config>
<add key="repositoryPath" value="C:\temp3\clientpr\packages\" />
<add key="globalPackagesFolder" value="C:\temp3\clientpr\packages\" />
</config>
<packageSources>
<!--To inherit the global NuGet package sources remove the <clear/> line below -->
<clear />
<!-- <add key="nuget" value="https://api.nuget.org/v3/index.json" /> -->
<add key="pr" value="c:\temp2\feedpr\feed" />
</packageSources>
</configuration> the
is also download, added to
But doesnt work
because search in global nuget cachen and no option in le sigh |
green. ready to merge? |
Really near but not. |
is it ILMerged? |
allow to get meaningful stacktraces also for deps
@forki no, the issue is in the
I expect the p2p dlls inside the publish dir if i do Let me rerun some tests locally before merge, but afaik should be ok if green, no more known issues |
…er` instead cannot use `dotnet paket.bootstrapper` because of the `.` (tool restore correctly, but fails to run) using `dotnet paketbootstrapper` instead
set min version constraints for dependencies, so are set in the nuspec generated by `paket pack` for `FSharp.Core` Otherwise, `dotnet restore` of `FSharp.Core` use really old version of Newtonsoft/etc who may not work on .NET Standard. For example newtonsoft was restored as v6.x who support only net461 (valid for netstandard, but generate warnings)
i rechecked locally:
all ok afaik. There are misc fixes/enhancement documented in the PR description, but should all be ok @forki so if green, merge it! |
Can we use bootstrapper as global tool? In magic mode?
Enrico Sada <[email protected]> schrieb am Do., 28. Nov. 2019, 16:03:
… i rechecked locally:
- Paket.Core in a net461/netcoreapp2.1 project
- Paket as local tool (dotnet paket)
- Paket.Boostrapper as local tool (dotnet paketboostrapper), but ihmo
is useless
all ok afaik.
There are misc fixes/enhancement documented in the PR description, but
should all be ok
@forki <https://github.com/forki> so if green, merge it! [image: ]
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3734?email_source=notifications&email_token=AAAOANEF4N3FCUTLHFSKLBLQV7MTBA5CNFSM4JR3XJ2KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFM3C6I#issuecomment-559526265>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAOANC26GUS3HQ735EIGYLQV7MTBANCNFSM4JR3XJ2A>
.
|
@forki no, i just packaged as tool. because dunno what you want to do. But ihmo is not the way forward with that. I think about that scenario a lot for repotool/.net core paket. Scenario is a nice dev ux + deterministic builds I think can be done in two with: a paket global tool who can do:
a paket local tool who can do:
Using the bootstrapper ihmo is not needed, because:
What change without the boostrapper, list of features:
So my idea is: let's use just In the first lines of paket main, before argu parse, we include a check.
PRO:
The only unknown i know:
given a clean repo ( More tied to I'll try send a PR, should not be lot of work to show it |
See #3623
Enrico Sada <[email protected]> schrieb am Do., 28. Nov. 2019, 16:43:
… Can we use bootstrapper as global tool? In magic mode?
@forki <https://github.com/forki> no, i just packaged as tool. because
dunno what you want to do.
But ihmo is not the way forward with that.
I think about that scenario a lot for repotool/.net core paket.
Scenario is a nice dev ux + deterministic builds
I think can be done in two with:
a paket global tool who can do:
- run init like command
- all other commands, it will execute the dotnet paket (so will run
the local paket, deterministic/pinned) passing the same args who got (like
magic mode)
- seem like bootstrapper in magic mode, but is 2% of bootsrapper code
a paket local tool who can do:
- pinned, so deterministic build
- all usual commands
Using the bootstrapper ihmo is not needed, because:
- just 2% of bootstrapper code is needed
- use a single package -> better experience (because naming)
What change without the boostrapper, list of features:
- pinning. OK is done by tool manifest
- specify a different feed. OK with nuget.config or dotnet tool
restore args
- download from nuget package. OK the default
- download from github releases. KO not supported. BUT with global
nuget cache is okish because cached = fast
- caching of version. OK in the global nuget cache
- magic mode machinery/optimization. OK as local+global tool, have the
same name. see below for info
- self updates. OK, done with dotnet tool update
So my idea is:
let's use just paket tool. will be paket (global) and dotnet paket (local)
In the first lines of paket main, before argu parse, we include a check.
- if is init command -> then do it. OK because we know first word
- on init:
- generate paket.dependencies as usual
- check if exists tool manifests, otherwise generate it
- run dotnet tool install paket --local
- else
- recursive search directory hierarchy for .paket dir.
- if exists, it's a paket repo. good
- if exits tool manifest (.config/dotnet-tools.json):
- then run dotnet paket with args
- else run ./paket/paket.exe with args (backward compatibility,
no more need for alias)
PRO:
- developers use global tool or local tool
- CI/Docker use ONLY local tool, no need for global tool
The only unknown i know:
1. clean repo scenario
given a clean repo (git clone/git clean -xdf), i dont know exactly how
too install paket if i do just dotnet build.
If is already restore the tools (dotnet tool restore, like in CI), works.
Otherwise dunno (because parallel msbuild etc)
But is okish because we can do dotnet tool restore in the build.cmd (it's
fast noop if already restore)
More tied to dotnet cli args (if they change we may need tweaks), but
most of the corner cases are inside the target file anyway
I'll try send a PR, should not be lot of work to show it
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3734?email_source=notifications&email_token=AAAOAND5LCDH7YWISPBVKXDQV7RI3A5CNFSM4JR3XJ2KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFM6IIQ#issuecomment-559539234>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAOANFZMX2EUPX6VIDIG53QV7RI3ANCNFSM4JR3XJ2A>
.
|
@forki i know, it was the same idea time of months ago, just not implemented until local tool. BTW @forki diffing things i seen two bugs in this PR (but merge it anyway)
i tried diff the generated exe and old versions and seems ok |
@forki there are some flaky tests on travis, but one of two builds was green (i rerun the failed one, now is green, i think can be set FLAKY later) |
Signing is done on my pc
Enrico Sada <[email protected]> schrieb am Do., 28. Nov. 2019, 17:10:
… @forki <https://github.com/forki> there are some flaky tests on travis,
but one of two builds was green (i rerun the failed one, now is green, i
think can be set FLAKY later)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3734?email_source=notifications&email_token=AAAOANAW5XWEQIJCHUR4ZY3QV7UPZA5CNFSM4JR3XJ2KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFNAMNA#issuecomment-559547956>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAOANGUQNYERV7W23DUVHLQV7UPZANCNFSM4JR3XJ2A>
.
|
Good! about the icon:
I'll check in another PR |
Yes please add it back.
Enrico Sada <[email protected]> schrieb am Do., 28. Nov. 2019, 17:35:
… Good!
about the icon:
- was added in 8ee2bf9
<8ee2bf9>
- the <Win32Resource>paket.res</Win32Resource> in fsproj doesnt seem
to work
- in csproj should be <ApplicationIcon>paket.ico</ApplicationIcon>
instead, more easy, but we are fsproj :D
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3734?email_source=notifications&email_token=AAAOANAVVUAL62L2THHFAVTQV7XNDA5CNFSM4JR3XJ2KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFNCD5I#issuecomment-559555061>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAOANHIPGIDBU5MPI5N4NLQV7XNDANCNFSM4JR3XJ2A>
.
|
So, for in F# we need to use native resource like i'll try a tool to fix it after generation, but in another PR, this is done @forki |
Awesome. Thanks for the work |
So 2 questions about that:
|
@Krzysztof-Cieslak if you mean
but we can also just skip I'll open a PR with this |
fixes for packaging and build script
build script
bin/net461
andbin/netcoreapp2.1
. Do not usebin_netcore
anymore.temp
paket pack
onlydotnet pack
, because are .net toolsneeded for build), so that simplified a bit the build script
dotnet test
to run tests, removenunit-console
Others
netcoreapp3.0
notnetcoreapp2.1
, becausenetcoreapp3.0
is bundled with sdkRunTests
targetSkipTests
build script parameter to skip all tests (both unit and integration)remove dotnet-mergenupkg
when
Paket
andPaket.Boostrapper
aredonet pack
'd withPackAsTool=true
property (to pack as .NET Tool) these will include the mergedpaket.exe
/paket.boostrapper.exe
inside the package in thetools
dir.The
PackAsTool=true
will also force to target netcoreapp only, because net461 is not supported.In development these projects (Paket/Paket.Boostrapper) continue to target both net461 and netcoreapp2.1
no need to
dotnet mergenupkg
thePaket.Core
package, because now it multitargetcorrectly (it's only one package)
fix duplicated netstandard tfm in Paket.Core
Paket.Core
set min version of dependencies, so are set on package deps set min version constraints for dependencies, so are set in the nuspec generated by
paket pack
forFSharp.Core
Otherwise,
dotnet restore
ofFSharp.Core
use really old version of Newtonsoft/etc who may not work on .NET Standard.For example newtonsoft was restored as v6.x who support only net461 (valid for netstandard, but generate warnings and fails on .net core)
Paket as tool
run as
dotnet paket
FSharp.Core
not pulled when packaging asPackAsTool
netcoreapp
, leave it only innet461
dotnet pack
notpaket pack
dotnet pack no
paket pack`Paket.Bootstrapper as tool
run as
dotnet paketbootstrapper
.
), usepaketbootstrapper
instead as command name (exe name is the same)dotnet pack
notpaket pack
dotnet pack no
paket pack`