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

[WIP] repo level tools #2938

Closed
wants to merge 163 commits into from
Closed

Conversation

enricosada
Copy link
Collaborator

@enricosada enricosada commented Dec 14, 2017

fix #2919

to test it, an example in https://github.com/enricosada/paket-repotool-testing
aligned to this PR wip

  • paket install tools from nupkgs
  • paket restore tools from nupkgs
  • paket add-tool FAKE //install in repo: add to deps + install
  • global helper script to set repotool in PATH repotool enable/disable => paketrt e (or enable), paketrt d (or disable)
  • paket add-tool FAKE -G //install globally
    • first time: call init and restore if not found to install helpers and paketg
    • install requested tool
    • other times: use paketg add-tool FAKE instead of directly use that paket.dependencies
    • is paket add-tool -G a good idea (as alias for paketg add-tool), or just drop it and ask directly to use paketg?
  • infer tools inside nupkg
    • allow tools/*.exe (old directory structure)
    • allow tools/net*/*.exe
    • allow tools/netcoreapp*/{pkgname}.dll
    • allow tools/netcoreapp*/{name}.dll if {name}.deps.json exists in same dir
  • integration tests (install, restore)
  • add multi targeting tools support:
    • atm based on PAKET_REPOTOOL_PREFFERED_RUNTIME env var)
    • net4* (with mono on unix/osx)
    • netcoreapp2* with dotnet, as fdd
  • create a paket wrapper in Main bin dir if a .paket/paket.exe exists
  • add helper script to add bin dir to PATH (windows). paket-files\bin\paketrt e preferred helper is global paketrt. but a paket command exists too to do it without paketrt
  • add helper script to add bin dir to PATH (powershell). . paket-files\bin\add_to_PATH.ps1 skipped powershell for this release
  • add helper script to source bin dir to PATH (linux/osx). . <(./paket-files/bin/paketrt e) preferred helper is global paketrt. but a paket command exists too to do it without paketrt
  • support configuration by xml in nupkg (for alias mostly) skipped until global tools stabilize
  • no relative dir, use absolute paths
  • helper use written info in paket-files/paket-repotools.csv instead of read paket.lock (allow in a backward compatible way a different verison of paket to read installed tools info)
  • if paketrt with empty args =>whoiam
  • feedback of https://github.com/enricosada/paket-repotool-testing/#known-bugs-or-not-implemented-yet

@enricosada
Copy link
Collaborator Author

added another version for paket shell script, thx to @baronfel !

@enricosada enricosada mentioned this pull request Dec 15, 2017
@enricosada enricosada force-pushed the repo_level_tools branch 2 times, most recently from 93b3b10 to 337c6ac Compare January 2, 2018 17:33
@enricosada
Copy link
Collaborator Author

Updated the demo repository after last time feedback, just clone and follow the README https://github.com/enricosada/paket-repotool-testing/

@enricosada enricosada force-pushed the repo_level_tools branch 2 times, most recently from 7e3193f to 68b4b21 Compare January 4, 2018 10:18
@enricosada
Copy link
Collaborator Author

Updated the demo repository (tagged as v2.2 but master is always ok).
Just clone and follow the README https://github.com/enricosada/paket-repotool-testing/

Copy link

@realvictorprm realvictorprm left a comment

Choose a reason for hiding this comment

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

After the Twitter post I spotted this deletion which should be removable :)

@@ -2200,4 +2201,4 @@
</Choose>
<Import Project="..\..\packages\NETStandard.Library\build\NETStandard.Library.targets" Condition="Exists('..\..\packages\NETStandard.Library\build\NETStandard.Library.targets')" Label="Paket" />
<Import Project="..\..\packages\NETStandard.Library\build\$(__paket__NETStandard_Library_targets).targets" Condition="Exists('..\..\packages\NETStandard.Library\build\$(__paket__NETStandard_Library_targets).targets')" Label="Paket" />
</Project>

Choose a reason for hiding this comment

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

Why did this happen :(?

Copy link
Collaborator Author

@enricosada enricosada Jan 11, 2018

Choose a reason for hiding this comment

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

different newline at EOF.

@enricosada enricosada force-pushed the repo_level_tools branch 2 times, most recently from 23e2e2d to 2067f0e Compare January 30, 2018 14:20
@enricosada enricosada force-pushed the repo_level_tools branch 2 times, most recently from 97e2211 to dff7258 Compare February 2, 2018 16:04
@matthid
Copy link
Member

matthid commented Mar 14, 2018

@enricosada Looks pretty ready to me. How about we just release this in a beta?

@enricosada
Copy link
Collaborator Author

enricosada commented Apr 17, 2018

rebased

@matthid sort of done. let me split global tools and repo tools.
i want to avoid current management, and just use global cli tools for global install (a lot easier to maintain, pretty much same features) so i can finish this

@matthid
Copy link
Member

matthid commented Aug 25, 2019

This could be useful for ootb support for dotnet tools in FAKE, see fsprojects/FAKE#2169 (comment)

@enricosada I might finish this (as it basically looks good to me), any objections regarding syntax?

For me, this also solves #3623 as I can just add paket and let fake restore paket (/cc @Krzysztof-Cieslak)

@enricosada
Copy link
Collaborator Author

Closing

some good things in the PR (lot of learning too for myself :D) but .net local tool are the way forward

@enricosada enricosada closed this Nov 28, 2019
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.

Repo tools
3 participants