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

feature request: allow "available: word-size != 32" #4633

Open
hannesm opened this issue Apr 14, 2021 · 4 comments
Open

feature request: allow "available: word-size != 32" #4633

hannesm opened this issue Apr 14, 2021 · 4 comments

Comments

@hannesm
Copy link
Member

hannesm commented Apr 14, 2021

Some opam packages are only compiling on 64 bit systems (due to using large literals in OCaml code, ...). At the moment, it is cumbersome to figure out what to state in an opam file to define "this does not work on 32 bit systems", since arch != "x86_32" & arch != "arm32" may be sufficient today, but tomorrow when risc-v (or ppc32) is getting traction, it is no longer sufficient.

In OCaml, Sys.word_size is very useful and available. It would be nice to have this functionality in opam as well -- it should be easy to implement, and straightforward to expose it in the opam file. This would be a welcome change in the soon future (maybe even in 2.1?).

Thanks for reading.

@kit-ty-kate kit-ty-kate added this to To do in Feature Wish via automation Apr 14, 2021
@kit-ty-kate
Copy link
Member

I like this feature request very much, it would help opam-repository tremendously. opam 2.1 is expected to have its rc1 released very very soon so if it is accepted it would most likely be in opam 2.2.

@avsm
Copy link
Member

avsm commented Apr 14, 2021

This is a good one to put on the opam 2.2+ wishlist (definitely not opam 2.1, which is on the verge of release).

@dra27 dra27 removed this from To do in Feature Wish Jul 2, 2021
@dra27 dra27 added this to To do in Opam 2.2.0 via automation Jul 2, 2021
@dra27 dra27 moved this from To do to opam file updates in Opam 2.2.0 Jul 15, 2021
@AltGr
Copy link
Member

AltGr commented Jan 4, 2022

Note: implementing an additional variable word-size for this would be straight-forward. A little more work, of course, to think about backwards compatibility and maybe lint arch != "x86_32" & arch != "arm32" to advise a replacement.

@hannesm
Copy link
Member Author

hannesm commented Jan 4, 2022

Maybe related is "big-endian" / "little-endian", so an opam package can specify which platforms it expects to work on with future compatibility (obviously, some packages would still need to {allow,deny} specific architectures).

@dra27 dra27 moved this from To do: opam file updates to Bump to 2.3? in Opam 2.2.0 Jan 13, 2022
@dra27 dra27 removed this from Bump to 2.3? in Opam 2.2.0 May 17, 2022
@dra27 dra27 added this to To do in Opam 2.3 via automation May 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Opam 2.3
  
To do
Development

No branches or pull requests

4 participants