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

doesn't work with .gitconfig #8

Closed
samoht opened this issue Dec 4, 2014 · 8 comments
Closed

doesn't work with .gitconfig #8

samoht opened this issue Dec 4, 2014 · 8 comments

Comments

@samoht
Copy link

samoht commented Dec 4, 2014

Is that expected?

$ ledit ocaml
        OCaml version 4.01.0
# #require "toml";;
# let t = Toml.from_filename "/Users/thomas/.gitconfig";;
Exception: TomlParser.Error.

$ cat /Users/thomas/.gitconfig
[color]
    ui = true
[user]
    name = Thomas Gazagnaire
    email = thomas@gazagnaire.org
[push]
    default = simple
[core]
    editor = emacs
@samoht
Copy link
Author

samoht commented Dec 4, 2014

(I'm using the version in opam: 1.0.0)

mackwic pushed a commit that referenced this issue Dec 4, 2014
@mackwic
Copy link
Member

mackwic commented Dec 4, 2014

Hi @samoht and thanks for using To.ml.

You are right, your gitconfig is compliant with the Toml language, so it's a bug on the 1.0 parser.

As we are about to publish a complete rewrite of the parser, I have to ask you if you can upgrade to the last OCaml version or if we have to maintain a backward-compatible 1.0.

In the first case, that is: you can upgrade as you will and have no legacy, I will close this issue as it happens on old code.
In the latter case, the fix might take a little while to be published but I'm ok to do the effort.

@samoht
Copy link
Author

samoht commented Dec 4, 2014

Sure, feel free to change the API, I'm not using To.ml in any of my projects (yet). Thanks for the library though, it looks quite useful!

@samoht
Copy link
Author

samoht commented Dec 4, 2014

The git version doesn't compile with OCaml 4.01: would be nice if it could!

@mackwic
Copy link
Member

mackwic commented Dec 4, 2014

It depend of our policy, and for now I'm not sure. For one, we can say that minor versions increment shouldn't break the compilation, but we can also take a more politic view, encourage Opam, and force the dependency on 4.02 because the OCaml world need to move on and managing versions with opam is really dumb easy.

It's really just politic at this point, and as @sagotch is the main craftsman of the 2.0, I need his opinion on this topic.

@samoht
Copy link
Author

samoht commented Dec 4, 2014

My point is that then you can't use To.ml in projects that works on 4.01 only (for instance mirage). I can understand that some of the 4.02 features are neat to use, but To.ml is a (relatively) simple and (potentially) very useful library which, if made portable, could be used pervasively.

@mackwic
Copy link
Member

mackwic commented Dec 4, 2014

I agree, and the Mirage example is a strong point in favor of being 4.01-compatible.

My point is, @sagotch could have reasons to make To.ml depend on 4.02, and I wait for his input before taking any decision.

@mackwic
Copy link
Member

mackwic commented Dec 4, 2014

discussion on this topic moved to #9 .
I close this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants