Skip to content

Commit

Permalink
Add pixi task to update registry (#962)
Browse files Browse the repository at this point in the history
With our current workflow, it can happen that dev A updates the packages
in Manifest.toml, and dev B gets the error:

```
ERROR: Unsatisfiable requirements detected for package X
```

The problem is that dev B's local registry is outdated, so it is not
aware of the new versions of X that are being used. This adds a task to
update the registry, and runs it by default when building or installing.
That should make this error more rare, and perhaps easier to resolve.

Note that this is an issue that may get resolved in Pkg in the future;
JuliaLang/Pkg.jl#3713
  • Loading branch information
visr authored Jan 16, 2024
1 parent 94ef9ad commit ed8f0b8
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,22 @@ install-ribasim-testmodels = "pip install --no-deps --editable python/ribasim_te
install-pre-commit = "pre-commit install"
install-without-pre-commit = { depends_on = [
"install-julia",
"update-registry-julia",
"install-ribasim-python",
"install-ribasim-api",
"install-ribasim-testmodels",
] }
install = { depends_on = ["install-without-pre-commit", "install-pre-commit"] }
# Instantiate
update-registry-julia = "julia --eval='using Pkg; Registry.update()'"
instantiate-julia = "julia --project --eval='using Pkg; Pkg.instantiate()'"
initialize-julia = { depends_on = [
"update-registry-julia",
"instantiate-julia",
] }
# Docs
build-julia-docs = { cmd = "julia --project=docs docs/make.jl", depends_on = [
"instantiate-julia",
"initialize-julia",
] }
quartodoc-build = { cmd = "quartodoc build && rm objects.json", cwd = "docs" }
quarto-preview = { cmd = "quarto preview docs", depends_on = [
Expand All @@ -56,15 +62,15 @@ lint = { depends_on = [
# Build
build-ribasim-cli = { cmd = "julia --project build.jl --app", cwd = "build/create_binaries", depends_on = [
"generate-testmodels",
"instantiate-julia",
"initialize-julia",
] }
build-libribasim = { cmd = "julia --project build.jl --lib", cwd = "build/create_binaries", depends_on = [
"generate-testmodels",
"instantiate-julia",
"initialize-julia",
] }
build = { "cmd" = "julia --project build.jl --app --lib", cwd = "build/create_binaries", depends_on = [
"generate-testmodels",
"instantiate-julia",
"initialize-julia",
] }
remove-artifacts = "julia --eval 'rm(joinpath(Base.DEPOT_PATH[1], \"artifacts\"), force=true, recursive=true)'"

Expand Down

0 comments on commit ed8f0b8

Please sign in to comment.