Closed Bug 677982 (jsical) Opened 8 years ago Closed 6 years ago

Investigate replacing libical with a js implementation

Categories

(Calendar :: Internal Components, defect)

defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: Fallen, Assigned: Fallen)

References

(Blocks 3 open bugs)

Details

(Keywords: meta)

Attachments

(2 obsolete files)

This is somewhat contrary to bug 577777, but on the other hand its far more into the future.

I've been working on a js only parser for rfc5545 that outputs a javascript object. We could use the objects created here directly as a backend to our calendar object implementations and possibly be as fast/faster than using js-ctypes.

As soon as I have this in semi-working state I'll upload it to my user repository.

It should also be noted that this parser can rewrite the json data in the new xcal format in rfc6321. When its done (oh I wish I had more time), this could be of great use for users of the internets.
Hi Philipp,

maybe a look at http://gitorious.org/jqcaldav/jqcaldav/blobs/master/ical.js might be interesting ...
Attached file ical.js current state (obsolete) β€”
Current state of my parser, not very much cleaned up.
Attached file Unit tests current state (obsolete) β€”
Alias: jsical
Blocks: 327992
Blocks: 353369
It would be nice to fix bug 533096 beforehand, so we don't package theme files multiple times.
Depends on: 533096
Blocks: 722635
Blocks: 397559
Depends on: 785659
Depends on: 788267
The Mozilla B2G / Gaia project is working on a calendar application too, including e.g. a JS iCalendar parser: https://github.com/mozilla-b2g/gaia/blob/master/apps/calendar/js/ext/ical.js
Indeed, that is the parser I have been working on, James is helping me extend on it and is using it with b2g.

The unforked repo is here: https://github.com/kewisch/ical.js/
Depends on: 868721
Depends on: 868737
Depends on: 868739
Depends on: 868740
Depends on: 868815
Depends on: 869405
Depends on: 869407
Patch apply order is:

bug-868815-loadingNSGetFactory.diff
bug-868721-xpcu.diff
bug-868737-dual-wield.diff
bug-868739-wcap-forwards.diff
bug-868740-lightning-icaljs-dual.diff
bug-869405-add-interface-methods.diff
bug-869407-01-icaljs-wrapper.diff
bug-869407-02-icaljs-split-datetime.diff
bug-869407-03-icaljs-timezoneservice.diff
bug-869407-04-icaljs-tests.diff
Note that the wrapper code does contain some rough edges, for example referenced timezones are not added to the top level components.

Nevertheless, I'd like to get this in before the next ESR to allow for more testing, being able to tell users they can try out the new library instantly.

My plan is to leave the default at libical for the ESR release and then fully remove support for libical in TB25. This gives us enough time until the next ESR to fix any further regressions.

One further thing I might give a shot is a dialog that pops up if instanciating calDateTime throws an error, suggesting to the user to either download the Lightning package corresponding to his or her OS or try the "experimental cross platform support".
Attachment #573017 - Attachment is obsolete: true
Attachment #573018 - Attachment is obsolete: true
Depends on: 871199
Depends on: 871211
As this has turned into a meta bug, I'm marking it fixed.

For further issues, I've filed bug 871248 to create a new component for the ical wrapper layer. As soon as things have stabilized and maybe libical is gone we can fold this component with "Internal Components" again.
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Keywords: meta
Resolution: --- → FIXED
Target Milestone: --- → 2.5
You need to log in before you can comment on or make changes to this bug.