Closed Bug 695233 Opened 14 years ago Closed 13 years ago

Flag the use of Components in Jetpack addons since it's being deprecated.

Categories

(addons.mozilla.org Graveyard :: Add-on Validation, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED FIXED
2012-09-27

People

(Reporter: robhudson, Assigned: basta)

References

Details

Re: https://bugzilla.mozilla.org/show_bug.cgi?id=663541 It was originally agreed upon that checking for this in amo-validator would be good, but after reading the referenced bug closely I'm not sure. We'd have to be able to detect the difference between use of Components if they haven't used require("chrome") vs if they have. For example: // OK, and recommended to make transition easier var {Components} = require("chrome"); Components.classes...; // <- don't warn // Not OK, Components will go away soon Components.classes...; // <- do warn
My suggestion is to mark Components as a dangerous global in all Jetpack add-ons. Since it's deprecated, it should be a warning, like the "dangerous" flag produces.
We're also warning whenever require("chrome") is present. Is the problem that 2 warnings will show up? I'm not too concerned about that.
The problem I was seeing was that it would be difficult to do it "right". But we can flag the use of Components to throw a warning and the developer can at least be notified of its deprecation and know for themselves if they've used `var {Components} = require("chrome");` they can safely ignore the warnings.
No longer blocks: 691968
This requires that we differentiate between used and overridden globals, which is what's going to happen with bug 724997.
Depends on: 724997
Assignee: nobody → mattbasta
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2012-09-27
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.