Project

General

Profile

Design #1768

Limit indentation in verbose mesgs?

Added by John Abbott 5 months ago. Updated 3 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Improving
Target version:
Start date:
19 Nov 2023
Due date:
% Done:

100%

Estimated time:
1.23 h
Spent time:

Description

I have an infinite recursion bug, and with verbosity active the indentation becomes rather large :-/
Should we impose a limit for the indentation? Maybe level 20?
Discuss, decide.


Related issues

Related to CoCoALib - Design #1721: Verbose messages: print level?Closed2023-01-19

History

#1 Updated by John Abbott 5 months ago

I suggested a limit of 20 because that is not so much indentation, and I can imagine few genuine situations where we would need depth greater than 20. Perhaps even a lower limit would be OK?
I stopped my infinite recursion at level 420... oops!

#2 Updated by John Abbott 5 months ago

  • Related to Design #1721: Verbose messages: print level? added

#3 Updated by Anna Maria Bigatti 5 months ago

John Abbott wrote:

I suggested a limit of 20 because that is not so much indentation, and I can imagine few genuine situations where we would need depth greater than 20. Perhaps even a lower limit would be OK?

I agree with you for the risk of infinite loops, but I would set the limit a lot higher: I have a genuine example which reached with depth 31 (and running), because depth is also due to nested function call, not just recursion.
If your window is full width, you can comfortably see 180 characters in a line.
I suggest around 100.

#4 Updated by John Abbott 5 months ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 30

The point is whether we should impose a limit. I agree that 20 is probably too low. We can try with 100, and possibly change it in the future if the need arises.

#5 Updated by John Abbott 5 months ago

  • Status changed from In Progress to Resolved
  • % Done changed from 30 to 70

I have checked in a first version (but not actually tested it...)

#6 Updated by John Abbott 5 months ago

Anna will test the updated code shortly (I hope)

#7 Updated by John Abbott 3 months ago

Can we close this?
Anna do you agree?

#8 Updated by John Abbott 3 months ago

  • Status changed from Resolved to Closed
  • Assignee set to John Abbott
  • % Done changed from 70 to 100
  • Estimated time set to 1.23 h

Also available in: Atom PDF