HomeClusterLabs Projects

Feature: tools: Deprecate crm_diff --stdin
ffa608fc1105Unpublished

Unpublished Commit ยท Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

Feature: tools: Deprecate crm_diff --stdin

I'm not aware of any tool in our ecosystem that uses this option. It's
not user-friendly at all. They don't tell you that you have to press
Ctrl+D (on Linux) at the beginning of a line to mark the end of an XML
string and indicate that you're ready to input the next one. And then
press Ctrl+D again to end the second XML string.

So this isn't conducive to piping input into the command, which is
typically the use case for a --stdin option. There's no obvious good way
to delimit the first XML input string from the second one.

The prompts (removed by a previous commit) also complicated the
conversion to using pcmk__output_t. Basically, there's no great way to
print the prompts when using XML-formatted output, and the output isn't
flushed automatically for text-formatted output, so we can't guarantee
that the prompts will appear on time. We could work around this by
continuing to fprintf() to stderr and then flush, but that's ugly.

Signed-off-by: Reid Wahl <nrwahl@protonmail.com>

Details

Provenance
nrwahl2Authored on Mar 18 2025, 2:56 AM
Parents
rP2b3a10d6506a: Refactor: tools: Use out->err() in crm_diff, and drop prompts
Branches
Unknown
Tags
Unknown

Event Timeline