-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Package p5scm.0.5.0 #28700
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
Package p5scm.0.5.0 #28700
Conversation
Some of the errors are because of dependencies both cyclical and otherwise. The errors on FreeBSD are due to the following code:
I'm not sure how to make this more portable. It should return 4.12.X, 5.3.X, 5.4.X etc. however on FreeBSD it returns 5.4.0X which causes the failure. I don't have a machine running FreeBSD to test. |
we can make it unavailable on freebsd, or merge as is, maybe some interested user can suggest a fix in a future PR |
It does also fail on the alpha/beta/rc compilers with the same issue:
|
The call to |
The failure that I pasted above is on linux. It is for pre-release compilers, e.g. |
FreeBSD failure is different:
I am fine to merge it as is, I just wanted to point out that the trailing character issue is from debian when using release candidate versions of the compiler. |
I have tested this on Debian with the current 5.4.0 release and it works fine. I'm just guessing as to what is causing the error. In theory it should work but there has to be a hidden escape or something. Have no idea how to fix it as I can't replicate it. The code pasted above is the same code that is in version 0.4.0 currently on opam. |
With any kind of release candidate, alpha, or beta the version string becomes longer than 5 chars, hits the first branch, and thus fails. It is easy to reproduce, here on Linux with $ opam switch 5.4.0~alpha1
$ ocaml
OCaml version 5.4.0~alpha1
Enter #help;; for help.
[...]
# Stdlib.Sys.ocaml_version;;
- : string = "5.4.0~alpha1"
# let get_version () =
let vers = Stdlib.Sys.ocaml_version in
if (String.length vers) > 5 then
let vers0 = (String.sub vers 0 5) ^ "X" in
Printf.printf "%s\n" vers0; flush stdout
else
let vers0 = (String.sub vers 0 4) ^ "X" in
Printf.printf "%s\n" vers0; flush stdout;;
val get_version : unit -> unit = <fun>
# get_version ();;
5.4.0X
- : unit = () |
Thanks Jan. I can fix this by searching for the second decimal. How best to handle this for you guys? Do I just close this request, fix and make a new one? Definitely not a git expert so that would be a route I could handle. Thanks. |
Some folks close, roll a fix, bump the version number, and roll a new release PR with the next version. Others fix in the release branch, update the git version tag, and rerun As both approaches are accepted, I think it boils down to how hard one sticks to a git version tag... 🤷 |
Here is the new more robust version. Not sure if this will fix the FreeBSD fails. let get_version () =
let vers = Stdlib.Sys.ocaml_version in
let indx = String.index_from vers 2 '.' in
let vers0 = (String.sub vers 0 (indx+1)) ^ "X" in
Printf.printf "%s\n" vers0; flush stdout
let _ = get_version () |
Thanks Jan. I'll update my tag and |
56cf4f0
to
83404e2
Compare
The FreeBSD error messages are now different and seem to be |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is now down to just opam-2.0, FreeBSD, and Windows failures.
Thanks |
p5scm.0.5.0
Scheme via camlp5
This a simple scheme implementation using pa_schemer from camlp5
🐫 Pull-request generated by opam-publish v2.7.0