Closed Bug 1150860 Opened 9 years ago Closed 6 years ago

Write preprocessor directive usage analysis script

Categories

(Firefox Build System :: General, defect)

32 Branch
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: mikedeboer, Unassigned)

References

(Blocks 1 open bug)

Details

Write a static analysis tool in JS, running on XPCShell to read, parse and analyze the browser JS source files. It will operate in three phases:

 1) List & count the current scope of use of preprocessor directives
 2) For source files that are #include'd, list & count the number of implicit global variables
 3) Track the numbers over time.
Flags: qe-verify-
Flags: firefox-backlog+
Wouldn't it be simpler to use the existing Preprocessor.py that we already use for the actual preprocessing? For bullet point 2 you could feed the list of #included files to another tool.
Yeah, it would probably make more sense to use the preprocessor code to do (1).

However, we started mainly on (2), which I think is just a precondition to start removing the numbers in (1). To me, (2) is mostly useful input for bug 1150859.

Not sure what Mike means by "tracking", or how we'd usefully do that.
Sorry, don't think I'll be able to work on this. :( Also not sure how relevant this still is?
Assignee: dirkjan → nobody
Good point, I think we've covered this elsewhere and now we've got a browser architecture team that's getting us to move away from XBL and other proprietary technologies, which also leads to using fewer preprocessor directives in frontend code.
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
Component: Build Config → General
Product: Firefox → Firefox Build System
Assignee: nobody → nobody
You need to log in before you can comment on or make changes to this bug.