clib icon indicating copy to clipboard operation
clib copied to clipboard

DISCUSSION: Sub-commands as libraries with entry points

Open jwerle opened this issue 5 years ago • 5 comments

See #116

jwerle avatar Jul 23 '20 14:07 jwerle

I was thinking about this issue, and my opinion is that we should compile a single binary.

Pros:

  • Lot of code duplication could be removed
  • Much more maintainable
  • Building clib is simpler
  • Solves the mentioned issue

Cons:

  • Breaking change
  • clib-* binaries won't be picked up as subcommands. However this could gradually removed, and replaced with a different plugin solution.

Any ideas on this?

Isty001 avatar Jan 15 '21 07:01 Isty001

I like the idea and could be an opportunity to really have a clean linkable C library for embedding clib or other programmatic usage. +1 for plugins

jwerle avatar Jan 15 '21 13:01 jwerle

While it is a breaking change, I don't imagine many folks are leveraging the subcommand/plugin feature. There are only two plugins (listed in our registry) and I wrote both 🤣 I don't think our users would be too upset about us dropping support here.

My only concern: what would we do with the existing "plugins"? Do we just archive them? Do they provide enough value to get merged into "core"?

stephenmathieson avatar Jan 16 '21 05:01 stephenmathieson

I think it's worth to move them to clib, and have them by default. I actually opened an issue for this #239 and I'll take a look at it soon.

Isty001 avatar Jan 16 '21 06:01 Isty001

Wrong button 🤦‍♂️

I didn't see that issue until now. Moving them into core SGTM 👍

stephenmathieson avatar Jan 16 '21 17:01 stephenmathieson