-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not_found exception thrown in Camomile/internal/database.ml #44
Comments
I can see in the code where it's thrown, but not why. |
Looking at it a bit more, I see this is some kind of configuration/installation problem:
Damn, I wish people wouldn't use jbuilder ... |
OK I fixed it by dereferencing the symlinks instead of copying them. Could we improve the error here? If the database files don't exist it shouldn't throw |
Note that some code paths rely on actually catching this |
Ok, I see four problems:
|
Yoriyuki Yamagata <[email protected]> writes:
1. Make error messages more informative. (we can arbitrary define exceptions but if there is a standard way then it's better)
One thing to keep in mind here is whether this exception should be
catchable by the user. If we don't expect the user to catch this error,
which is what seems to be the case here. Then a Not_found is definitely
not adequate and a failwith with a good error message will do. A
specialized exception is also good of course in either case of course.
3. jbuilder symlinks not copies the data files. Data files are just marshalled data, so it could be potentially dangerous.
I wonder if this is an issue with opam-installer. Jbuilder will indeed
prefer symlinking to copying in its own internal build directories, but
here the installed path itself is a symlink:
/usr/share/camomile/database/general_category.mar
Shouldn't opam-installer resolve these symlinks before copying?
|
What was happening is that we don't have opam-installer and jbuilder can't install without it, so I was just copying the symlinks, but didn't use However there is still a problem with camomile:
If that |
ocaml-gettext uses camomile. However the latest version of Camomile doesn't work - a
Not_found
exception gets thrown deep inside camomile.An easy reproduce in ocaml-gettext is to simply run:
The text was updated successfully, but these errors were encountered: