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

why is arch-x86_32/arch-x86_64 marked with flags: compiler? also msys2* and system-mingw/system-msvc #27080

Open
hannesm opened this issue Dec 12, 2024 · 6 comments
Assignees

Comments

@hannesm
Copy link
Member

hannesm commented Dec 12, 2024

//cc @dra27 @kit-ty-kate -- related to dra27#21

@dra27
Copy link
Member

dra27 commented Dec 13, 2024

opam 2.0 complains if you specify base packages which aren’t flagged compiler. It became less relevant in opam 2.1 and IIRC in opam 2.2 we got rid of all remaining interpretations of the compiler flag in opam itself

@dra27
Copy link
Member

dra27 commented Dec 13, 2024

Oops - a pre-caffeinated answer. The removal I was referring to is mentions of base packages, not the interpretation of the compiler flag itself. The answer for why thoe msys2, arch- and system- packages are flagged compiler is opam 2.0 base package-related. For the issue in dra27#21, the issue is that opam uses the compiler to infer the switch invariant.

@hannesm
Copy link
Member Author

hannesm commented Dec 13, 2024

Thanks for your reply @dra27 - I still not fully understand that, but if it is needed for opam 2.0, then let's leave it as is.

@hannesm hannesm closed this as completed Dec 13, 2024
@hannesm
Copy link
Member Author

hannesm commented Dec 13, 2024

FWIW, this pollutes the opam switch list-available quite a bit:

# Listing available compilers from repositories: default
# Name                                 # Version                              # Synopsis
msys2-clang32                          1                                      MSYS2 CLANG32 Environment
msys2-clang64                          1                                      MSYS2 CLANG64 Environment
msys2-clangarm64                       1                                      MSYS2 CLANGARM64 Environment
msys2-mingw32                          1                                      MSYS2 MINGW32 Environment
msys2-mingw64                          1                                      MSYS2 MINGW64 Environment
msys2-ucrt64                           1                                      MSYS2 UCRT64 Environment
ocaml-option-afl                       1                                      Set OCaml to be compiled with afl-fuzz instrumentation
...

@kit-ty-kate
Copy link
Member

Since those packages are windows related and opam 2.0 doesn't support windows it feels unnecessary to have that flag for those packages

@kit-ty-kate kit-ty-kate reopened this Dec 13, 2024
@dra27
Copy link
Member

dra27 commented Dec 16, 2024

Cross-referencing #17541 which confirms I had remembered correctly! I agree with @kit-ty-kate, though, for the Windows-specific msys2- ones. I'll try to get a PR done for it (the slow part is getting round to testing it...!)

@dra27 dra27 self-assigned this Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants