Exception handling with odd zoneinfo

7 views
Skip to first unread message

Malcolm Matalka

unread,
Jun 16, 2014, 1:58:18 PM6/16/14
to ocaml...@googlegroups.com
I am using async and have an error in my code but unfortunately the
actual error is being hidden because the handler is blowing up. I am
running NixOS which puts zoneinfo in a funny spot. The error is below.

Any suggestions?

Uncaught exception:
(Sys_error "/usr/share/zoneinfo/: No such file or directory")
Raised by primitive operation at file "lib/zone.ml", line 402,
characters 26-41
Called from file "lib/zone.ml", line 447, characters 10-64
Called from file "lib/with_return.ml", line 18, characters 12-24
Re-raised at file "lib/with_return.ml", line 25, characters 17-20
Called from file "lib/zone.ml", line 616, characters 16-60
Called from file "lib/time0.ml", line 225, characters 35-55
Called from file "lib/time0.ml", line 423, characters 27-54
Called from file "lib/debug.ml", line 8, characters 19-82
Called from file "lib/raw_scheduler.ml", line 715, characters 4-82
Called from file "lib/command.ml", line 1412, characters 6-46
Called from file "lib/exn.ml", line 69, characters 6-10

Yaron Minsky

unread,
Jun 16, 2014, 2:26:02 PM6/16/14
to ocaml...@googlegroups.com
Well, it seems like we should probably aim to fix zone.ml, no? Where
is it located on nixos? Perhaps we need to support a list of possible
locations, or an architecture specific hack, I'm not sure.

y
> --
> You received this message because you are subscribed to the Google Groups "ocaml-core" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to ocaml-core+...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Malcolm Matalka

unread,
Jun 16, 2014, 2:35:45 PM6/16/14
to ocaml...@googlegroups.com
Hah, well, in NixOS that's an interesting question. Right now it's in:

/nix/store/8s0qcpaci6fychmpv4yjijs8ns5nxwkp-tzdata-2014b/share/zoneinfo

But in a new build of tzdata it will change.

My suggestion is to drop to UTC if any zone information cannot be found.

Also, is there a mechanism for injecting the zone location in? Perhaps
putting it into an env variable?

Yaron Minsky

unread,
Jun 16, 2014, 2:43:50 PM6/16/14
to ocaml...@googlegroups.com
The environment variable doesn't seem crazy. I have no objection.
You could propose a way of doing it with a pull request, and we can
look at it from there.

y

Malcolm Matalka

unread,
Jun 16, 2014, 2:49:12 PM6/16/14
to ocaml...@googlegroups.com
Sounds good! Thanks.
Reply all
Reply to author
Forward
0 new messages