Hi!
I just joined a research lab and I’m trying to bring a little structure to the project I’m working on: GitHub - corail-research/SeaPearl.jl: Julia hybrid constraint programming solver enhanced by a reinforcement learning driven search. (pretty cool, check it out!). I am trying to create a new version (new release) of the package by calling @JuliaRegistrator register()
in this issue: Latest SeaPearl versions no longer pushed to julia package registry · Issue #264 · corail-research/SeaPearl.jl · GitHub . This creates a PR (New version: SeaPearl v0.4.1 by JuliaRegistrator · Pull Request #71074 · JuliaRegistries/General · GitHub) inside the JuliaRegistries project, but one of the pipelines (New version: SeaPearl v0.4.1 · JuliaRegistries/General@b1720f1 · GitHub) systematically fails… I initially had problems with compat, but managed to fix them. However, I’m still stuck with an error I don’t really understand:
My questions are:
- What is this error and how can I prevent it in the future?
- How can I fix it?
Thanks in advance!!
What version of Julia are you using?
Hi! thanks for taking the time. The project is made to work with julia 1.6 - 1.7
So I limited the version to 1.7 and the pipeline finally passed… I still do not understand how and why, but my problem is solved for now…
1 Like
I encountered the same problem
I heard that upper bounds lower than 2 is prohibitive for automerge nowadays, tried “1.6 - 2” and “1.9 - 2”, both fail the same way.
Any clue to solve this?
My PR: New package: ResourceManagers v0.1.0 by JuliaRegistrator · Pull Request #93009 · JuliaRegistries/General · GitHub
CI is correctly complaining that you cannot claim compatibility with Julia 2.x. It should be 1.6-1
or 1.9-1
.
1 Like
Oops! I followed ChatGPT, wonder why it thinks that way. It gave:
The error you’re encountering suggests that your package’s Project.toml
file has an upper-bounded [compat]
entry for Julia that is too restrictive or incompatible with the Julia package ecosystem guidelines. This is particularly related to how your package specifies compatibility with different versions of Julia itself.
How to Fix This:
-
Open Project.toml
: Open your package’s Project.toml
file.
-
Locate [compat]
section: Find the [compat]
section, where you specify compatibility with other packages and Julia versions.
-
Modify Julia Version Range: In the [compat]
section, make sure you set an appropriate version range for Julia that meets the guideline of including only a finite number of breaking releases. It is often recommended to support the currently active release and the LTS (Long Term Support) release.
Here’s an example to illustrate:
[compat]
julia = "1.6, 1.7" # Wrong: Finite but too restrictive, doesn't allow for future non-breaking releases
julia = "1.6 - 1.7" # Wrong: Finite but too restrictive
julia = "1.6 - 2" # Correct: Includes all future 1.x releases, up to but not including 2.0
In the correct example, "1.6 - 2"
means that your package is compatible with Julia versions starting from 1.6 up to any release before 2.0. This range includes only one breaking release (2.0), and it’s upper-bounded as per the guidelines.
After making the change, commit the Project.toml
file and proceed with the package registration process again.
For additional details, you can refer to the official documentation for compatibility in Julia.
The chat history (produced the very new package ResourceManagers.jl
) in case anyone interested:
https://chat.openai.com/share/12289565-c753-404d-adf8-5eab7269574c
ChatGPT is super cool technology and everything but it’s not an oracle and it confidently asserts both correct answers and pure hallucinations.
Two points for those who find this thread in future web searches:
- The “registry dirty” message in the AutoMerge CI log is maybe not great but expected and normal. Read the PR comment from AutoMerge to find out what the problem is rather than the CI log.
- The PackageCompatUI package knows better than ChatGPT how to write correct Compat entries.
5 Likes