Closed tecosaur closed 4 weeks ago
What if the name isn't REPLExt but the same name as a non stdlib ext?
Probably some interaction with require_stdlib
FYI: I think I'm hitting the same issue with two packages that both define PkgExt
, is that also part of a stdlib?
Is your manifest up to date? The error message mentions it.
I think I'm hitting the same issue with two packages that both define PkgExt, is that also part of a stdlib?
No. Hm, I don't think the loading code should ever identify a package only by name and they should get different UUIDs because their parent is different. But if course, might be a bug somewhere. But I'm pretty sure there are many exte sions in the ecosystem with the same name so I would have thought that would have already showed up if it was an issue.
Extensions with the same name definitely work, and I think there was no released Julia version where they didn't. You can easily have a whole bunch, not just two:
julia> using UnicodePlots, SkyCoords, Normalization, PlutoTables, FlexiMaps, VOTables, AxisKeysExtra, PyPlotUtils, Unitful
# there are 8 UnitfulExts here:
(jl_RKhdWo) pkg> st --extensions
Status `/private/var/folders/2j/9vtd991d201dbkh9dnx3wvy00000gq/T/jl_RKhdWo/Project.toml`
[b7a0d2b7] AxisKeysExtra v0.1.10
├─ RectiGridsExt [RectiGrids]
├─ UnitfulExt [Unitful]
├─ DimensionalDataExt [DimensionalData]
└─ MakieExt [Makie]
[6394faf6] FlexiMaps v0.1.26
├─ IntervalSetsExt [IntervalSets]
├─ AxisKeysExt [AxisKeys]
├─ DictionariesExt [Dictionaries]
├─ StructArraysExt [StructArrays]
└─ UnitfulExt [Unitful]
[be38d6a3] Normalization v0.7.1
├─ DataFramesExt [DataFrames]
├─ UnitfulExt [Unitful]
└─ DimensionalDataExt [DimensionalData]
[e64c0356] PlutoTables v0.1.6
└─ UnitfulExt [Unitful]
[5384e752] PyPlotUtils v0.1.31
├─ AxisKeysExt [AxisKeys]
├─ AxisKeysUnitfulExt [AxisKeys, Unitful]
└─ UnitfulExt [Unitful]
[fc659fc5] SkyCoords v1.4.0
├─ AccessorsExt [Accessors]
└─ UnitfulExt [Unitful]
[b8865327] UnicodePlots v3.6.4
├─ IntervalSetsExt [IntervalSets]
├─ TermExt [Term]
├─ FreeTypeExt [FileIO, FreeType]
├─ UnitfulExt [Unitful]
└─ ImageInTerminalExt [ImageInTerminal]
[1986cc42] Unitful v1.20.0
├─ InverseFunctionsUnitfulExt [InverseFunctions]
└─ ConstructionBaseUnitfulExt [ConstructionBase]
[3abbdab7] VOTables v0.1.14
├─ DictArraysExt [DictArrays]
└─ UnitfulExt [Unitful]
Maybe, your issue is somehow related to the deps being in stdlib? There are known issues for that scenario, even without duplicate names – eg https://github.com/JuliaLang/julia/issues/52132.
That's possible. Should be fixed in 1.11 I think it is.
Some more info/responses:
In my global environment, here's where one PkgExt
is defined:
(@v1.11) pkg> st --extensions
Status `~/.julia/environments/v1.11/Project.toml`
[1e701ad1] Setup v0.1.0 `~/.julia/config/Setup`
├─ PkgExt [Pkg]
...
and then when the error appears, it's when I'm developing DataToolkitCommon
which also has a PkgExt = "Pkg"
extension.
I have also faced this in the last days dealing with multiple packages defining an extension for PlotlyBase (so definitely not a stdlib) called PlotlyBaseExt. Problems seems to be fixed if I changed the name of either of the two extensions called PlotlyBaseExt.
I didn't manage to narrow down an MWE but I'll post it if I manage to
Renaming my startup package's PkgExt
to PkgUtils
has resolved the issue with that name I mentioned earlier: https://code.tecosaur.net/tec/Setup.jl/commit/443552f2176f8ff00d564a58c25ba0cce5a96185
I can repro this so I should be able to understand what is going on.
https://github.com/JuliaLang/julia/pull/54658 should fix this.
Thanks Kristoffer!
So, I've been working on decreasing TTFX in a package of mine, and thought in the process I'd split the REPL functionality up into a package extension ... called
REPLExt
.Turns out this causes issues though, do package extension names need to be globally unique? That would be weird, but it kinda seems like it from this MWE.
pkg_ext_name_repro.zip
This is just the results of
]generate pkg_ext_name_repo
+ a minimalREPL
-based package extension.Reproduction instructions:
pkg_ext_name_repo
julia +1.11 --startup-file=no --project=pkg_ext_name_repo
using Pkg