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

Change the default registry flavour from conservative to eager #3330

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 4 additions & 22 deletions docs/src/registries.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,30 +100,12 @@ The default Pkg Server (`pkg.julialang.org`) offers two different "flavors" of r
!!! compat "Julia 1.8"
Registry flavors are only available starting with Julia 1.8.

- `conservative`: suitable for most users; all packages and artifacts in this registry flavor are available from the Pkg Server, with no need to download from other sources
- `eager`: this registry offers the latest versions of packages, even if the Pkg and Storage Servers have not finished processing them; thus, some packages and artifacts may not be available from the Pkg Server, and thus may need to be downloaded from other sources (such as GitHub)
- `eager`: suitable for most users; all packages and artifacts in this registry flavor are available to download but it might not come from the Pkg Server
- `conservative`: this registry only offers the versions of packages that have been proccesed by the Storage Servers; thus, the latest version of some packages and artifacts may not be availale.

The default registry flavor is `conservative`. We recommend that most users stick to the `conservative` flavor unless they know that they need to use the `eager` flavor.
The default registry flavor is `eager`. We recommend that most users stick to the `eager` flavor unless they know that they need to use the `conservative` flavor.

To select the `eager` flavor:

```julia
ENV["JULIA_PKG_SERVER_REGISTRY_PREFERENCE"] = "eager"

import Pkg

Pkg.Registry.update()
```

To select the `conservative` flavor:

```julia
ENV["JULIA_PKG_SERVER_REGISTRY_PREFERENCE"] = "conservative"

import Pkg

Pkg.Registry.update()
```
To flavors are chosen by setting the environment variable `JULIA_PKG_SERVER_REGISTRY_PREFERENCE` to `eager` or `conservative`.

### Creating and maintaining registries

Expand Down
1 change: 1 addition & 0 deletions src/PlatformEngines.jl
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ function get_metadata_headers(url::AbstractString)
any(hdr == k for (k, v) in headers) && continue
push!(headers, hdr => val)
end
push!(headers, "JULIA_PKG_SERVER_REGISTRY_PREFERENCE" => get(ENV, "JULIA_PKG_SERVER_REGISTRY_PREFERENCE", "eager"))
return headers
end

Expand Down