Closed Bug 1371298 Opened 2 years ago Closed 2 years ago

Prefs loader for addon/webpack stops processing instructions after a #if

Categories

(DevTools :: General, enhancement, P3)

enhancement

Tracking

(firefox55 fixed)

RESOLVED FIXED
Firefox 55
Tracking Status
firefox55 --- fixed

People

(Reporter: jdescottes, Assigned: jdescottes)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

No description provided.
The main issue I want to fix here is that when we encounter a #if statement in a pref file, we never flip back the "ignoring" bool to false.

I think we have the issue both in the original prefs-loader for webpack and in the copy I made for the devtools addon.

> #if SOMETHING_TRUE     -> sets ignoring to false
> pref(key, value)       -> ignoring still false, line is valid and pushed
> #else SOMETHING FALSE  -> sets ignoring to true
> pref(key2, value2)     -> ignoring still true, line is valid, but skipped (correct)
> #endif                 -> ignoring still true
> pref(key3, value#)     -> ignoring still true, line is valid, but skipped (incorrect)

I think we should simply flip back the bool when we find the #endif?
Blocks: 1369801
Comment on attachment 8875753 [details]
Bug 1371298 - stop ignoring prefs after #endif in webpack/addon devtools prefs loaders;

https://reviewboard.mozilla.org/r/147174/#review151368

Thanks for the patch.
And, I'm crying a bit now.
Attachment #8875753 - Flags: review?(ttromey) → review+
Comment on attachment 8875754 [details]
Bug 1371298 - support sticky_prefs in devtools addon prefs loader;

https://reviewboard.mozilla.org/r/147176/#review151398
Attachment #8875754 - Flags: review?(bgrinstead) → review+
Comment on attachment 8875755 [details]
Bug 1371298 - trim values extracted from pref files in devtools addon prefs loader;

https://reviewboard.mozilla.org/r/147178/#review151400
Attachment #8875755 - Flags: review?(bgrinstead) → review+
Pushed by jdescottes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5b3aef6c71b7
stop ignoring prefs after #endif in webpack/addon devtools prefs loaders;r=tromey
https://hg.mozilla.org/integration/autoland/rev/b418659052d2
support sticky_prefs in devtools addon prefs loader;r=bgrins
https://hg.mozilla.org/integration/autoland/rev/a494916f461a
trim values extracted from pref files in devtools addon prefs loader;r=bgrins
https://hg.mozilla.org/mozilla-central/rev/5b3aef6c71b7
https://hg.mozilla.org/mozilla-central/rev/b418659052d2
https://hg.mozilla.org/mozilla-central/rev/a494916f461a
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 55
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.