MilesCranmer / AirspeedVelocity.jl

Easily benchmark a Julia package over its commit history
https://astroautomata.com/AirspeedVelocity.jl/
Apache License 2.0
88 stars 5 forks source link

Unable to use on git submodules #46

Open MilesCranmer opened 1 week ago

MilesCranmer commented 1 week ago

I have a personal "monorepo" for some connected Julia projects stored as submodules and it seems like I can't use AirspeedVelocity.jl on the submodules. Even if I am within a single one of the submodules, for some reason it gives me the following error. I think this is due to the following Julia issue: https://github.com/JuliaLang/Pkg.jl/issues/708

[ Info: Downloading package's latest benchmark script, assuming it is in benchmark/benchmarks.jl
ERROR: LoadError: Did not find a git repository at `.`, perhaps you meant `Pkg.develop`?
Stacktrace:
 [1] pkgerror(msg::String)
   @ Pkg.Types ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Pkg/src/Types.jl:70
 [2] handle_repo_add!(ctx::Pkg.Types.Context, pkg::Pkg.Types.PackageSpec)
   @ Pkg.Types ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Pkg/src/Types.jl:770
 [3] handle_repos_add!(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec})
   @ Pkg.Types ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Pkg/src/Types.jl:852
 [4] add(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; preserve::Pkg.Types.PreserveLevel, platform::Base.BinaryPlatforms.Platform, kwargs::@Kwargs{io::Base.DevNull})
   @ Pkg.API ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Pkg/src/API.jl:258
 [5] add(pkgs::Vector{Pkg.Types.PackageSpec}; io::Base.DevNull, kwargs::@Kwargs{})
   @ Pkg.API ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Pkg/src/API.jl:159
 [6] add
   @ ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Pkg/src/API.jl:148 [inlined]
 [7] #add#24
   @ ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Pkg/src/API.jl:146 [inlined]
 [8] top-level scope
   @ /var/folders/1h/xyppkvx52cl6w3_h8bw_gdqh0000gr/T/jl_GdjEuR/path_getter.jl:7
in expression starting at /var/folders/1h/xyppkvx52cl6w3_h8bw_gdqh0000gr/T/jl_GdjEuR/path_getter.jl:1
ERROR: LoadError: failed process: Process(`julia --project=/var/folders/1h/xyppkvx52cl6w3_h8bw_gdqh0000gr/T/jl_GdjEuR --startup-file=no /var/folders/1h/xyppkvx52cl6w3_h8bw_gdqh0000gr/T/jl_GdjEuR/path_getter.jl`, ProcessExited(1)) [1]
MilesCranmer commented 1 week ago

It's weird, you can't even do:

(jl_MTqPoA) pkg> add .
ERROR: Did not find a git repository at `.`, perhaps you meant `Pkg.develop`

within the git submodule. Seems like this is because git stores the git information at the top level repository rather than within each submodule.