HomeClusterLabs Projects

Feature: tools: Deprecate crm_diff --stdin
65981f8a09c8Unpublished

Unpublished Commit ยท Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.
This commit no longer exists in the repository. It may have been part of a branch which was deleted.This commit has been deleted in the repository: it is no longer reachable from any branch, tag, or 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

Event Timeline

Commit No Longer Exists

This commit no longer exists in the repository.