AD0AE
AD0AE

Reputation: 111

Package conflicts in Julia

I am new to working with Julia and I am running into major problems attempting to get the package versions to align.

The specific code I am attempting to run is: https://github.com/fgasdia/SubionosphericVLFInversionAlgorithms.jl

I am having trouble getting to the correct version of https://github.com/fgasdia/PropagationModelPrep. Specifically SubionosphericVLFInversionAlgorithms requires v0.0.13-0.0.14. However, everytime I either direct load in PropagationModelPrep it goes to v0.0.15 and I cannot figure out how to go to one of these other versions.

I have attempted to:

  1. Directly clone the 0.0.14 tag from github.
  2. Change Project.toml directly to include 0.0.15 in the SubionosphericVLFInversionAlgorithms directory, but this change seems to be completely ignored.
  3. I have tried to pin the 0.0.14 version, but that ran into errors:
julia> import Pkg

(@v1.9) pkg> add [email protected]
[ Info: Use `./PropagationModelPrep` to add or develop the local directory at `~/research/data/VLFImaging/PropagationModelPrep`.
   Resolving package versions...
ERROR: expected package `PropagationModelPrep [866dd2b4]` to be registered

(@v1.9) pkg> add ./[email protected]
ERROR: version specification invalid when tracking a repository: `0.0.14` specified for package `PropagationModelPrep`

(@v1.9) pkg> add ~/research/data/VLFImaging/[email protected]
ERROR: version specification invalid when tracking a repository: `0.0.14` specified for package `/Users/srkaeppler/research/data/VLFImaging/PropagationModelPrep`

(@v1.9) pkg> 

following guidance found here: https://www.reddit.com/r/Julia/comments/puk07c/how_do_you_change_a_package_version_to_something/

Also tried:

(@v1.9) pkg> add ~/research/data/VLFImaging/PropagationModelPrep#0.0.14
    Updating git-repo `/Users/srkaeppler/research/data/VLFImaging/PropagationModelPrep`
ERROR: Did not find rev 0.0.14 in repository

(@v1.9) pkg> add ~/research/data/VLFImaging/[email protected]
ERROR: version specification invalid when tracking a repository: `0.0.14` specified for package `/Users/srkaeppler/research/data/VLFImaging/PropagationModelPrep`

(@v1.9) pkg> 

It seems like no matter what I do, I cannot change this git version tag number.

Further examples:

    Updating git-repo `/Users/srkaeppler/research/data/VLFImaging/PropagationModelPrep`
   Resolving package versions...
    Updating `~/.julia/environments/v1.9/Project.toml`
  [866dd2b4] + PropagationModelPrep v0.0.15 `/Users/srkaeppler/research/data/VLFImaging/PropagationModelPrep#main`
    Updating `~/.julia/environments/v1.9/Manifest.toml`

And

julia> import Pkg; Pkg.add(path="/Users/srkaeppler/research/data/VLFImaging/SubionosphericVLFInversionAlgorithms.jl")
    Updating git-repo `/Users/srkaeppler/research/data/VLFImaging/SubionosphericVLFInversionAlgorithms.jl`
   Resolving package versions...
ERROR: Unsatisfiable requirements detected for package PropagationModelPrep [866dd2b4]:
 PropagationModelPrep [866dd2b4] log:
 ├─possible versions are: 0.0.15 or uninstalled
 ├─PropagationModelPrep [866dd2b4] is fixed to version 0.0.15
 └─restricted to versions 0.0.13-0.0.14 by SubionosphericVLFInversionAlgorithms [0803ec96] — no versions left
   └─SubionosphericVLFInversionAlgorithms [0803ec96] log:
     ├─possible versions are: 0.0.12 or uninstalled
     └─SubionosphericVLFInversionAlgorithms [0803ec96] is fixed to version 0.0.12
Stacktrace:

I suspect the code would work just fine with the 0.0.15 version of the code.

Any help would be appreciated, please feel free to send clarifications. Have some pity on me, this is the first time I am using Julia and maybe this is a "RTFM" issue.

Alternatively, if there is a way to completely delete all packages in Julia and start over, that might be an approach too. Maybe one SubionosphericVLFInversionAlgorithms is looking at github versus the local copy I cloned?

Update ### After working on this, I have arrived at the final problem that I don't know how to resolve.

Either:

(@v1.9) pkg> add /Users/srkaeppler/research/data/VLFImaging/PropagationModelPrep
    Updating git-repo `/Users/srkaeppler/research/data/VLFImaging/PropagationModelPrep`
   Resolving package versions...
    Updating `~/.julia/environments/v1.9/Project.toml`
  [866dd2b4] + PropagationModelPrep v0.0.15 `/Users/srkaeppler/research/data/VLFImaging/PropagationModelPrep#main`
    Updating `~/.julia/environments/v1.9/Manifest.toml`
  [621f4979] + AbstractFFTs v1.5.0
  [717857b8] + DSP v0.7.8
  [7a1cc6ca] + FFTW v1.7.1
  [c8e1da08] + IterTools v1.8.0
⌅ [f27b6e38] + Polynomials v3.2.13
  [866dd2b4] + PropagationModelPrep v0.0.15 `/Users/srkaeppler/research/data/VLFImaging/PropagationModelPrep#main`
  [f5851436] + FFTW_jll v3.3.10+0
  [1d5cc7b8] + IntelOpenMP_jll v2023.2.0+0
  [856f044c] + MKL_jll v2023.2.0+0
        Info Packages marked with ⌅ have new versions available but compatibility constraints restrict them from upgrading. To see why use `status --outdated -m`

(@v1.9) pkg> add /Users/srkaeppler/research/data/VLFImaging/SubionosphericVLFInversionAlgorithms.jl
    Updating git-repo `/Users/srkaeppler/research/data/VLFImaging/SubionosphericVLFInversionAlgorithms.jl`
   Resolving package versions...
ERROR: Unsatisfiable requirements detected for package PropagationModelPrep [866dd2b4]:
 PropagationModelPrep [866dd2b4] log:
 ├─possible versions are: 0.0.15 or uninstalled
 ├─PropagationModelPrep [866dd2b4] is fixed to version 0.0.15
 └─restricted to versions 0.0.13-0.0.14 by SubionosphericVLFInversionAlgorithms [0803ec96] — no versions left
   └─SubionosphericVLFInversionAlgorithms [0803ec96] log:
     ├─possible versions are: 0.0.12 or uninstalled
     └─SubionosphericVLFInversionAlgorithms [0803ec96] is fixed to version 0.0.12

This appears to be ignoring the Project.toml file, so how can I 'force' it to work with the v0.0.15

Or if I try to downgrade, I run into this problem instead:

(@v1.9) pkg> add /Users/srkaeppler/research/data/VLFImaging/PropagationModelPrep#v0.0.14
   Resolving package versions...
ERROR: Unsatisfiable requirements detected for package Interpolations [a98d9a8b]:
 Interpolations [a98d9a8b] log:
 ├─possible versions are: 0.3.6-0.14.7 or uninstalled
 ├─restricted to versions 0.13 by PropagationModelPrep [866dd2b4], leaving only versions: 0.13.0-0.13.6
 │ └─PropagationModelPrep [866dd2b4] log:
 │   ├─possible versions are: 0.0.14 or uninstalled
 │   └─PropagationModelPrep [866dd2b4] is fixed to version 0.0.14
 └─restricted to versions 0.14.4-0.14 by LongwaveModePropagator [38c6559a] — no versions left
   └─LongwaveModePropagator [38c6559a] log:
     ├─possible versions are: 0.3.5 or uninstalled
     ├─restricted to versions 0.2-0.3 by PropagationModelPrep [866dd2b4], leaving only versions: 0.3.5
     │ └─PropagationModelPrep [866dd2b4] log: see above
     └─LongwaveModePropagator [38c6559a] is fixed to version 0.3.5

Any help would be appreciated as I am a total noob.

Here is the FULL Example of steps I took explicity###

Steves-MBP:VLFImaging srkaeppler$ julia
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.9.2 (2023-07-05)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

(@v1.9) pkg> add /Users/srkaeppler/research/data/VLFImaging/SatelliteToolbox.jl

  
(@v1.9) pkg> add /Users/srkaeppler/research/data/VLFImaging/GeographicLib.jl
    

(@v1.9) pkg> add Test Dates
  

(@v1.9) pkg> resolve
  

(@v1.9) pkg> add /Users/srkaeppler/research/data/VLFImaging/LongwaveModePropagator.jl
     

(@v1.9) pkg> add /Users/srkaeppler/research/data/VLFImaging/LMPTools.jl
   .

julia> Pkg.status()
Status `~/.julia/environments/v1.9/Project.toml`
  [336ed68f] CSV v0.10.11
  [459566f4] DiffEqCallbacks v2.29.1
  [6a86dc24] FiniteDiff v2.21.1
  [c96ba436] GeographicLib v0.4.1 `/Users/srkaeppler/research/data/VLFImaging/GeographicLib.jl#master`
  [a98d9a8b] Interpolations v0.14.7
  [0f8b85d8] JSON3 v1.13.2
  [9da4b389] LMPTools v0.2.3 `/Users/srkaeppler/research/data/VLFImaging/LMPTools.jl#main`
  [38c6559a] LongwaveModePropagator v0.3.5 `/Users/srkaeppler/research/data/VLFImaging/LongwaveModePropagator.jl#main`
  [2774e3e8] NLsolve v4.5.1
  [1dea7af3] OrdinaryDiffEq v6.55.0
  [d96e819e] Parameters v0.12.3
  [6ac157d9] SatelliteToolbox v0.9.3 `/Users/srkaeppler/research/data/VLFImaging/SatelliteToolbox.jl#master`
  [90137ffa] StaticArrays v1.6.2
  [856f2bd8] StructTypes v1.10.0
  [ade2ca70] Dates
  [8dfed614] Test

########## now try to install the difficult package...

(@v1.9) pkg> add /Users/srkaeppler/research/data/VLFImaging/PropagationModelPrep
     Cloning git-repo `/Users/srkaeppler/research/data/VLFImaging/PropagationModelPrep`
    Updating git-repo `/Users/srkaeppler/research/data/VLFImaging/PropagationModelPrep`
   Resolving package versions...
   Installed FFTW_jll ──────── v3.3.10+0
   Installed IntelOpenMP_jll ─ v2023.2.0+0
   Installed MKL_jll ───────── v2023.2.0+0
   Installed FFTW ──────────── v1.7.1
   Installed AbstractFFTs ──── v1.5.0
   Installed IterTools ─────── v1.8.0
   Installed Polynomials ───── v3.2.13
   Installed DSP ───────────── v0.7.8
  Downloaded artifact: IntelOpenMP
  Downloaded artifact: FFTW
    Updating `~/.julia/environments/v1.9/Project.toml`
  [866dd2b4] + PropagationModelPrep v0.0.15 `/Users/srkaeppler/research/data/VLFImaging/PropagationModelPrep#main`
    Updating `~/.julia/environments/v1.9/Manifest.toml`
  [621f4979] + AbstractFFTs v1.5.0
  [717857b8] + DSP v0.7.8
  [7a1cc6ca] + FFTW v1.7.1
  [c8e1da08] + IterTools v1.8.0
⌅ [f27b6e38] + Polynomials v3.2.13
  [866dd2b4] + PropagationModelPrep v0.0.15 `/Users/srkaeppler/research/data/VLFImaging/PropagationModelPrep#main`
  [f5851436] + FFTW_jll v3.3.10+0
  [1d5cc7b8] + IntelOpenMP_jll v2023.2.0+0
  [856f044c] + MKL_jll v2023.2.0+0
        Info Packages marked with ⌅ have new versions available but compatibility constraints restrict them from upgrading. To see why use `status --outdated -m`
Precompiling project...
  ✓ NonlinearSolve
  ✓ OrdinaryDiffEq
  ✓ LongwaveModePropagator
  17 dependencies successfully precompiled in 253 seconds. 190 already precompiled.
  3 dependencies precompiled but different versions are currently loaded. Restart julia to access the new versions
  1 dependency had warnings during precompilation:
┌ MKL_jll [856f044c-d86e-5d09-b602-aeab76dc8ba7]
│   Downloading artifact: MKL
└  


#### now try the big deal

(@v1.9) pkg> add /Users/srkaeppler/research/data/VLFImaging/SubionosphericVLFInversionAlgorithms.jl
     Cloning git-repo `/Users/srkaeppler/research/data/VLFImaging/SubionosphericVLFInversionAlgorithms.jl`
    Updating git-repo `/Users/srkaeppler/research/data/VLFImaging/SubionosphericVLFInversionAlgorithms.jl`
    Updating registry at `~/.julia/registries/General.toml`
   Resolving package versions...
ERROR: Unsatisfiable requirements detected for package PropagationModelPrep [866dd2b4]:
 PropagationModelPrep [866dd2b4] log:
 ├─possible versions are: 0.0.15 or uninstalled
 ├─PropagationModelPrep [866dd2b4] is fixed to version 0.0.15
 └─restricted to versions 0.0.13-0.0.14 by SubionosphericVLFInversionAlgorithms [0803ec96] — no versions left
   └─SubionosphericVLFInversionAlgorithms [0803ec96] log:
     ├─possible versions are: 0.0.12 or uninstalled
     └─SubionosphericVLFInversionAlgorithms [0803ec96] is fixed to version 0.0.12

if I try:
(@v1.9) pkg> add /Users/srkaeppler/research/data/VLFImaging/PropagationModelPrep#v0.0.14
   Resolving package versions...
ERROR: Unsatisfiable requirements detected for package Interpolations [a98d9a8b]:
 Interpolations [a98d9a8b] log:
 ├─possible versions are: 0.3.6-0.14.7 or uninstalled
 ├─restricted to versions 0.13 by PropagationModelPrep [866dd2b4], leaving only versions: 0.13.0-0.13.6
 │ └─PropagationModelPrep [866dd2b4] log:
 │   ├─possible versions are: 0.0.14 or uninstalled
 │   └─PropagationModelPrep [866dd2b4] is fixed to version 0.0.14
 └─restricted to versions 0.14.4-0.14 by LongwaveModePropagator [38c6559a] — no versions left
   └─LongwaveModePropagator [38c6559a] log:
     ├─possible versions are: 0.3.5 or uninstalled
     ├─restricted to versions 0.2-0.3 by PropagationModelPrep [866dd2b4], leaving only versions: 0.3.5
     │ └─PropagationModelPrep [866dd2b4] log: see above
     └─LongwaveModePropagator [38c6559a] is fixed to version 0.3.5

Upvotes: 1

Views: 427

Answers (1)

PaSTE
PaSTE

Reputation: 4623

You can add unregistered packages in GitHub directly by passing the URL of the repository:

(MyProject) pkg> add https://github.com/fgasdia/PropagationModelPrep

You can specify a tag, a commit, or a branch by adding # and the tag, commit, or branch name at the end of the URL:

(MyProject) pkg> add https://github.com/fgasdia/PropagationModelPrep#v0.0.14

Upvotes: 0

Related Questions