- Pkg now has support for "workspaces" which is a way to resolve multiple project files into a single manifest.
The functions
Pkg.status,Pkg.why,Pkg.instantiate,Pkg.precompile(and their REPL variants) have been updated to take aworkspaceoption. Read more about this feature in the manual about the TOML-files.
- It is now possible to specify "sources" for packages in a
[sources]section in Project.toml. This can be used to add non-registered normal or test dependencies. ([#3783]) - Pkg now obeys
[compat]bounds forjuliaand raises an error if the version of the running Julia binary is incompatible with the bounds inProject.toml. Pkg has always obeyed this compat when working with Registry packages. This change affects mostly local packages. ([#3526]) pkg> addandPkg.addwill now add compat entries for new direct dependencies if the active environment is a package (has anameanduuidentry) ([#3732])- Dependencies can now be directly added as weak deps or extras via the
pkg> add --weak/extra FooorPkg.add("Foo", target=:weakdeps/:extras)forms ([#3708])
- New functionality:
Pkg.whyandpkg> whyto show why a package is inside the environment (shows all "paths" to a package starting at the direct dependencies). - When code coverage tracking is enabled for
Pkg.testthe new path-specific code-coverage option is used to limit coverage to the directory of the package being tested. Previously the--code-coverage=useroption was used, which tracked files in all code outside of Core & Base, i.e. all stdlibs and all user packages, which often made running tests with code coverage a lot slower (#3021). - Writes to
manifest_usage.tomland Registry downloads/updates are now protected from process concurrency clashes via a pidfile lock (#2793). - The Pkg REPL now understands Github URLs to branches and commits so you can e.g. do
pkg> add https://github.com/Org/Package.jl/tree/branchorpkg> add https://github.com/Org/Package.jl/commit/bb9eb77e6dc. - Timing of the precompilation of dependencies can now be reported via
Pkg.precompile(timing=true)([#3334]) - Bug fix on
pin/free --allwhich now correctly applies to all dependencies, not just direct dependencies ([#3346]). - To reduce the amount of time spent downloading and precompiling new package versions when working with multiple
environments, a new preserve strategy
PRESERVE_ALL_INSTALLEDhas been added which will preserve all existing dependencies and only add versions of the new packages that are already installed. i.e.pkg> add --preserve=installed Foo. Also a new tiered resolve strategyPRESERVE_TIERED_INSTALLEDthat tries this first, which can be set to the default strategy by setting the env varJULIA_PKG_PRESERVE_TIERED_INSTALLEDtotrue([#3378]).
- Pkg will now respect the version of packages put into the sysimage using e.g. PackageCompiler. For example,
if version 1.3.2 of package A is in the sysimage, Pkg will always install that version when adding the package,
or when the package is installed as a dependency to some other package. This can be disabled by calling
Pkg.respect_sysimage_versions(false)(#3002). - New
⌃and⌅indicators beside packages inpkg> statusthat have new versions available.⌅indicates when new versions cannot be installed (#2906). - New
outdated::Boolkwarg toPkg.status(--outdatedor-oin the REPL mode) to show information about packages not at the latest version (#2284). - New
compat::Boolkwarg toPkg.status(--compator-cin the REPL mode) to show any [compat] entries in the Project.toml (#2702). - New
pkg> compat(andPkg.compat) mode for setting Project compat entries. Provides an interactive editor viapkg> compat, or direct entry manipulation viapkg> Foo 0.4,0.5which can load current entries via tab-completion. i.e.pkg> compat Fo<TAB>autocompletes topkg> Foo 0.4,0.5so that the existing entry can be edited (#2702). - Pkg now only tries to download packages from the package server in case the server tracks a registry that contains the package (#2689).
Pkg.instantiatewill now warn when a Project.toml is out of sync with a Manifest.toml. It does this by storing a hash of the project deps and compat entries (other fields are ignored) in the manifest when it is resolved, so that any change to the Project.toml deps or compat entries without a re-resolve can be detected (#2815).- If
pkg> addcannot find a package with the provided name it will now suggest similarly named packages that can be added (#2985). - The julia version stored in the manifest no longer includes the build number i.e. master will now record as
1.9.0-DEV(#2995). - Interrupting a
pkg> testwill now be caught more reliably and exit back to the REPL gracefully (#2933).
- The format of the
Manifest.tomlfile have changed. New manifests will use the new format while old manifest will have their existing format in place (#2580). Julia 1.6.2 is compatible with the new format (#2561). - Registries downloaded from the Pkg Server (not git) are no longer uncompressed into files but instead read directly from the compressed tarball into memory. This improves performance on
filesystems which do not handle a large number of files well. To turn this feature off, set the environment variable
JULIA_PKG_UNPACK_REGISTRY=true(#2431). - It is now possible to use an external
gitexecutable instead of the default libgit2 library for the downloads that happen via the Git protocol by setting the environment variableJULIA_PKG_USE_CLI_GIT=true(#2448). - Registries downloaded from the Pkg Server (not git) is now assumed to be immutable. Manual changes to their files might not be picked up by a running Pkg session.
- The number of packages precompiled in parallel are now limited to 16 unless the
environment variable
JULIA_NUM_PRECOMPILE_TASKSis set (#2552). - Adding packages by folder name in the REPL mode now requires a prepending a
./to the folder name package folder is in the current folder, e.g.add ./Packageis required instead ofadd Package. This is to avoid confusion between the package namePackageand the local directoryPackage. rm,pin, andfreenow support the--alloption, and the api variants gain theall_pkgs::Boolkwarg, to perform the operation on all packages within the project or manifest, depending on the mode of the operation (#2432).- The
modekeyword forPackageSpechas been removed (#2454).