Skip to content

Argument Clinic 'destination <name> clear' is broken #106970

Closed
@erlend-aasland

Description

@erlend-aasland

The destination <name> clear command is documented like this:

It removes all the accumulated text up to this point in the destination. (I don’t know what you’d need this for, but I thought maybe it’d be useful while someone’s experimenting.)

Clearly, the last sentence is correct, because this command contains two bugs, and nobody has ever complained:

  1. It accesses the wrong attribute when clearing the accumulators
  2. The directive parser does not return immediately after executing the clear command, so it jumps straight into "fail because we got an unknown command"

The fixes are easy, so I suggest we apply the fixes and add regressions tests. An alternative could be to remove the clear command, but I don't think we should tear out features lightly, no matter how obscure they are.

Found while working on #106935.

Linked PRs

Metadata

Metadata

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions