-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Issue Body
Problem Description
I encountered a dependency conflict when trying to use GreenFunc.jl with DFTK.jl on Julia 1.11.6. The issue appears to be that GreenFunc.jl's Project.toml only declares compatibility up to Julia 1.9, which causes package resolution problems with modern Julia packages.
Environment
- Julia version: 1.11.6
- GreenFunc.jl version: 0.2.6 (from GitHub master)
- DFTK.jl version: 0.7.16 (gets downgraded to 0.6.11)
Steps to Reproduce
- Start with a fresh Julia project on Julia 1.11.6
- Add DFTK.jl:
using Pkg
Pkg.add("DFTK") # Successfully installs v0.7.16- Add GreenFunc.jl:
Pkg.add(url="https://github.com/numericalEFT/GreenFunc.jl")- Observe that DFTK.jl is automatically downgraded from v0.7.16 to v0.6.11
The Problem
When both packages are installed together:
- DFTK.jl gets downgraded to v0.6.11 (from v0.7.16)
- DFTK v0.6.11 has a known TimerOutputs.jl compatibility issue that was fixed in v0.7.12
- This results in the error:
ArgumentError: invalid macro usage for @timeit
Root Cause
Looking at GreenFunc.jl's Project.toml:
[compat]
julia = "1.6, 1.7, 1.8, 1.9" # No Julia 1.10 or 1.11 support declared
BrillouinZoneMeshes = "0.2.2" # Fixed to old versionThis causes the package resolver to find an older compatible set of packages, including the problematic DFTK v0.6.11.
Inconsistency Noticed
Interestingly, the GreenFunc.jl documentation states it was "generated with Julia version 1.11.2" (as of January 6, 2025), but the Project.toml doesn't declare compatibility with Julia 1.10+.
Suggested Solution
Update Project.toml to:
[compat]
julia = "1.6, 1.7, 1.8, 1.9, 1.10, 1.11"
BrillouinZoneMeshes = "0.2" # Allow newer versionsWorkaround
For now, users need to maintain separate environments:
# Environment for DFTK
mkdir dftk_project && cd dftk_project
julia --project=. -e 'using Pkg; Pkg.add("DFTK")'
# Separate environment for GreenFunc
mkdir greenfunc_project && cd greenfunc_project
julia --project=. -e 'using Pkg; Pkg.add(url="https://github.com/numericalEFT/GreenFunc.jl")'Impact
This prevents users on modern Julia versions (1.10+) from using GreenFunc.jl together with other packages in the Julia ecosystem, particularly DFTK.jl which is commonly used for DFT calculations.
Would it be possible to update the compatibility declarations and test with Julia 1.10 and 1.11?
Thank you for your work on this package!