Closed Bug 543535 Opened 14 years ago Closed 7 years ago

Remove ISO8601DateUtils.jsm

Categories

(Core :: XPConnect, defect)

defect
Not set
trivial

Tracking

()

RESOLVED FIXED
mozilla58
Tracking Status
firefox58 --- fixed

People

(Reporter: torisugari, Assigned: dao)

References

(Blocks 1 open bug)

Details

(Whiteboard: [qa-])

Attachments

(1 file, 3 obsolete files)

Thanks to bug 430930, now JavaScript Date() can handle ISO-8601. So the browser doesn't need such a library any longer.

http://mxr.mozilla.org/mozilla-central/source/js/src/xpconnect/loader/ISO8601DateUtils.jsm
Assignee: nobody → general
Component: RSS Discovery and Preview → JavaScript Engine
Product: Firefox → Core
QA Contact: rss.preview → general
I looked into a tree a little, and result:

1. Firefox uses it only within RSS Feed Reader.

1.2. Microformats does not use it, but it has its own ISO8601 bits. Probably this bug won't cover that, but someone some time should fix it (bug 419433 for more details.)

2. Thunderbird also uses it.
http://mxr.mozilla.org/comm-central/source/mailnews/extensions/newsblog/content/utils.js#49

3. Others in Gecko family, such as Flock, may be using it.

4. Extension authors? In my opinion, all what this bug can do for them is to remove ISO8601DateUtils.jsm ASAP or mark it as "deprecated" in dev.m.o
https://developer.mozilla.org/en/JavaScript_code_modules/ISO8601DateUtils.jsm
Depends on: 618714
Depends on: 618726
Attached patch rm (obsolete) — Splinter Review
Too late for 2.0, but I'm pretty confident the patch will elude bitrot until we have a trunk again.
Assignee: general → philringnalda
Status: NEW → ASSIGNED
Attachment #497207 - Flags: review?(sayrer)
Target Milestone: --- → Future
Version: unspecified → Trunk
Attached patch really rm (obsolete) — Splinter Review
Oops, forgot the part that will bitrot, switching from only removing it ifdef omnijar to always removing it on update/paveover.
Attachment #497207 - Attachment is obsolete: true
Attachment #497208 - Flags: review?(sayrer)
Attachment #497207 - Flags: review?(sayrer)
Whiteboard: [needs branch][needs dependencies][needs review]
Whiteboard: [needs branch][needs dependencies][needs review] → [needs dependencies][needs review]
Whiteboard: [needs dependencies][needs review] → [needs review]
Target Milestone: Future → ---
Component: JavaScript Engine → XPConnect
QA Contact: general → xpconnect
Comment on attachment 497208 [details] [diff] [review]
really rm

In-tree callers are all gone, the only possible even vaguely reasonable consumers would be extensions using the completely untested (and never used in-tree) create(), in which case they can just copy it into their code, and write their own tests for it, since we certainly have no idea whether or not it actually works.
Attachment #497208 - Flags: review?(sayrer) → review?(gal)
Attached patch unrotted (obsolete) — Splinter Review
Oh, yeah, guess that rotted a bit over the last eight months.
Attachment #497208 - Attachment is obsolete: true
Attachment #551369 - Flags: review?(gal)
Attachment #497208 - Flags: review?(gal)
Attachment #551369 - Flags: review?(gal) → review+
Are we sure this isn't going to break Thunderbird? And we might want to add a relnote.
Whiteboard: [needs review]
Keywords: relnote
Actually, instead we should just make sure we post to the addon community. Looks like really nobody is using this.
Keywords: relnote
The (outdated) add-ons MXR shows 9 hits on AMO. I'll add it to the checks to include the compatibility bump.

I assume this is targeted for Firefox 8?
It is indeed - I just danced around for an hour about whether I should sit on it for ten days and aim it at 9, but it's such a simple change (if you were using parse, just use the JS Date object, if you were using create... I bet you weren't) that I decided we might as well just do it.

http://hg.mozilla.org/integration/mozilla-inbound/rev/5022587c841f
Whiteboard: [inbound]
Target Milestone: --- → mozilla8
http://hg.mozilla.org/mozilla-central/rev/5022587c841f
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Whiteboard: [inbound]
(In reply to Phil Ringnalda (:philor) from comment #9)
> if you were using create... I bet you weren't

Oh, hello, Date.toISOString().
Depends on: 693077
Don't EVER remove APIs like that. There was no need to remove this.
ISO dates must be supported. While Date.parse() now supports ISO dates, which is good, there is no standard function to output an ISO date. I need that in pretty much every project, and I don't want to copy&paste that function everywhere.

Removing such basic APIs without replacement is NOT ACCEPTABLE.
Oh no, you're right! I probably should have said something about the existence of Date.toISOString() in comment 11!
Oh, and one more thing: DON'T EVER YELL AT ME ABOUT WHAT TO DO WHEN YOU HAVEN'T EVEN LOOKED AT WHAT YOU ARE TALKING ABOUT, HAVEN'T LOOKED AT THE REPLACEMENT, HAVEN'T FIXED BUGS IN WHAT YOU ARE TALKING ABOUT, AND HAVEN'T WRITTEN TESTS FOR IT TO BE SURE IT EVEN WORKS.
I looked at <https://developer.mozilla.org/en/Firefox_8_for_developers#ISO8601DateUtils.jsm>, and it doesn't mention toISOString(). It's good that toISOString() is there.

I didn't yell, I used caps for strong emphasis. You yelled. Breaking APIs is no-go, and I want to get that very clear to everybody responsible for breaking APIs.
(In reply to Ben Bucksch (:BenB) from comment #15)
> I looked at
> <https://developer.mozilla.org/en/Firefox_8_for_developers#ISO8601DateUtils.
> jsm>, and it doesn't mention toISOString(). It's good that toISOString() is
> there.

Then, could you update the dev doc?
Already did
My bad English writing, by dev-doc I meant
https://developer.mozilla.org/en/JavaScript_code_modules/ISO8601DateUtils.jsm

Anyway -> v.
Many thanks to philor and other guys.
Status: RESOLVED → VERIFIED
While it is possible to fix extensions by using the new function, modulo the timezone problem, it remains work for extension authors, which would be unnecessary if there was a compat shim that just used the new Date() functions. Those extensions that have not been updated, because the author is not aware, on vacation, whatever, *** will break FF8 entirely ***. On our extension, not even the Firefox Addon page worked anymore, FF was totally broken by the extension, merely due to this lacking import. This is a too high cost. Shipping a 6-line .jsm file is a minor cost in comparison.

Thus, REOPEN, to keep the file, but as a compat shim.
Status: VERIFIED → REOPENED
Resolution: FIXED → ---
reassign to gal.
Assignee: philringnalda → gal
in addons mxr I can find _seven_ add-ons using this old module, maybe it's worth to keep a shim (I don't think so though) but that should be done in a separate regression bug, no point in reopening a bug to do something completely different from its original purpose, neither changing assignee of a fixed bug. That is just going to create confusion.
Keywords: addon-compat
Filed bug 695345.
Status: REOPENED → RESOLVED
Closed: 13 years ago13 years ago
Resolution: --- → FIXED
Assignee: gal → philringnalda
qa- as nothing to do for QA. Please set to qa+ if there is something QA can do to verify this fix.
Whiteboard: [qa-]
[Triage Comment]
I've just requested a backout of the removal in bug 695345. We think it's best to add a deprecation warning (in the console) here that would be in a released version for at least 2 releases. Once we've moved past those two releases, we can then move ahead with the removal.

If anybody is interested in speeding up the process, we could uplift the deprecation warning to FF10 (aurora). Please nominate if that's desired.
Assignee: philringnalda → nobody
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Are we really adding all of this complication for 7 add-ons? While I'm not saying they are not important and I understand the will to not break unless needed, we take a lot of changes that break a far large number of add-ons on a weekly base, and we just notify them on upgrade blogposts, on newsgroups and I suppose we may even notify specific add-ons maintainers. Why is this case so different from the usual?
I think at this point the deprecation warning should absolutely be at least in Aurora.
That only covers add-ons on AMO. I was informed about some heavily-used add-ons hosted elsewhere that were going to break because of this, which prompted the reversal and all the extra work. While those add-ons should be fixed by now, I think the deprecation period may still be worthwhile.
(In reply to Jorge Villalobos [:jorgev] from comment #26)
> That only covers add-ons on AMO. I was informed about some heavily-used
> add-ons hosted elsewhere that were going to break because of this, which
> prompted the reversal and all the extra work.

Ok, thank you for the clarification, I was not aware of this.
Docs no longer say that ISO8601DateUtils.jsm is gone. If so, docs update is needed.
Depends on: 1351079
Assignee: nobody → dao+bmo
Status: REOPENED → ASSIGNED
Attachment #551369 - Attachment is obsolete: true
No longer depends on: 1351079
Target Milestone: mozilla8 → mozilla58
Comment on attachment 8915078 [details]
Bug 543535 - Remove ISO8601DateUtils.jsm.

https://reviewboard.mozilla.org/r/186336/#review191390

Thanks!
Attachment #8915078 - Flags: review?(mak77) → review+
https://hg.mozilla.org/mozilla-central/rev/24427f9a00ca
Status: ASSIGNED → RESOLVED
Closed: 13 years ago7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: