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

[AutoBuild] Make julia_compat a required keyword argument #1337

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
13 changes: 11 additions & 2 deletions src/AutoBuild.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ using RegistryTools
import LibGit2
import PkgLicenses

const DEFAULT_JULIA_VERSION_SPEC = "1.0"
const DEFAULT_JULIA_VERSION_SPEC = "nothing"
const DEFAULT_JLLWRAPPERS_VERSION_SPEC = "1.2.0"
const PKG_VERSIONS = Base.VERSION >= v"1.7-" ? Pkg.Versions : Pkg.Types

Expand Down Expand Up @@ -152,7 +152,8 @@ supported ones. A few additional keyword arguments are accept:

* `julia_compat` can be set to a version string which is used to set the
supported Julia version in the `[compat]` section of the `Project.toml` of
the generated JLL package. The default value is `"1.0"`.
the generated JLL package. This does not have a default value and must be
always specified.

* `lazy_artifacts` sets whether the artifacts should be lazy.

Expand Down Expand Up @@ -191,6 +192,14 @@ function build_tarballs(ARGS, src_name, src_version, sources, script,
error("Package name \"$(src_name)\" is not a valid identifier")
end

if julia_compat == DEFAULT_JULIA_VERSION_SPEC
error("""
`julia_compat` must be set explicitly to a valid compat spec string.
If this is an existing recipe which didn't previously specify `julia_compat`, use the old default value of `"1.0"`,
otherwise for a new recipe you're encouraged to set `julia_compat="1.6"`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we make this more generic (e.g. say to the current LTS release)? That way we don't need to update the error messages for newer versions.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think sticking to v1.6 is ok, we don't have any particular reason to restrict to newer versions. Maybe I could rephrase slightly to say something along the lines of "at least 1.6"

""")
end

# Throw an error if we're going to build for platforms not supported by Julia v1.5-.
if any(p -> arch(p) == "armv6l" || (Sys.isapple(p) && arch(p) == "aarch64"), platforms) && minimum_compat(julia_compat) < v"1.6"
error("Experimental platforms cannot be used with Julia v1.5-.\nChange `julia_compat` to require at least Julia v1.6")
Expand Down
Loading