Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't precompile package (LoadError: could not open file) #29

Open
efaulhaber opened this issue Dec 17, 2020 · 1 comment
Open

Can't precompile package (LoadError: could not open file) #29

efaulhaber opened this issue Dec 17, 2020 · 1 comment

Comments

@efaulhaber
Copy link

For a simple testing action, I tried using the following workflow:

name: CI

on: push

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - name: Check out project
        uses: actions/checkout@v2
      - name: Set up Julia
        uses: julia-actions/setup-julia@v1
        with:
          version: '1.5.2'
      - name: Build package
        uses: julia-actions/julia-buildpkg@v1
      - name: Run tests
        uses: julia-actions/julia-runtest@v1

This workflow fails with

  [2f01184e] SparseArrays
  [10745b16] Statistics
  [8dfed614] Test
  [cf7118a7] UUIDs
  [4ec0a83e] Unicode
ERROR: LoadError: could not open file /home/runner/work/Numerik4/Numerik4/src/interpolation/interpolation.jl
Stacktrace:
 [1] include(::Function, ::Module, ::String) at ./Base.jl:380
 [2] include at ./Base.jl:368 [inlined]
 [3] include(::String) at /home/runner/work/Numerik4/Numerik4/src/Numerik4.jl:1
 [4] top-level scope at /home/runner/work/Numerik4/Numerik4/src/Numerik4.jl:13
 [5] include(::Function, ::Module, ::String) at ./Base.jl:380
 [6] include(::Module, ::String) at ./Base.jl:368
 [7] top-level scope at none:2
 [8] eval at ./boot.jl:331 [inlined]
 [9] eval(::Expr) at ./client.jl:467
 [10] top-level scope at ./none:3
in expression starting at /home/runner/work/Numerik4/Numerik4/src/Numerik4.jl:13
ERROR: LoadError: Failed to precompile Numerik4 [f3a1b8d1-e5d1-4887-8cc0-bff5bbf1cb5d] to /home/runner/.julia/compiled/v1.5/Numerik4/pjzXq_ymcLB.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1305
 [3] _require(::Base.PkgId) at ./loading.jl:1030
 [4] require(::Base.PkgId) at ./loading.jl:928
 [5] require(::Module, ::Symbol) at ./loading.jl:923
 [6] include(::String) at ./client.jl:457
 [7] top-level scope at none:6
in expression starting at /home/runner/work/Numerik4/Numerik4/test/runtests.jl:2
ERROR: Package Numerik4 errored during testing
Stacktrace:
 [1] pkgerror(::String) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/Pkg/src/Types.jl:52
 [2] test(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}; coverage::Bool, julia_args::Cmd, test_args::Cmd, test_fn::Nothing) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/Pkg/src/Operations.jl:1578
 [3] test(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}; coverage::Bool, test_fn::Nothing, julia_args::Cmd, test_args::Cmd, kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/Pkg/src/API.jl:327
 [4] #test#61 at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/Pkg/src/API.jl:67 [inlined]
 [5] test(; name::Nothing, uuid::Nothing, version::Nothing, url::Nothing, rev::Nothing, path::Nothing, mode::Pkg.Types.PackageMode, subdir::Nothing, kwargs::Base.Iterators.Pairs{Symbol,Bool,Tuple{Symbol},NamedTuple{(:coverage,),Tuple{Bool}}}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/Pkg/src/API.jl:80
 [6] top-level scope at none:1

Line 2 in runtests.jl is just using Numerik4.
Line 13 in Numerik4.jl is include("interpolation/interpolation.jl") (first line after module Numerik4 and some using lines).

I tried running the exact same lines from the source code of julia-buildpkg and julia-runtest in my ubuntu-latest VM with Julia 1.5.2 installed (that's why I'm using 1.5.2 in the workflow. It failed with 1.5.3 too). Everything works as expected there.
I also tried with julia-runtest@master.

@DilumAluthge
Copy link
Member

In your GitHub Actions workflow file, try replacing this line...

uses: julia-actions/julia-runtest@v1

... with this line instead:

run: julia --project -e 'import Pkg; Pkg.test()'

If you do that, do you still see the error?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants