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

Chocolatey Deprecating A Function #226

Closed
mrcbax opened this issue Oct 12, 2015 · 7 comments · Fixed by #436
Closed

Chocolatey Deprecating A Function #226

mrcbax opened this issue Oct 12, 2015 · 7 comments · Fixed by #436
Milestone

Comments

@mrcbax
Copy link

mrcbax commented Oct 12, 2015

as seen here, chocolatey will be deprecating the the get-binroot function:

Get-BinRoot is going to be deprecated by v1. Many packages no longer require it since the folders no longer have versions on them.
psgiterror

@dahlbyk dahlbyk modified the milestones: v0.7, v1.0 Jan 2, 2017
@dahlbyk
Copy link
Owner

dahlbyk commented Jan 6, 2017

I'm torn if it would be better to address this for 0.7 (after #358) or wait until 1.0.

@rkeithhill
Copy link
Collaborator

Well, for 1.0 we're unlikely to even provide a Chocolatey package anymore, right? And since the 0.7 branch will live for a while to support v2 (and possibly v3/4), it seems like we should switch to a non-deprecated function.

@dahlbyk
Copy link
Owner

dahlbyk commented Jan 6, 2017

Well, for 1.0 we're unlikely to even provide a Chocolatey package anymore, right?

I'm open to discussion on this. There are likely a number of devs who wouldn't use PS Gallery for anything other than posh-git, so keeping some sort of Chocolatey package seems reasonable.

Is fixing this really as simple as using $env:ChocolateyBinRoot instead?

@rkeithhill
Copy link
Collaborator

I think the replacement is Get-ToolsLocation - chocolatey/choco#631

@dahlbyk dahlbyk modified the milestones: v0.7, v1.0 Jan 6, 2017
@dahlbyk dahlbyk modified the milestones: v1.0, v0.7 Feb 1, 2017
@dahlbyk
Copy link
Owner

dahlbyk commented Feb 1, 2017

I think we're fine leaving Get-BinRoot for v0.7, so moving to v1.0. Or maybe we could quickly publish v0.8 that only replaces Get-BinRoot with Get-ToolsLocation and requires Chocolatey 0.10.3? @ferventcoder is there a best practice for packages to handle deprecations?

Also worthy of consideration: https://chocolatey.org/packages/poshgit#comment-2816165073

As currently configured this package installs itself in the chocolatey BinRoot/ToolsLocation (which defaults to c:\tools as far as I can tell). Based on the discussion around https://github.com/chocolatey/... this location seems to be intended for portable tools, but that doesn't seem to make any sense to me for posh-git, which needs to be integrated into the user's powershell environment to be of any use.

It seems like it would be more appropriate to install the posh-git package in one of the powershell module locations. In fact some other powershell enhancements (I'm thinking of Oh-My-PoSH right now) rely on posh-git being in a location that's discoverable by Get-Module -ListAvailable for it to be recognized.

@ferventcoder
Copy link
Contributor

ferventcoder commented Feb 1, 2017

It's actually 0.9.10 when it was introduced (June 17, 2016). We try to document most of these kinds of things to ease transition and help folks decide when is best - https://chocolatey.org/docs/helpers-get-toolslocation

Typically after 6 months of release, we are okay with the transition on the community package repository.

This also gives you access to chocolateyBeforeModify.ps1, an additional script that will assist prior to upgrade and prior to uninstall. Run choco new test and look at the output to see the docs.

@ferventcoder
Copy link
Contributor

But you could also go for adding it as a PowerShell Module location if that is more appropriate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants