Closed Bug 1461488 Opened 6 years ago Closed 6 years ago

Trim tup's display for generated files with many output files

Categories

(Firefox Build System :: General, enhancement)

3 Branch
enhancement
Not set
normal

Tracking

(firefox62 fixed)

RESOLVED FIXED
mozilla62
Tracking Status
firefox62 --- fixed

People

(Reporter: mshal, Assigned: mshal)

References

Details

Attachments

(1 file)

      No description provided.
Comment on attachment 8975645 [details]
Bug 1461488 - trim tup's display of commands with many outputs;

https://reviewboard.mozilla.org/r/243892/#review249798

::: python/mozbuild/mozbuild/backend/tup.py:656
(Diff revision 1)
> +            display_outputs = ', '.join(outputs[0:3])
> +            if len(outputs) > 3:
> +                display_outputs += ', ...'

Wow, I never realized the slice notation doesn't throw an `IndexError` for slices out of bounds. Would this be a little clearer with just `display_outputs = ', '.join(outputs)` in an else block?
Attachment #8975645 - Flags: review+
Attachment #8975645 - Flags: review?(core-build-config-reviews)
(In reply to Chris Manchester (:chmanchester) from comment #2)
> ::: python/mozbuild/mozbuild/backend/tup.py:656
> (Diff revision 1)
> > +            display_outputs = ', '.join(outputs[0:3])
> > +            if len(outputs) > 3:
> > +                display_outputs += ', ...'
> 
> Wow, I never realized the slice notation doesn't throw an `IndexError` for
> slices out of bounds. Would this be a little clearer with just
> `display_outputs = ', '.join(outputs)` in an else block?

Good idea - fixed.
Pushed by mshal@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/cf3bdac11bc8
trim tup's display of commands with many outputs; r=chmanchester
https://hg.mozilla.org/mozilla-central/rev/cf3bdac11bc8
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
See Also: → 1487840
Version: Version 3 → 3 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: