Closed Bug 837803 Opened 12 years ago Closed 12 years ago

Proper dependencies for FHR's preprocessed files

Categories

(Firefox Health Report Graveyard :: Client: Desktop, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 21

People

(Reporter: gps, Assigned: gps)

References

Details

(Whiteboard: [qa-])

Attachments

(2 files, 3 obsolete files)

Use of the preprocessor to concatenate JSMs doesn't honour proper dependencies. In this bug, I'll provide a quick hacky solution until bug 837792 is in place or until we unhack JSMs in bug 836285.
I think we had talked about this on IRC many months ago. Patch is trivial. Whitespace is from converting tabs to spaces.
Assignee: nobody → gps
Status: NEW → ASSIGNED
Attachment #709809 - Flags: review?(mh+mozilla)
Patch should be self-explanatory.
Attachment #709810 - Flags: review?(mh+mozilla)
Attachment #709810 - Flags: feedback?(rnewman)
Comment on attachment 709809 [details] [diff] [review] Part 1: Add PREREQS option to PP_TARGETS, v1 Review of attachment 709809 [details] [diff] [review]: ----------------------------------------------------------------- I'm wondering. Do we really need that, when you can add the dependencies in the Makefile.in as a temporary solution until bug 837792. I mean, is that going to be useful for something else?
(In reply to Mike Hommey [:glandium] from comment #3) > I'm wondering. Do we really need that, when you can add the dependencies in > the Makefile.in as a temporary solution until bug 837792. I mean, is that > going to be useful for something else? I could create one-off make rules, sure. I figured the generic solution in rules.mk might be used by someone if e.g. they want to force the preprocessor to run after some other target. I believe the solution in this bug is also the easiest to implement :)
(In reply to Gregory Szorc [:gps] from comment #4) > (In reply to Mike Hommey [:glandium] from comment #3) > > I'm wondering. Do we really need that, when you can add the dependencies in > > the Makefile.in as a temporary solution until bug 837792. I mean, is that > > going to be useful for something else? > > I could create one-off make rules, sure. > > I figured the generic solution in rules.mk might be used by someone if e.g. > they want to force the preprocessor to run after some other target. I > believe the solution in this bug is also the easiest to implement :) $(FINAL_TARGET)/modules/HealthReport.jsm: ../common/async.js ../common/bagheeraclient.js etc. is not very much different.
Alternate patch to parts 1 and 2.
Attachment #709863 - Flags: review?(mh+mozilla)
Personally I find the first approach to be clearer. I know we want to eventually eliminate this concatenation, but I generally favor increasing (documented! efficient!) expressiveness in our toolchain over time rather than accruing special-case workarounds, and it's not entirely clear *when* we'll get "free" compartments and thus be able to eliminate the concatenation. Note that we've taken janky approaches to working around this very same in the past: see http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/Makefile.in#1232 This is definitely a real use case.
Attachment #709810 - Flags: feedback?(rnewman) → feedback+
Comment on attachment 709863 [details] [diff] [review] Explicit rules in Makefile.in, v1 Review of attachment 709863 [details] [diff] [review]: ----------------------------------------------------------------- ::: services/healthreport/Makefile.in @@ +48,5 @@ > include $(topsrcdir)/config/rules.mk > + > +$(FINAL_TARGET)/modules/HealthReport.jsm: $(healthreport_depends) > + $(RM) $@ > + $(PYTHON) $(topsrcdir)/config/Preprocessor.py $(DEFINES) $(ACDEFINES) $(XULPPFLAGS) $< > $@ You don't need to do that. Just keep using PP_TARGETS, and define the dependency only (which needs to be after including rules.mk because FINAL_TARGET is defined in config.mk, iirc)
Attachment #709863 - Flags: review?(mh+mozilla) → review-
Attachment #709809 - Flags: review?(mh+mozilla)
Attachment #709810 - Flags: review?(mh+mozilla)
(In reply to Richard Newman [:rnewman] from comment #7) > Personally I find the first approach to be clearer. > > I know we want to eventually eliminate this concatenation, but I generally > favor increasing (documented! efficient!) expressiveness in our toolchain > over time rather than accruing special-case workarounds, and it's not > entirely clear *when* we'll get "free" compartments and thus be able to > eliminate the concatenation. The fix for the present case is actually bug 837792, and it will have to happen because it's not only a problem for js files. > Note that we've taken janky approaches to working around this very same in > the past: see > > > http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/Makefile. > in#1232 > > This is definitely a real use case. Which will be addressed in bug 837792. We don't need a temporary expressive way to fix the issue.
I forgot you could add make rules without recipes to define extra prerequisites. Oh, make.
Attachment #709809 - Attachment is obsolete: true
Attachment #709810 - Attachment is obsolete: true
Attachment #709863 - Attachment is obsolete: true
Attachment #710235 - Flags: review?(mh+mozilla)
Attachment #710235 - Flags: review?(mh+mozilla) → review+
(In reply to Mike Hommey [:glandium] from comment #9) > Which will be addressed in bug 837792. We don't need a temporary expressive > way to fix the issue. Great, glad to hear it. Sorry I didn't see Comment 3!
Whiteboard: [fixed in services] → [fixed in services][qa-]
Missed a file.
Attachment #710304 - Flags: review?(mh+mozilla)
Attachment #710304 - Flags: review?(mh+mozilla) → review+
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Whiteboard: [fixed in services][qa-] → [qa-]
Target Milestone: --- → mozilla21
Component: Metrics and Firefox Health Report → Client: Desktop
Product: Mozilla Services → Firefox Health Report
Target Milestone: mozilla21 → Firefox 21
Product: Firefox Health Report → Firefox Health Report Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: