Tools to extract packages?

142 views
Skip to first unread message

Andy Bursavich

unread,
Jul 18, 2021, 2:42:07 PM7/18/21
to golang-nuts
In the Kubernetes ecosystem, I frequently run into a problem where I want to use some custom resource but its API package is in the same module as its controller (and loads of other crap) that have a massive dependency chain (often broken and "fixed" with replace directives). In several instances I've sent PRs to remove dependencies on k8s.io/kubernetes from the modules, but this isn't scalable.

Do any tools exist that will extract a handful of low-dependency packages into a new module? It seems like something that must already exist and I'd rather not write it if I don't have to.

Sebastien Binet

unread,
Jul 19, 2021, 3:07:29 PM7/19/21
to Andy Bursavich, golang-nuts
Hi,

Jul 18, 2021 20:42:35 Andy Bursavich <aburs...@gmail.com>:

> In the Kubernetes ecosystem, I frequently run into a problem where I want to use some custom resource but its API package is in the same module as its controller (and loads of other crap) that have a massive dependency chain (often broken and "fixed" with replace directives). In several instances I've sent PRs to remove dependencies on k8s.io/kubernetes from the modules, but this isn't scalable.
>
> Do any tools exist that will extract a handful of low-dependency packages into a new module? It seems like something that must already exist and I'd rather not write it if I don't have to.

There was the beginning of such a thing at sur point in x/tools.
Nowadays, it seems most of the action is happening in rsc.io/rf

hth,
-s

> --
> You received this message because you are subscribed to the Google Groups "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/6df4d297-f3bc-49a9-8357-4301c7f411ben%40googlegroups.com[https://groups.google.com/d/msgid/golang-nuts/6df4d297-f3bc-49a9-8357-4301c7f411ben%40googlegroups.com?utm_medium=email&utm_source=footer].
Reply all
Reply to author
Forward
0 new messages