eclipse-archived / ceylon-sdk

Standard platform modules belonging to the Ceylon SDK
http://www.ceylon-lang.org
Apache License 2.0
72 stars 60 forks source link

How to keep up with the latest tz Database changes #275

Open luolong opened 10 years ago

luolong commented 10 years ago

As #78 will implement the time zone support including DST rules as defined in the tz Database, we need to be able to keep up with the changes in the time zone database.

There are few options available that could be considered:

  1. Include the database as a resource of the ceylon.time module.
  2. Download the time zone rules dynamically as needed
  3. Install timezone database with ceylon distribution and add ceylon tool for upgrading the database.

First one will tie the ceylon.time versioning to time zone database updates which is not good.

Second option is simple in that it always keeps the database up to date, but dealing with time calculations should not require network connection.

Third option seems to be the most stable and offer a nice compromise between flexibility and stability, but that will raise ceylon.time module to a special status in Ceylon, unless there is a standardized way for an installed module to contribute tools to a eylon command line....

Any thoughts or comments?

DiegoCoronel commented 10 years ago

I agree with all your comments, but i would like to propose another option: 4 . We could provide a car that has only the database/files, so if anyone would like to work with these Rules they can import this module, this way we can have as updates as necessary to this module.

quintesse commented 10 years ago

ad 1) possible but that means basically that apps never get up-to-date info unless the app itself gets updated. Maybe okay for the first version but we'd definitely want something better.

ad 2) we could combine 1 and 2 where the files would be available on download and get updated dynamically, but I don't trust automatic things too much.

ad 3) like you I don't like the special case either

ad 4) That doesn't seem like a very good solution. First because you'd need to specify a second dependency in your module descriptor for nothing more than have the basic features work. And then to update it you'd need to be sure that each copy in each application gets the new version.

Option 5) might be to have a combination of 1) and 3) , it's part of the module, but can be overridden by a new database that can be installed globally by a special tool.

Or maybe a combination with Diego's option 4) but a module that has to be installed to the system repository so it can be found by every app. But it would need something like "get the latest version" which is something we don't have yet. And on top of that you'd lose the module when switching to a different Ceylon release.

So maybe we need a new "system wide" repository type? One that goes after the USER but before REMOTE. That way all apps would have access to it but installing a new Ceylon release wouldn't affect it (hopefully).

But we'd still need some mechanism to say "gimme the latest version".

luolong commented 10 years ago

Yes, I kind of agree with Tako on this.

Probably a sensible combination of all the options.

Also, we could try to make use of platform database where one is available, but not all of the OS platforms use same database. Or even the same set of time zones for that matter. (Windows has it's own thing for example).

Roland 08.08.2014 1:12 kirjutas kuupäeval "Tako Schotanus" < notifications@github.com>:

ad 1) possible but that means basically that apps never get up-to-date info unless the app itself gets updated. Maybe okay for the first version but we'd definitely want something better.

ad 2) we could combine 1 and 2 where the files would be available on download and get updated dynamically, but I don't trust automatic things to much.

ad 3) like you I don't like the special case either

ad 4) That doesn't seem like a very good solution. First because you'd need to specify a second dependency in your module descriptor for nothing more than have the basic features work. And then to update it you'd need to be sure that each copy in each application gets the new version.

Option 5) might be to have a combination of 1) and 3) , it's part of the module, but can be overridden by a new database that can be installed globally by a special tool.

Or maybe a combination with Diego's option 4) but a module that has to be installed to the system repository so it can be found by every app. But it would need something like "get the latest version" which is something we don't have yet. And on top of that you'd lose the module when switching to a different Ceylon release.

So maybe we need a new "system wide" repository type? One that goes after the USER but before REMOTE. That way all apps would have access to it but installing a new Ceylon release wouldn't affect it (hopefully).

But we'd still need some mechanism to say "gimme the latest version".

— Reply to this email directly or view it on GitHub https://github.com/ceylon/ceylon-sdk/issues/275#issuecomment-51539522.