unit icon indicating copy to clipboard operation
unit copied to clipboard

CLI: dont require mac users to install additional versions of coreutilities

Open avahahn opened this issue 1 year ago • 4 comments

The tools/unitctl should work just fine with whatever make, sed, awk that OSX ships with.

avahahn avatar May 07 '24 15:05 avahahn

What about adding an auto target (like the rest of Unit's makefiles) for unitctl since those work fine on macOS?

Alternatively, since the unitctl Makefiles make heavy use of GNU Make 4.x features, we could detect if gmake is present in the path, use it transparently if present, and if not be minimally helpful and suggest:

brew install make gnu-sed grep coreutils

danielledeleo avatar May 08 '24 14:05 danielledeleo

At the end of the day the main thing the Makefiles do is invoke cargo build and all that needs is a Rust compiler. Maybe there's a hacky way to define that build target above the Make version checks?

The Maven dependency for openapi-generator is another thing to look out for.

danielledeleo avatar May 08 '24 14:05 danielledeleo

Alternatively, as discussed with @avahahn, explore replacing everything with a custom build.rs script to manage the OpenAPI dependencies.

danielledeleo avatar May 08 '24 16:05 danielledeleo

What about adding an auto target (like the rest of Unit's makefiles) for unitctl since those work fine on macOS?

The auto/ stuff is driven via ./configure and is really just for configuring unit...

The key is to stick to POSIX

ac000 avatar May 08 '24 16:05 ac000