Ticket #1200 (closed enhancement: fixed)

Opened 7 years ago

Last modified 6 years ago

Feature request: improve cave resolve --explain output

Reported by: albel727 Owned by:
Priority: Sometime Milestone:
Component: clients/cave Version: 0.66.0
Keywords: Cc:
Blocked By: Blocking:
Distribution: N/A

Description

In some cases, cave resolve --explain output is too verbose/hard to read, and there are lots of apparently duplicated information.

I suggest several improvements, which may help the situation.

1)Group because-s by constraint.

2)Remove apparently duplicate <dependency> from 'Because of <dependency>'

3)Lexicographically sorting 'from' clauses (with removal of duplicates)

I also have attached several files to this ticket, which contain a capture of --explain output, that I once got, and how it would have been looking, if my proposals were implemented. Summary of the proposals is as follows.


1)Group because-s by constraint. Currently, every reason is printed under its own 'constraint header', which looks like that:

* <dependency>, <using/not using existing>, <installing to>

But these headers are relatively often duplicated, e.g:

* <header>
 Because of <reason1>
* <header>
 Because of <reason2>

It would be nice to have it printed like that:

* <header>
 Because of <reason1>
 Because of <reason2>

2)Remove apparently duplicate <dependency> from 'Because of <dependency>' Another problem, is <dependency> text, which seems to be duplicated in both constraint header and reason, which looks like that (in this example I'm assuming that proposal #1 is accepted, and there are multiple becauses):

* <dependency>, <using/not using existing>, ...
 Because of <dependency> from <package1>, ...
 Because of <dependency> from <package2>, ...

I can't recall ever seeing '<dependency> from a header' != '<dependency> from a because'. This unnecessarily fills screen space. Therefore, I propose to remove 'Because of <dependency>' part altogether, and, maybe, replace it with '-' so the list structure of reasons becomes apparent. It will look like that:

* <dependency>, <using/not using existing>, ...
 - from <package1>, ...
 - from <package2>, ...

3)Lexicographically sorting 'from' clauses (with removal of duplicates)

Even if 1) and 2) are accepted, there is still room for improvement. Reasons happen to be unorderly listed, and sometimes, even fully duplicated (I dunno, how that happens). It looks like that:

* <dependency>, <using/not using existing>, ...
 - from <a/package1>, ...
 - from <c/package3>, <the rest of absolutely identical text>
 - from <c/package3>, <the rest of absolutely identical text>
 - from <b/package2>, ...

Naturally, it would be nice to have it like that:

* <dependency>, <using/not using existing>, ...
 - from <a/package1>, ...
 - from <b/package2>, ...
 - from <c/package3>, <the rest of absolutely identical text>

Attachments

__to_ciaranm_orig.txt Download (3.8 KB) - added by albel727 7 years ago.
Original cave resolve --explain output
__to_ciaranm_ver1.txt Download (2.8 KB) - added by albel727 7 years ago.
Improved output version #1
__to_ciaranm_ver2.txt Download (2.1 KB) - added by albel727 7 years ago.
Improved output version #2
__to_ciaranm_ver3.txt Download (1.3 KB) - added by albel727 7 years ago.
Improved output version #3

Change History

Changed 7 years ago by albel727

Original cave resolve --explain output

Changed 7 years ago by albel727

Improved output version #1

Changed 7 years ago by albel727

Improved output version #2

Changed 7 years ago by albel727

Improved output version #3

comment:1 Changed 6 years ago by ciaranm

  • Status changed from new to closed
  • Resolution set to fixed

Let's see if it's better now.

Note: See TracTickets for help on using tickets.