Closed Bug 1562996 Opened 5 months ago Closed 2 months ago

make a GeneratedFile template instead of all the boilerplate around GENERATED_FILES

Categories

(Firefox Build System :: General, task, P3)

Tracking

(firefox71 fixed)

RESOLVED FIXED
mozilla71
Tracking Status
firefox71 --- fixed

People

(Reporter: froydnj, Assigned: rstewart)

References

Details

(Keywords: in-triage)

Attachments

(1 file)

GENERATED_FILES requires a fair amount of boilerplate:

https://searchfox.org/mozilla-central/source/config/moz.build#59-64
https://searchfox.org/mozilla-central/source/js/src/build/moz.build#32-37

Maybe it would be nicer to have an @template like:

GeneratedFile(name, script, entry_point="main", flags, ...other arguments...)

and people could just use keyword arguments, and the template would handle a bunch of stuff behind the scenes? Would also be nice for getting rid of the "script.py:entry_point" convention, which shouldn't really be exposed to the user.

The larger thing to explore here is moving moz.build files to mostly @template invocations, which would be more compatible with a Starlark-like language.

Priority: -- → P3
Assignee: nobody → rstewart
Attachment #9095041 - Attachment description: Fix Bug 1562996. Add a GeneratedFile template to get rid of some of the boilerplate involved in interfacing with GENERATED_FILES. → Bug 1562996 - Add a GeneratedFile template to get rid of some of the boilerplate involved in interfacing with GENERATED_FILES.
Pushed by cmanchester@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/134999fb1885
Add a GeneratedFile template to get rid of some of the boilerplate involved in interfacing with GENERATED_FILES. r=nalexander
Status: NEW → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla71
Blocks: 1586358
You need to log in before you can comment on or make changes to this bug.