Open Bug 978582 Opened 6 years ago Updated 2 years ago

Make reader error on tabs


(Firefox Build System :: General, defect)

Not set


(Not tracked)


(Reporter: nalexander, Unassigned, Mentored)


(Whiteboard: [lang=python][good second bug])

Per, it would be nice to make files an error.  We should not, of course, make tabs in strings an error.
Whiteboard: [mentor=nalexander][lang=python][good second bug]
I found the following files that contained tabs (taken from mozilla-central changeset 1507f021ac93):
None of the tabs were in strings, just in leading whitespace. (You could always use \t inside a string anyway.)
Can i pick this bug?
(In reply to adu from comment #2)
> Can i pick this bug?

Sure!  My guess is you should look at the code at

and the tests at

It's possible that Python will help us out here by rejecting tabs itself.  That would be be best, since we don't parse anything ourselves.  Start by looking into the options to compile(), invoked at

Please update this ticket with what you find out, and thanks for helping out!
There are performance concerns at play here. We definitely want to avoid redundant I/O to scan the source of files and we'd like to minimize CPU when scanning files. Solutions that add over say 1s to scanning on a modern CPU will likely be scoured for perf drawbacks and asked to be corrected.

For the record, my Haswell MacBook Pro currently clocks in at:

Finished reading 2534 files in 1.75s

(From the output of `mach build-backend`)

And I /think/ a large amount of that time is spent in GYP processing (as opposed to core reading).
Mentor: nalexander
Whiteboard: [mentor=nalexander][lang=python][good second bug] → [lang=python][good second bug]
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.