cps-org / cps-config

A drop in replacement for pkg-config/pkgconf using cps files
MIT License
18 stars 8 forks source link

CLI Design Discussion #84

Closed lunacd closed 1 month ago

lunacd commented 5 months ago

Current State

Currently all options are implemented at the top level, no matter they are from pkgconf, pkg-config or specific to CPS. This could mean a chaotic command line interface as we implement more and more features. This could also lead to a hard situation where we had to break compatibility with pkgconf or pkg-config if we want to add CPS-specific capabilities to ones of the options provided by them.

Proposal

Provide compatibility through subcommands, i.e. cps-config pkgconf should behave in the same way pkgconf behaves, and the same goes for cps-config pkg-config. Everything else outside of those two subcommands are purely CPS-specific territory.

Benefits

lunacd commented 5 months ago

@dcbaker @tylerjw @bretbrownjr I'm planning to start implementing some actual features but I feel it could be beneficial to have a brief discussion on what kind of interface, on a high level, that we would want to work towards

bretbrownjr commented 5 months ago

I like this idea!

dcbaker commented 5 months ago

I like this idea too. To go further we might eventually consider doing the argv[0] == "pkg-config" trick so thatcps-config` can be installed as pkg-config, though that would mean we'd need to support doing pkg-config lookup as well. If/when we get to that I have some code from an old project we might be able to steal for that purpose.

tylerjw commented 5 months ago

I am happy to participate. Let me know how I can help.

lunacd commented 5 months ago

I imagine something like #70 would be crucial to making this happen. Based on that we could also talk about what we consider the first release of cps-config, maybe an interesting level of compatibility with pkg-config for all libraries available on ubuntu?

lunacd commented 1 month ago

Closing as this has already been implemented and merged