Skip to content
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

Calling --help raises an exception in the CLI #103

Closed
avsm opened this issue Dec 22, 2014 · 2 comments
Closed

Calling --help raises an exception in the CLI #103

avsm opened this issue Dec 22, 2014 · 2 comments
Labels
type/bug Related to a bug
Milestone

Comments

@avsm
Copy link
Member

avsm commented Dec 22, 2014

$ OCAMLRUNPARAM=b irmin init --help
irmin: internal error, uncaught exception:
       Invalid_argument("equal: functional value")
       Raised by primitive operation at file "list.ml", line 155, characters 19-30
       Called from file "camlinternalLazy.ml", line 25, characters 17-27
       Re-raised at file "camlinternalLazy.ml", line 32, characters 10-11
       Called from file "list.ml", line 66, characters 22-25
@dbuenzli
Copy link

This with this is suspicious. You cannot use Cmdliner.Arg.enum with functional values because to print the enum corresponding to the default value in the help it looks up the reverse assoc, so the datums of the assoc lists needs to be comparable. That one should work because you use it with an option that defaults to None. I still think its cleaner to go through a variant for these things. Seems some documentation is lacking in cmdliner. @samoht Could you please fill an issue ?

@samoht
Copy link
Member

samoht commented Dec 22, 2014

Yea, as you see, I haven't tested the command-line that much ... most of the focus was on the new API and the doc. I'll fix that soon (but probably after christmas).

@samoht samoht added the type/bug Related to a bug label Jan 5, 2015
@samoht samoht modified the milestone: 1.0.0 Jan 5, 2015
@samoht samoht closed this as completed in cd85fa4 Jan 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Related to a bug
Projects
None yet
Development

No branches or pull requests

3 participants