samneirinck/posh-docker

Split out ConvertFrom-Docker into separate module

Opened this issue · 4 comments

Hi @samneirinck,

It would very convenient if ConvertFrom-Docker were in a separate module.

I am authoring a module, DockerHelpers, where I would like to take a dependency on posh-docker but can't as explained below.

DockerHelpers module uses ConvertFrom-Docker for some of it's implementation. But DockerHelpers should not add tab completion to the powershell console.

So currently I'm copying ConvertFrom-Docker into DockerHelpers module - not ideal for a number of reasons.

Alternatively, I'd be very happy for ConvertFrom-Docker to be contributed to DockerHelpers. Obviously that would mean posh-docker taking an external dependency. However, powershell Install/Import commands would make that transparent to the consumer of posh-docker.

If you were willing to contribute then I'd make you a contributor to DockerHelpers so that you can modify the sources.

Thanks
Christian

Hi Sam,

Just moving the conversation over to here.

It looks like @stuartleeks is happy to contribute ConvertFrom-Docker function over to the DockerHelpers.

Do you want me to create a PR that makes DockerHelpers module a dependency of posh-docker?

Also, do you and @stuartleeks want to be setup as contributors to DockerHelpers?

Thanks
Christian

Hi @christianacca,

Thanks for the write up. I understand your concern, and ideally we move ConvertFrom-Docker out into another module. I'm a bit hesitant on taking in a dependency on another module, since the core idea of this module is -only- tab completion, not a general module for docker cmdlets.

I'd be happy to deprecate ConvertFrom-Docker and point to your module for an up to date version (and other cmdlets related to powershell), instead of taking a hard dependency.

Does that sound like an acceptable idea?

Gotcha.

In that case how about I take ownership of ConvertFrom-Docker repo, turn the existing code into a module and then both DockerHelpers and posh-docker have dependencies on the one thing they both need in common - the ConvertFrom-Docker function (now packaged as a module)?

TBH, the https://github.com/stuartleeks/ConvertFrom-Docker repo could probably happily be deleted now

@stuartleeks, rather than deleting the project, would you be ok if I took ownership of it for reasons above?