Closed Jaykul closed 5 years ago
It's not really installing IMO... but I feel like Restore would fit well: Restore-PSDependencies
Naming is hard.
I'm not convinced about using Build
in the noun, although it would probably in a build job or task, you might be resolving test dependencies, data dependencies, DSC resources dependencies... I find that build could induce confusion depending how it's used.
I guess I'm pretty confused about who and what you would use this for apart from build-time. Especially when you say it's not really installing.
What are you using it for?
Borrowed a lot from PSDeploy, thus, Invoke-PSDeploy became Invoke-PSDepend (couldn't come up with a reason to change it back then).
A few things I've used it for:
For the most part, yeah, the end result is an install, but Invoke-PSDepend
has some other things built in:
install
, test
, and import
as appropriate, each of which have a Install-Dependency
esque command'\.depend\.psd1$|.*requirements.psd1$'
InputObject
hashtables that equate to the content of a psd1-Install
, -Test
, -Import
Basically... it's a convenient way to invoke psdepend : P
Cheers!
Invoke-PSDepend is very similar to how you execute other similar modules e.g., psake: Invoke-Psake, pester: Invoke-Pester, etc.
That doesn't make "invoke" a good verb. In fact, of these tools are doing it wrong, because they are all following Pester's anti-pattern approach to naming. Remember, Pester is the module that couldn't be bothered to follow verb-noun, and introduced Ruby-like syntax to PowerShell.
Invoke-PSDepend
is only a good name if "Depend" is the name of a command or method.
Having said that, a year ago, I cared. Now, I don't. It's been badly named all this time, and nobody else cares (and I decided not to use it) so it doesn't matter.
Why is it that the main install function is named
Invoke-PSDepend
instead ofInstall-BuildDependencies
or something appropriate like that?