|
2 | 2 |
|
3 | 3 | module API |
4 | 4 |
|
5 | | -using UUIDs |
6 | | -using Printf |
7 | | -import Random |
8 | | -using Dates |
| 5 | +import FileWatching |
9 | 6 | import LibGit2 |
10 | 7 | import Logging |
11 | | -import FileWatching |
| 8 | +import Printf |
| 9 | +import Random |
| 10 | +using Dates: Dates, DateTime, Day, Period, now |
| 11 | +using UUIDs: UUIDs, UUID |
12 | 12 |
|
13 | | -import Base: StaleCacheKey |
| 13 | +using Base.BinaryPlatforms |
14 | 14 |
|
15 | | -import ..depots, ..depots1, ..logdir, ..devdir, ..printpkgstyle, .._autoprecompilation_enabled_scoped |
16 | 15 | import ..Operations, ..GitTools, ..Pkg, ..Registry |
| 16 | +import ..TOML |
| 17 | +import ..depots1, ..logdir, ..devdir, ..printpkgstyle, .._autoprecompilation_enabled_scoped |
17 | 18 | import ..can_fancyprint, ..pathrepr, ..isurl, ..PREV_ENV_PATH, ..atomic_toml_write |
18 | | -using ..Types, ..TOML |
19 | | -using ..Types: VersionTypes |
20 | | -using Base.BinaryPlatforms |
21 | 19 | import ..stderr_f, ..stdout_f |
| 20 | +import ..Resolve: ResolverError, ResolverTimeoutError |
| 21 | +using ..Types |
22 | 22 | using ..Artifacts: artifact_paths |
23 | 23 | using ..MiniProgressBars |
24 | | -import ..Resolve: ResolverError, ResolverTimeoutError |
25 | 24 |
|
26 | 25 | include("generate.jl") |
27 | 26 |
|
@@ -583,7 +582,7 @@ function gc(ctx::Context = Context(); collect_delay::Period = Day(7), verbose = |
583 | 582 | env = ctx.env |
584 | 583 |
|
585 | 584 | # Only look at user-depot unless force=true |
586 | | - gc_depots = force ? depots() : [depots1()] |
| 585 | + gc_depots = force ? Base.DEPOT_PATH : [depots1()] |
587 | 586 |
|
588 | 587 | # First, we load in our `manifest_usage.toml` files which will tell us when our |
589 | 588 | # "index files" (`Manifest.toml`, `Artifacts.toml`) were last used. We will combine |
@@ -1435,10 +1434,10 @@ function activate(path::AbstractString; shared::Bool = false, temp::Bool = false |
1435 | 1434 | end |
1436 | 1435 | end |
1437 | 1436 | else |
1438 | | - # initialize `fullpath` in case of empty `Pkg.depots()` |
| 1437 | + # initialize `fullpath` in case of empty `Pkg.Base.DEPOT_PATH` |
1439 | 1438 | fullpath = "" |
1440 | 1439 | # loop over all depots to check if the shared environment already exists |
1441 | | - for depot in Pkg.depots() |
| 1440 | + for depot in Pkg.Base.DEPOT_PATH |
1442 | 1441 | fullpath = joinpath(Pkg.envdir(depot), path) |
1443 | 1442 | isdir(fullpath) && break |
1444 | 1443 | end |
|
0 commit comments