mirror of
https://github.com/littlefs-project/littlefs.git
synced 2025-12-06 15:42:43 +00:00
scripts: Moved recursive entry generation before table rendering
This fixes an issue where mixing recursive renderers (-t/--hot or -z/--depth) with defines (-Dfunction=lfsr_mount) would not account for children entry widths. An unexpected side-effect of no longer filtering the children entries. We could continue to try to estimate the width without table rendering, but it would basically need two full recursive pass at this point... Instead, I've just moved the recursive stuff before table rendering, which should remove any issues with width calculation while also deduplicating the recursive passes. It's invasive for a small change, but probably worthwhile long term. The downside is this does mean our recursive scripts now build the full table (including all recursive calls!) before they start printing. When mixed with unbounded recursive depth (-z0 or --depth=0) this can get quite large and cause quite a slow start. But I guess that was the tradeoff in adopting this sort of intermediate table rendering... At least it does make the code simpler and less bug prone...
This commit is contained in:
@@ -379,6 +379,7 @@ def table(Result, results, diff_results=None, *,
|
||||
header.append('d'+k)
|
||||
lines.append(header)
|
||||
|
||||
# entry helper
|
||||
def table_entry(name, r, diff_r=None):
|
||||
entry = [name]
|
||||
if diff_results is None:
|
||||
|
||||
Reference in New Issue
Block a user