The default bug view has changed. See this FAQ.

Remove ISO8601DateUtils.jsm

REOPENED
Unassigned

Status

()

Core
XPConnect
--
trivial
REOPENED
7 years ago
3 days ago

People

(Reporter: O. Atsushi (Torisugari), Unassigned)

Tracking

(Depends on: 1 bug, {addon-compat, dev-doc-needed})

Trunk
mozilla8
addon-compat, dev-doc-needed
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [qa-])

Attachments

(1 attachment, 2 obsolete attachments)

(Reporter)

Description

7 years ago
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
(Reporter)

Comment 1

7 years ago
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
Created attachment 497207 [details] [diff] [review]
rm

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
Created attachment 497208 [details] [diff] [review]
really rm

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)
Created attachment 551369 [details] [diff] [review]
unrotted

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)

Updated

6 years ago
Attachment #551369 - Flags: review?(gal) → review+

Comment 6

6 years ago
Are we sure this isn't going to break Thunderbird? And we might want to add a relnote.
Whiteboard: [needs review]

Updated

6 years ago
Keywords: relnote

Comment 7

6 years ago
Actually, instead we should just make sure we post to the addon community. Looks like really nobody is using this.
Keywords: relnote
Keywords: dev-doc-needed
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
Last Resolved: 6 years ago
Resolution: --- → FIXED
Whiteboard: [inbound]

Updated

6 years ago
Keywords: dev-doc-needed → dev-doc-complete
(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

Comment 12

6 years ago
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.

Comment 15

6 years ago
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.
(Reporter)

Comment 16

6 years ago
(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?

Comment 17

6 years ago
Already did
(Reporter)

Comment 18

6 years ago
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

Comment 19

6 years ago
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 → ---

Comment 20

6 years ago
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.

Updated

6 years ago
Keywords: addon-compat
Filed bug 695345.
Status: REOPENED → RESOLVED
Last Resolved: 6 years ago6 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.
Keywords: dev-doc-complete → dev-doc-needed
Depends on: 1351079
You need to log in before you can comment on or make changes to this bug.