PotentialLearning.jl icon indicating copy to clipboard operation
PotentialLearning.jl copied to clipboard

PotentialLearning main fails to precompile

Open vchuravy opened this issue 1 year ago • 6 comments

Output of status on Julia 1.9

(PotentialLearning) pkg> st
Project PotentialLearning v0.2.2
Status `~/src/PotentialLearning/Project.toml`
  [a963bdd2] AtomsBase v0.3.5
  [aaaa29a8] Clustering v0.15.7
  [2673d5e8] Determinantal v0.2.0
  [31c24e10] Distributions v0.25.107
  [587475ba] Flux v0.14.15
  [a9efe35a] InteratomicPotentials v0.2.6
  [c8e1da08] IterTools v1.10.0
  [429524aa] Optim v1.9.3
⌃ [7f7a1694] Optimization v3.20.2
⌃ [36348300] OptimizationOptimJL v0.1.14
⌃ [42dfb2eb] OptimizationOptimisers v0.1.6
  [bac558e1] OrderedCollections v1.6.3
  [49802e3a] ProgressBars v1.5.1
  [90137ffa] StaticArrays v1.9.3
  [1986cc42] Unitful v1.19.0
  [a7773ee8] UnitfulAtomic v1.0.0
  [ddb6d928] YAML v0.4.9
  [e88e6eb3] Zygote v0.6.69
  [37e2e46d] LinearAlgebra
  [de0858da] Printf
  [9a3f8284] Random
  [10745b16] Statistics v1.9.0
Info Packages marked with ⌃ have new versions available and may be upgradable.

Fails with

julia> using PotentialLearning
[ Info: Precompiling PotentialLearning [82b0a93c-c2e3-44bc-a418-f0f89b0ae5c2]
ERROR: LoadError: UndefVarError: `NNBasisPotential` not defined
Stacktrace:
  [1] top-level scope
    @ ~/src/PotentialLearning/src/Data/utils.jl:108
  [2] include(mod::Module, _path::String)
    @ Base ./Base.jl:457
  [3] include(x::String)
    @ PotentialLearning ~/src/PotentialLearning/src/PotentialLearning.jl:1
  [4] top-level scope

This might be because on this machine I only have the native registry, but then Project.toml should declare compat requirements and the README.md should include the required registries.

vchuravy avatar Mar 29 '24 14:03 vchuravy

The https://github.com/cesmix-mit/PotentialLearning.jl/blob/77fdd82c0ae3556c8d3f4165cba45194f2840629/Project.toml#L30 section is indeed quite bare.

Julia 1.9 now has ]compat to easily edit the section, but we should encode the versions of dependencies we require.

vchuravy avatar Mar 29 '24 15:03 vchuravy

Hi!, thank you for your comment. The readme only has a very short description of the package, but the documentation has a section about how to run the examples. Currently, the packages are installed using the latest registered versions. In the next few days I will update compat.

emmanuellujan avatar Mar 29 '24 15:03 emmanuellujan

Currently, the packages are installed using the latest registered versions. In the next few days I will update compat.

Latest registered where? Not the General registry, right?

vchuravy avatar Mar 29 '24 15:03 vchuravy

Exactly, you need the following registries:

    pkg> registry add https://github.com/JuliaRegistries/General
    pkg> registry add https://github.com/cesmix-mit/CESMIX.git 
    pkg> registry add https://github.com/JuliaMolSim/MolSim.git
    pkg> registry add https://github.com/ACEsuit/ACEregistry

emmanuellujan avatar Mar 29 '24 15:03 emmanuellujan

https://github.com/JuliaLang/Pkg.jl/issues/3845

emmanuellujan avatar Apr 05 '24 22:04 emmanuellujan

In the mean time can you fill out the compat section? This will provide a more useful error to the user.

vchuravy avatar Apr 05 '24 23:04 vchuravy