Closed Bug 1248027 Opened 10 years ago Closed 10 years ago

AppConstants.SOURCE_REVISION_URL switched from `` to `1` for unofficial builds

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(firefox47 fixed)

RESOLVED FIXED
mozilla47
Tracking Status
firefox47 --- fixed

People

(Reporter: MattN, Assigned: mshal)

References

()

Details

(Keywords: regression)

Attachments

(1 file, 1 obsolete file)

The comment says: > // URL to the hg revision this was built from (e.g. > // "https://hg.mozilla.org/mozilla-central/rev/6256ec9113c1") > // On unofficial builds, this is an empty string. but http://hg.mozilla.org/mozilla-central/rev/51029f4d82d3#l14.20 changed it to return `1` via `#define MOZ_SOURCE_URL` which broke https://mxr.mozilla.org/mozilla-central/source/browser/tools/mozscreenshots/head.js?rev=59049fe7a107&mark=29#23
There appears to be a difference between how preprocessor.py and cpp treat '#define FOO' in a source file. preprocessor.py has the value as '1', while cpp is an empty string. (Both preprocessor.py and cpp treat '-DFOO' on the command-line as if it were '-DFOO=1', which is probably why preprocessor.py does this for the #define case as well). I'm testing out a patch that makes preprocessor.py behave more like cpp, which should fix this. But if that causes other problems we should probably just do something like: #ifdef MOZ_SOURCE_URL SOURCE_REVISION_URL: "@MOZ_SOURCE_URL@", #else SOURCE_REVISION_URL: "", #endif
Assignee: nobody → mshal
Attachment #8720010 - Flags: review?(mh+mozilla)
Comment on attachment 8720010 [details] [diff] [review] 0001-Bug-1248027-define-FOO-should-use-an-empty-value-not.patch Review of attachment 8720010 [details] [diff] [review]: ----------------------------------------------------------------- Please add a test for -DFOO on the command line (there are a few tests with command line handling, if you need examples)
Attachment #8720010 - Flags: review?(mh+mozilla) → feedback+
Now with a new test case.
Attachment #8720010 - Attachment is obsolete: true
Attachment #8721024 - Flags: review?(mh+mozilla)
Attachment #8721024 - Flags: review?(mh+mozilla) → review+
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
Version: unspecified → Trunk
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: