Project

General

Profile

Feature #652

Flag to enable/disable printing of list of loaded packages

Added by John Abbott over 9 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Urgent
Assignee:
Category:
enhancing/improving
Start date:
28 Nov 2014
Due date:
% Done:

100%

Estimated time:
6.01 h
Spent time:

Description

Add a command-line flag to enable printing of package names as they are loaded. Currently the names are always printed out (one per line) which wastes lots of vertical space (and is probably of no interest to normal CoCoA-5 users).

History

#1 Updated by Anna Maria Bigatti over 9 years ago

I have made this change:
the list of packages loaded at the start are printed into ostringstream PkgOut (in Main.C).
Currently nothing is then done with its content.
I think it would be useful to be able to print it later.
John, What do you think?

I had thought not to go for a flag because those most affected by this long list (for several restarts) and those possibily needing the information about loaded packages actually coincide (i.e. the developers ;-)

#2 Updated by John Abbott over 9 years ago

Anna points out that there is already a similar flag (--no-preamble) which is used when running the CoCoA-5 tests (note: it also suppresses the banner).

John points out that there is a flag for "full error messages" (which is useful for developers), and wonders whether there should be a "developer" flag which turns on all switches which might be useful for developers.

#3 Updated by John Abbott over 9 years ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 20
I have modified Main.C but not checked in -- will discuss with Anna first.
  • replaced bool printPremable by int PreambleVerbosity with 3 levels (0,1,2)
  • default is level 1 which prints just the banner
  • level 0 prints nothing (same as printPreamble being false)
  • level 2 prints everything (same as old default), currently activated only when --fullCoCoALibError is given

Should the command line options be revised?

#4 Updated by John Abbott about 9 years ago

Not quite this topic, but very close. I made a "mistake" in a package file which produced an annoying "warning"; this resulted in about 15 error/warning summaries being printed out when I started CoCoA-5. Really this should be printed just once...
[perhaps it is enough to reset a counter to zero?]

#5 Updated by John Abbott about 9 years ago

Now resets error counter before reading each package (Main.C:289).

#6 Updated by John Abbott about 9 years ago

JAA does not much like the current approach (variable PkgOut).
If a package provokes an error then the screen fills with messages about the packages being skipped.

It feels strange/funny/awkward that the "progress messages" are on a different stream from the errors/warnings.

The default should probably be (almost) silent:
  • A completely silent if no errors
  • B possibly Loading packges... then afterwards Loaded 37 packages or just Done

If an error occurs, the user must be warned, but most users won't care about the details. The details should be produced if "debugging" is turned on.

Currently it does not seem to be possible to print out the contents of PkgOut.

We need to rethink the solution to this issue...

#7 Updated by John Abbott almost 9 years ago

  • Priority changed from Normal to Urgent

The excesive verbosity has arisen again: Rank was exported from 2 packages (BackwardCompatible and obsolescent). This was rightly flagged as an error, but it was tedious and unhelpful having lots of messages about "skipping" packages appear afterwards -- I suppose it make the presence of the error quite evident (but only because the problem happened to be noticed in one of the first packages to be loaded).

We need to think about what the default behaviour should be (for normal users), and how a developer can get more detailed, useful information (without it being smothered in a tsunami of not-very-helpful messages).

#8 Updated by John Abbott almost 9 years ago

The C5 GUI still prints out the packages as they are loaded. Fix!

#9 Updated by John Abbott over 8 years ago

  • Status changed from In Progress to Feedback
  • Assignee set to John Abbott
  • % Done changed from 20 to 90

Anna modified Main.C:304 so that (during package loading) package names are printed to a string (PkgOut); currently that string is never printed (or otherwise used). We observe that in the 8 months since Anna's change, no one has wanted to look at the contents of PkgOut.

JAA has modified C5.C:1820 so that (during package loading) packages are not printed at all -- the relevant source line has just been commented out.

JAA has also suppressed the warning messages about "skipping" packages (all those occurring after the faulty package) in both the text version and the GUI. The reason for this change is that JAA believes the warnings are almost worthless to everyone -- it is more important to see the message about what the actual error was (rather than "lose" it in a barrage of relatively worthless messages).

JAA has also moved the printing of the main message about package errors so that it appears after the CoCoA-5 banner; the reason is that JAA thinks it is more noticeable there. Anna has approved the changes.

#10 Updated by Anna Maria Bigatti over 8 years ago

  • Status changed from Feedback to Closed
  • % Done changed from 90 to 100
  • Estimated time changed from 2.00 h to 6.01 h

Also available in: Atom PDF