JuliaInterop / Clang.jl

C binding generator and Julia interface to libclang
https://juliainterop.github.io/Clang.jl/
MIT License
217 stars 68 forks source link

Fall back to really old version when LLVM.jl not available #475

Open ViralBShah opened 4 months ago

ViralBShah commented 4 months ago

I tried to install on 1.12-dev, and got this. I believe that this is because LLVM.jl is not available, and somehow this leads to fall back to really old version of Clang.jl, which used BinaryProvider.

Is it possible to prevent this from happening?

(@v1.12) pkg> up
    Updating registry at `~/.julia/registries/General.toml`
  No Changes to `~/.julia/environments/v1.12/Project.toml`
  No Changes to `~/.julia/environments/v1.12/Manifest.toml`
Precompiling project...
           ✗ BinaryProvider
           ✗ Clang
  0 dependencies successfully precompiled in 1 seconds. 8 already precompiled.
  2 dependencies errored.
  For a report of the errors see `julia> err`. To retry use `pkg> precompile`

(@v1.12) pkg> st
Status `~/.julia/environments/v1.12/Project.toml`
⌃ [40e3b903] Clang v0.9.2
Info Packages marked with ⌃ have new versions available and may be upgradable.
Gnimuc commented 4 months ago

I think we need to change https://github.com/JuliaRegistries/General/blob/313a1d3d845ec30060f01ee3209b2955df70889b/C/Clang/Compat.toml#L1-L8

not sure whether there is a caveat of doing this.

cc @giordano

giordano commented 4 months ago

Fixing compat bounds because things are broken is fine with me. I presume you specifically want to https://github.com/JuliaRegistries/General/blob/313a1d3d845ec30060f01ee3209b2955df70889b/C/Clang/Compat.toml#L2 not to allow installing an old version of Clang.jl with incompatible versions of Julia, right?

Gnimuc commented 4 months ago

Yes. Those entries below may also need to be changed.

https://github.com/JuliaRegistries/General/blob/313a1d3d845ec30060f01ee3209b2955df70889b/C/Clang/Compat.toml#L55

I think we can safely cap those versions below Clang-v0.10 to be compatible with Julia up to v1.2.