Pkg.jl: gc different between Julia v1.2 and v1.3

Created on 1 Dec 2019  路  3Comments  路  Source: JuliaLang/Pkg.jl

I ran gc on Julia v1.3:

(v1.3) pkg> gc
    Active manifests:
        `C:\Users\plowman\.julia\environments\v1.2\Manifest.toml`
        `C:\Users\plowman\.julia\environments\v1.3\Manifest.toml`
        `C:\Users\plowman\.julia\environments\v1.1\Manifest.toml`
        `C:\Users\plowman\.julia\environments\v1.0\Manifest.toml`
    Active artifacts:
        `C:\Users\plowman\.julia\packages\Expat_jll\YXYuQ\Artifacts.toml`
   Deleted no artifacts or packages

and immediately afterwards on Julia v1.2:

(v1.2) pkg> gc
    Active manifests:
        `C:\Users\plowman\.julia\environments\v1.2\Manifest.toml`
        `C:\Users\plowman\.julia\environments\v1.3\Manifest.toml`
        `C:\Users\plowman\.julia\environments\v1.1\Manifest.toml`
        `C:\Users\plowman\.julia\environments\v1.0\Manifest.toml`
   Deleted `C:\Users\plowman\.julia\packages\ArrayLayouts\278vm` (108.543 KiB)
   Deleted `C:\Users\plowman\.julia\packages\ArrayLayouts\D949X` (108.233 KiB)
   Deleted `C:\Users\plowman\.julia\packages\ArrayLayouts\GEDfL` (108.298 KiB)
   Deleted `C:\Users\plowman\.julia\packages\BangBang\q3k15` (78.430 KiB)
   Deleted `C:\Users\plowman\.julia\packages\Calculus\j4WMx` (51.857 KiB)
   Deleted `C:\Users\plowman\.julia\packages\CategoricalArrays\gITuO` (387.010 KiB)
   Deleted `C:\Users\plowman\.julia\packages\Crayons\P4fls` (50.743 KiB)
   Deleted `C:\Users\plowman\.julia\packages\CSV\gBdAR` (29.008 MiB)
   Deleted `C:\Users\plowman\.julia\packages\CSV\yJFAJ` (29.008 MiB)
   Deleted `C:\Users\plowman\.julia\packages\DataStructures\SAI1X` (484.737 KiB)
   Deleted `C:\Users\plowman\.julia\packages\DiffEqDiffTools\91LlG` (81.004 KiB)
   Deleted `C:\Users\plowman\.julia\packages\Distributions\OdJGZ` (1.001 MiB)
   Deleted `C:\Users\plowman\.julia\packages\DoubleFloats\ieV5d` (319.018 KiB)
   Deleted `C:\Users\plowman\.julia\packages\DoubleFloats\WWrr5` (319.200 KiB)
   Deleted `C:\Users\plowman\.julia\packages\EzXML\G0JeY` (14.835 MiB)
   Deleted `C:\Users\plowman\.julia\packages\FileIO\JAtC1` (1.063 MiB)
   Deleted `C:\Users\plowman\.julia\packages\FillArrays\qWsBW` (69.866 KiB)
   Deleted `C:\Users\plowman\.julia\packages\FillArrays\VF4xN` (69.679 KiB)
   Deleted `C:\Users\plowman\.julia\packages\ForwardDiff\yPcDQ` (186.714 KiB)
   Deleted `C:\Users\plowman\.julia\packages\ImageDistances\okX3M` (31.733 KiB)
   Deleted `C:\Users\plowman\.julia\packages\Images\BEHlD` (260.429 KiB)
   Deleted `C:\Users\plowman\.julia\packages\IterTools\tZQsB` (82.730 KiB)
   Deleted `C:\Users\plowman\.julia\packages\JLD2\0sS1F` (233.926 KiB)
   Deleted `C:\Users\plowman\.julia\packages\JLD2\1TYPY` (236.717 KiB)
   Deleted `C:\Users\plowman\.julia\packages\JLD2\KjBIK` (217.704 KiB)
   Deleted `C:\Users\plowman\.julia\packages\JLD2\kTFlc` (243.853 KiB)
   Deleted `C:\Users\plowman\.julia\packages\JLD2\VXsdO` (236.673 KiB)
   Deleted `C:\Users\plowman\.julia\packages\JLD2\w2vgv` (218.925 KiB)
   Deleted `C:\Users\plowman\.julia\packages\JLD2\XYZjt` (234.068 KiB)
   Deleted `C:\Users\plowman\.julia\packages\LazyArrays\32TDf` (197.641 KiB)
   Deleted `C:\Users\plowman\.julia\packages\LazyArrays\E7eyy` (194.525 KiB)
   Deleted `C:\Users\plowman\.julia\packages\LazyArrays\kHOhg` (195.262 KiB)
   Deleted `C:\Users\plowman\.julia\packages\LazyArrays\n5qdc` (203.540 KiB)
   Deleted `C:\Users\plowman\.julia\packages\LazyArrays\thmoT` (197.563 KiB)
   Deleted `C:\Users\plowman\.julia\packages\LoweredCodeUtils\LmOAM` (38.646 KiB)
   Deleted `C:\Users\plowman\.julia\packages\NaNMath\pEdac` (11.650 KiB)
   Deleted `C:\Users\plowman\.julia\packages\Nullables\Oyo3b` (37.100 KiB)
   Deleted `C:\Users\plowman\.julia\packages\OffsetArrays\vIbpP` (39.252 KiB)
   Deleted `C:\Users\plowman\.julia\packages\Optim\Agd3B` (636.751 KiB)
   Deleted `C:\Users\plowman\.julia\packages\Parsers\4gpBu` (164.491 KiB)
   Deleted `C:\Users\plowman\.julia\packages\Parsers\6AhbL` (164.351 KiB)
   Deleted `C:\Users\plowman\.julia\packages\PrettyTables\UH3dL` (3.038 MiB)
   Deleted `C:\Users\plowman\.julia\packages\TableTraitsUtils\IAE6S` (17.715 KiB)
   Deleted `C:\Users\plowman\.julia\packages\Tokenize\xA1lh` (142.928 KiB)
   Deleted 44 package installations (84.459 MiB)

I was expecting the v1.2 behavior on v1.3.
Is this expected?

Most helpful comment

One week seems fine to me; I'm not sure I consider it a regression. It's much more featureful now than it was before. We do have a way to force it to collect now, it's just not very accessible because you have to use Pkg.gc() rather than pkg> gc. You can do Pkg.gc(;collect_delay = Hour(1)) to collect things that have been marked unused for more than an hour (so if you ran it right now, then ran it again in an hour, it would remove all items that were unused both the first time you ran gc as well as the second. Items that were previously marked unused but which become used again before the second run of gc, or items that were used the first time you ran gc but have since fallen out of use, would not yet be removed.

If you really want to just clean up disk space though, you can use Pkg.gc(;collect_delay=Hour(0)) and get the behavior of the old gc. I think we should add a gc --now REPL command to make this easier for people.

All 3 comments

There is some new logic https://github.com/JuliaLang/Pkg.jl/issues/1466 but I think it is a bit of a regression they way it is now.

I'd suggest that we move the delay down to a week for 1.3.1. @staticfloat?

One week seems fine to me; I'm not sure I consider it a regression. It's much more featureful now than it was before. We do have a way to force it to collect now, it's just not very accessible because you have to use Pkg.gc() rather than pkg> gc. You can do Pkg.gc(;collect_delay = Hour(1)) to collect things that have been marked unused for more than an hour (so if you ran it right now, then ran it again in an hour, it would remove all items that were unused both the first time you ran gc as well as the second. Items that were previously marked unused but which become used again before the second run of gc, or items that were used the first time you ran gc but have since fallen out of use, would not yet be removed.

If you really want to just clean up disk space though, you can use Pkg.gc(;collect_delay=Hour(0)) and get the behavior of the old gc. I think we should add a gc --now REPL command to make this easier for people.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

KristofferC picture KristofferC  路  4Comments

jebej picture jebej  路  3Comments

MaWo2 picture MaWo2  路  4Comments

GordStephen picture GordStephen  路  3Comments

innerlee picture innerlee  路  4Comments