Which is the error given by CompatHelper in GitHub and how to solve it?

Hello,
this is my first time with the great PkgTemplates package and interacting with GitHub repository. Apart from the title questions I would like to know how does CompatHelper work? Does it install all the packages in my environment (i.e. those in the file Project.toml) in the cloud in order to test?
Here is the link to the repository.

Thank you very much.

CompatHelper doesn’t test anything. It checks with the General registry whether the compat of your dependencies are up to date, and it they aren’t it makes a PR to update those, with a disclaimer that you should test that it works.

Thanks! Before preparing the question, I updated all the dependencies, committed and synchronized, but CompatHelper gave error again.

Well, your Project.toml isn’t for a package (then it should have a name and uuid at least), so I imagine CompatHelper could be upset about that.

Thanks, I had to remove the Project.toml made by PkgTemplates and made a new one, how could I fix this problem? My package is in development yet.

What was wrong with the Project.toml made by PkgTemplates? You should probably just go back to that one and do whatever changes you need.

1 Like

I do not remember well, but there was some error when precompiling on instantiating, so I tried ] removing all the packages and reinstalling but didn’t work. Then I decided to remove all the Project.toml file (I had read that idea somewhere but for envs, not packages I guess).
You suggestion would be to recover the Project.toml file of a previous commit and work with it again?

I did that and when reinstalling the packages from a fresh Project.toml (the one created by PkgTemplates) I re obtain this error when precompiling:
``
julia> Pkg.precompile()
Precompiling environment…
✗ IntrospectiveStreams
0 dependencies successfully precompiled in 8 seconds. 47 already precompiled.

ERROR: The following 1 direct dependency failed to precompile:

IntrospectiveStreams [2f1adcd6-4cd2-49ed-b5e3-e45b62924b9e]

Failed to precompile IntrospectiveStreams [2f1adcd6-4cd2-49ed-b5e3-e45b62924b9e] to “/home/mmestre/.julia/compiled/v1.9/IntrospectiveStreams/jl_3WWH7M”.
WARNING: AstropyDeprecationWarning: The matrix_product function is deprecated and may be removed in a future version.
Use @ instead. [gala.coordinates.sgr]
WARNING: AstropyDeprecationWarning: The matrix_product function is deprecated and may be removed in a future version.
Use @ instead. [gala.coordinates.orphan]
WARNING: AstropyDeprecationWarning: The matrix_product function is deprecated and may be removed in a future version.
Use @ instead. [gala.coordinates.magellanic_stream]
WARNING: AstropyDeprecationWarning: Issue 12166: object.__dir__ - Python tracker is resolved. See docstring for alternatives. [gala.dynamics.core]
ERROR: LoadError: UndefVarError: @L_str not defined
Stacktrace:
[1] top-level scope
@ :0
[2] #macroexpand#63
@ ./expr.jl:119 [inlined]
[3] macroexpand
@ ./expr.jl:117 [inlined]
[4] docm(source::LineNumberNode, mod::Module, meta::Any, ex::Any, define::Bool)
@ Base.Docs ./docs/Docs.jl:539
[5] docm(source::LineNumberNode, mod::Module, meta::Any, ex::Any)
@ Base.Docs ./docs/Docs.jl:539
[6] var"@doc"(::LineNumberNode, ::Module, ::String, ::Vararg{Any})
@ Core ./boot.jl:539
[7] include(mod::Module, _path::String)
@ Base ./Base.jl:457
[8] include(x::String)
@ IntrospectiveStreams ~/.julia/dev/IntrospectiveStreams/src/IntrospectiveStreams.jl:1
[9] top-level scope
@ ~/.julia/dev/IntrospectiveStreams/src/IntrospectiveStreams.jl:3
[10] include
@ ./Base.jl:457 [inlined]
[11] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::Nothing)
@ Base ./loading.jl:2012
[12] top-level scope
@ stdin:2
in expression starting at /home/mmestre/.julia/dev/IntrospectiveStreams/src/DataMethods.jl:129
in expression starting at /home/mmestre/.julia/dev/IntrospectiveStreams/src/DataMethods.jl:1
in expression starting at /home/mmestre/.julia/dev/IntrospectiveStreams/src/IntrospectiveStreams.jl:1
in expression starting at stdin:2
Stacktrace:
[1] pkgerror(msg::String)
@ Pkg.Types ~/.julia/juliaup/julia-1.9.0-rc2+0.x64.linux.gnu/share/julia/stdlib/v1.9/Pkg/src/Types.jl:69
[2] precompile(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; internal_call::Bool, strict::Bool, warn_loaded::Bool, already_instantiated::Bool, timing::Bool, kwargs::Base.Pairs{Symbol, Base.TTY, Tuple{Symbol}, NamedTuple{(:io,), Tuple{Base.TTY}}})
@ Pkg.API ~/.julia/juliaup/julia-1.9.0-rc2+0.x64.linux.gnu/share/julia/stdlib/v1.9/Pkg/src/API.jl:1556
[3] precompile(pkgs::Vector{Pkg.Types.PackageSpec}; io::Base.TTY, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ Pkg.API ~/.julia/juliaup/julia-1.9.0-rc2+0.x64.linux.gnu/share/julia/stdlib/v1.9/Pkg/src/API.jl:156
[4] precompile(pkgs::Vector{Pkg.Types.PackageSpec})
@ Pkg.API ~/.julia/juliaup/julia-1.9.0-rc2+0.x64.linux.gnu/share/julia/stdlib/v1.9/Pkg/src/API.jl:145
[5] precompile(; name::Nothing, uuid::Nothing, version::Nothing, url::Nothing, rev::Nothing, path::Nothing, mode::Pkg.Types.PackageMode, subdir::Nothing, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ Pkg.API ~/.julia/juliaup/julia-1.9.0-rc2+0.x64.linux.gnu/share/julia/stdlib/v1.9/Pkg/src/API.jl:171
[6] precompile()
@ Pkg.API ~/.julia/juliaup/julia-1.9.0-rc2+0.x64.linux.gnu/share/julia/stdlib/v1.9/Pkg/src/API.jl:162
[7] top-level scope
@ REPL[8]:1

That looks more like a problem with your code than with your Project.toml. Specifically you’re using a custom string L"ϕ₁" without a definition of such strings.

1 Like

Thank you very much! You are right, that function shouldn’t be in that module because there I do not have any plotting package as dependency. That function goes in another module. Problem solved.
I didn’t know that when developing a package and doing ]precompile, it not only parses the environment dependencies but also the local files in the directory. Is my interpretation right?

Is normal that GitHub runs CompatHelper every day for every package I have ? Doesn’t one run out of time quickly?