Closed
Bug 1138579
Opened 10 years ago
Closed 6 years ago
Ability to define multiple patterns in Files contexts
Categories
(Firefox Build System :: General, defect)
Firefox Build System
General
Tracking
(firefox64 fixed)
RESOLVED
FIXED
mozilla64
Tracking | Status | |
---|---|---|
firefox64 | --- | fixed |
People
(Reporter: gps, Assigned: tcampbell)
References
Details
Attachments
(1 file)
Currently, Files contexts accept a single pattern as their argument. There are places where we want to cherry-pick individual files. I think it makes sense to support passing multiple files to Files.__init__.
Comment 1•10 years ago
|
||
So, one thing that I was thinking would be useful for templates is some magic around the syntax:
with Template(...), Template(...):
stuff
such that two sub contexts are emitted, and stuff is applied to both. This would involve a proxy context that dispatches to both sub contexts.
The problem is that it's hard to distinguish that form and:
with Template(...):
with Template(...):
stuff
Maybe looking at frame data?
Reporter | ||
Comment 2•10 years ago
|
||
I'd rather not depart too far from the Python language because it breaks understanding.
For this feature, I was thinking of using either *args or detecting an iterable as the argument and emitting multiple Files instances (rather than a single Files that has multiple patterns).
If you want to have a go at using the multiple context manager syntax and magic, I won't stop you. But I have a feeling people will want this feature soonish, which is why I'm inclined to go the easy route.
Comment 3•10 years ago
|
||
Immediate options:
with Files('{a,b}'):
with Files('a', 'b'):
with Files('a'), Files('b'):
I prefer the middle one. It still allows future extension possibilities:
with Files('a/**', 'b/**', exclude='*.js'):
Updated•7 years ago
|
Product: Core → Firefox Build System
Assignee | ||
Comment 4•7 years ago
|
||
Add support for |with Files('a/**', 'b/**')| in mozbuild config files.
MozReview-Commit-ID: IoM4qfEhXXc
Assignee | ||
Comment 5•7 years ago
|
||
Examples of places that could benefit:
https://searchfox.org/mozilla-central/rev/6201a9e0067cf6af118c6a99ae9314b8ceb2c4d5/js/src/moz.build#32-38
https://searchfox.org/mozilla-central/rev/6201a9e0067cf6af118c6a99ae9314b8ceb2c4d5/layout/generic/moz.build#7-29
https://searchfox.org/mozilla-central/rev/6201a9e0067cf6af118c6a99ae9314b8ceb2c4d5/dom/media/moz.build#23-28
Assignee: nobody → tcampbell
Reporter | ||
Comment 6•6 years ago
|
||
Comment on attachment 9007357 [details]
Bug 1138579 - Support multiple Files patterns in moz.build
Gregory Szorc [:gps] has approved the revision.
Attachment #9007357 -
Flags: review+
Pushed by gszorc@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/08f0bf17514d
Support multiple Files patterns in moz.build r=gps
Comment 8•6 years ago
|
||
Backed out changeset 08f0bf17514d (Bug 1138579) for build bustages in /config/tests/test_mozbuild_reading.py
Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&resultStatus=testfailed,busted,exception&classifiedState=unclassified&revision=08f0bf17514dd763a1c99b5f02cd88628b5f7ebc&selectedJob=199993990
Failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=199993990&repo=autoland&lineNumber=40816
Backout: https://hg.mozilla.org/integration/autoland/rev/d517652362dc57da1c1dd1089d31211254bccc81
Flags: needinfo?(tcampbell)
Assignee | ||
Comment 9•6 years ago
|
||
Comment on attachment 9007357 [details]
Bug 1138579 - Support multiple Files patterns in moz.build
Fix other tests.
try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=1f1d0db67e698acaa32cdfe8fb53f1eb37d76ae7
Flags: needinfo?(tcampbell)
Attachment #9007357 -
Flags: review+ → review?(gps)
Reporter | ||
Comment 10•6 years ago
|
||
Comment on attachment 9007357 [details]
Bug 1138579 - Support multiple Files patterns in moz.build
Gregory Szorc [:gps] has approved the revision.
Attachment #9007357 -
Flags: review+
Assignee | ||
Updated•6 years ago
|
Attachment #9007357 -
Flags: review?(gps)
Comment 11•6 years ago
|
||
Pushed by tcampbell@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/3d2a3eb077ff
Support multiple Files patterns in moz.build r=gps
Comment 12•6 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox64:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
You need to log in
before you can comment on or make changes to this bug.
Description
•