-
Notifications
You must be signed in to change notification settings - Fork 370
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
Errors while parsing file on Cygwin #2320
Comments
I have the same problem here on Cygwin64. My opam version is also 1.2.2 |
The same error still exists in 1.3.0-dev (I compiled and installed from master, which is ff0fa0f) I think I located the problem to be the occurrences of %{...}% in OPAM files. It's probably that in-string config substitution is not working well on cygwin. Is there anyway to get more debugging information? |
Thanks for reporting. So for you, nothing to worry about unless you want to install one of these packages ("coq:shell" and "tidy") ; but thanks for reporting, so we can fix it! |
Having colons in names breaks windows IIRC, it should be forbidden. @dra27 can you confirm ? |
Yes - see also ocaml/opam-repository#4673. It would good to have it fixed by policy so that colons are simply prohibited (along with ? < > \ * | ", if those are even presently permitted) - the major PITA is that it prevents checking out of opam-repository on Windows as well! |
@dra27 does it ? The reports above only mention spurious warnings.. |
I don't see warnings there, it seems that the packages with |
I should have said git checking out opam-repository:
Note that that error is fatal - at the moment it is impossible to checkout opam-repository in Git for Windows (I think GitHub Desktop works, but only because it skips those files rather than aborting). It seems easier simply to ban the characters than try to alter OPAM to allow them in names, but somehow avoid them in both the git repository and .opam. The full horror of Windows file naming is very well-summarised in the link @dbuenzli posted, but I don't expect we'd hit the special names in everyday package naming! |
Well, colons work on cygwin though. It seems that cygwin converts colons in filenames to a special character (it seems to be a unicode char in the private use area) in the windows file system. So I don't see that cygwin cannot handle colons well being the problem. The interesting thing is that, by looking at the debugging log, it seems that OPAM is replacing the last colon of the opam file path to slash, thus causing it not able to find the file. Here's some lines from the see here for the full log
and here's how the coq-released repo is structured. |
gasps in horror seeing @dbuenzli's link Well this will be a problem for this coq repository: https://github.com/coq/opam-coq-archive/tree/master/extra-dev/packages -- see http://lists.ocaml.org/pipermail/opam-devel/2014-October/000772.html for the discussion on the other hand, putting this policy in place for opam-repository seems like a good move. I still think we can find a way to fix this on cygwin though: it's probably a Filename.basename or similar that doesn't return the expected part of the path and triggers the issue. |
Note that a possible fix to this would be a change of policy of the name and version fields in opam files - so the directory name would be packages/coq-shell/coq-shell.1/* but opam would contain
(where arguably the version remains optional as the file is rooted in directory |
Windows doesn't support : in file or directory names. See ocaml/opam#2320 (comment)
Windows doesn't support : in filenames. This package has an unusual version numbering scheme - though it's already forced to use a different scheme in its own repository as Mercurial tags can't contain colons either! See ocaml/opam#2320 (comment)
Windows doesn't support : in file or directory names. See ocaml/opam#2320 (comment)
Windows doesn't support : in filenames. This package has an unusual version numbering scheme - though it's already forced to use a different scheme in its own repository as Mercurial tags can't contain colons either! See ocaml/opam#2320 (comment)
xref coq/opam#16 and /cc @clarus. Not very fond of having different |
My thought was whether some of the other restricted characters (in particular |
opam 1.2 accepts package names made of the following characters:
(which is quite permissive; basically, only characters that would clash with the version constraint are forbidden). I think the best move is to choose a more restricted set or characters, and add a lint error -- so that it doesn't cause failures with names not following the new convention right away. |
(also, package names are case-sensitive...) |
My 2 cents:
$ ls packages/ | grep -v -E "^[-+~0123456789ABCDEFGHIJKLMNOPQRSTUVWYXZ_abcdefghijklmnopqrstuvwxyz]+$"
coq:shell It might be nice to disallow I believe these changes would make the namespace as compatible and unambiguous as possible without burdening package creators or repository manipulators with case-equivalence classes or special encoding and decoding to embed names in other identifier syntaxes. |
Agreed - although we need to extend it to the version field as well, as that's also used in the directory name. |
I believe this is fixed in opam 2.2.0 which brought native windows support. If it is not, please do reopen an issue |
I'm using Opam 1.2.2 on Cygwin and I get the following warnings when doing an update:
Is it something to be afraid of? Here is the full listing:
The text was updated successfully, but these errors were encountered: