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

Precompilation in CI fails on v1.22 #3746

Closed
hexaeder opened this issue May 16, 2024 · 7 comments
Closed

Precompilation in CI fails on v1.22 #3746

hexaeder opened this issue May 16, 2024 · 7 comments

Comments

@hexaeder
Copy link
Contributor

Hello,
in the docs of some package I have JuMP as an indirect dependency. I experience precompile errors in the GH Actions CI on JuMP v1.22, by forcing v1.21 it works. I was not able to reproduce the problem locally.

The stacktrace

Stacktrace:
  [1] top-level scope
    @ ~/.julia/packages/JuMP/Y2NoH/src/macros/@NL.jl.3746.cov:6

implies, that this code

JuMP.jl/src/macros.jl

Lines 470 to 472 in 71c7764

for file in readdir(joinpath(@__DIR__, "macros"))
include(joinpath(@__DIR__, "macros", file))
end

tries to include some coverage file (don't now why it ends up therein my CI) and fails. Maybe it would already help to filter and only include *.jl files?

@odow
Copy link
Member

odow commented May 16, 2024

My suggestion would be to move the documentation build to a new GitHub action job. At the moment it runs after testing, which populates the .cov coverage files:
https://github.com/MakieOrg/GraphMakie.jl/blob/01c606eb7963fdad67ac91847f88a0e938ab3e91/.github/workflows/CI.yml#L44-L62

See JuMP's separate documentation.yml job: https://github.com/jump-dev/JuMP.jl/blob/master/.github/workflows/documentation.yml

@exaexa
Copy link

exaexa commented May 16, 2024

+1ing myself here, getting the same on LTS 1.6 and juMP 1.22. My logs here: https://github.com/COBREXA/COBREXA.jl/actions/runs/9118509444/job/25071800611#step:7:176

I'm using a separate documentation action workflow so I'm honestly quite puzzled on where the cov files come from. Maybe julia-cache action resurrects it from somewhere?

NOTE: it seems non-deterministic, the same code has magically fixed and broken itself again in a few instances already.

@odow
Copy link
Member

odow commented May 16, 2024

I thought the loop and include was a common pattern, but it looks like I must have hit something similar, because elsewhere we also have the endswith(file, ".jl") pattern:
https://github.com/jump-dev/MathOptInterface.jl/blob/8742ceb9f2a6853672f9a5c999d75ea3b162ac03/src/Test/Test.jl#L629-L630

@odow
Copy link
Member

odow commented May 16, 2024

I've audited jump-dev, and I think that's it: https://github.com/search?q=org%3Ajump-dev+readdir&type=code&p=1

@odow
Copy link
Member

odow commented May 16, 2024

Prepping a new release: #3749

it'd be nice to understand why our extensions tests (https://github.com/jump-dev/JuMP.jl/actions/workflows/extension-tests.yml) didn't catch this. I guess because we run each package once, and this only shows up if you run twice, so that the .cov files get cached and included in the subsequent run.

@odow
Copy link
Member

odow commented May 17, 2024

Closing because new release is JuliaRegistries/General#107020

@odow odow closed this as completed May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants