Skip to content

Commit d0437c4

Browse files
giordanofingolfin
andauthored
Document two ways of expressing deps versions (#969)
* [skip ci] Document two ways of expressing deps versions * Apply suggestions from code review [skip ci] Co-authored-by: Max Horn <[email protected]> Co-authored-by: Max Horn <[email protected]>
1 parent 9a1a7b0 commit d0437c4

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

azure-pipelines.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ variables:
1313
JULIA: unbuffer julia --project=$(Build.SourcesDirectory) --color=yes
1414
BINARYBUILDER_AUTOMATIC_APPLE: true
1515
BINARYBUILDER_USE_CCACHE: true
16-
16+
JULIA_PKG_SERVER: ""
1717

1818
jobs:
1919
- job: Info

docs/src/building.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,27 @@ Examples of builders that depend on other binaries include:
345345
depends on `Xorg_libxcb_jll`, and `Xorg_xtrans_jll` at build- and run-time,
346346
and on `Xorg_xorgproto_jll` and `Xorg_util_macros_jll` only at build-time.
347347

348+
### Version number of dependencies
349+
350+
There are two different ways to specify the version of a dependency, with two
351+
different meanings:
352+
353+
* `Dependency("Foo_jll", v"1.2.3")`: the second argument of `Dependency`
354+
specifies the version of the package to be used for building: this version *is
355+
not* reflected into a compatibility bound in the project of the generated JLL
356+
package. This is useful when the package you want to build is compatible with
357+
all the versions of the dependency starting from the given one (and then you
358+
don't want to restrict compatibility bounds of the JLL package), but to
359+
maximize compatibility you want to build against the oldest compatible
360+
version.
361+
* `Dependency(PackageSpec(; name="Foo_jll", version=v"1.2.3"))`: if the package
362+
is given as a `Pkg.PackageSpec` and the `version` keyword argument is given,
363+
this version of the package is used for the build *and* the generated JLL
364+
package will be compatible with the provided version of the package. This
365+
should be used when your package is compatible only with a single version of
366+
the dependency, a condition that you want to reflect also in the project of the
367+
JLL package.
368+
348369
# Building and testing JLL packages locally
349370

350371
As a package developer, you may want to test JLL packages locally, or as a binary dependency

0 commit comments

Comments
 (0)