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

Documenter / GitHub action error due to @compound #14

Closed
AlexisRenchon opened this issue Jan 7, 2022 · 5 comments · Fixed by #15
Closed

Documenter / GitHub action error due to @compound #14

AlexisRenchon opened this issue Jan 7, 2022 · 5 comments · Fixed by #15

Comments

@AlexisRenchon
Copy link

Hi,

I use Documenter to make my docs in a package,
since I started using UnitfulMoles.jl @compound, I get the following error message from GitHub action:

Run julia --project=docs/ docs/make.jl
ERROR: LoadError: Evaluation into the closed module `UnitfulMoles` breaks incremental compilation because the side effects will not be permanent. This is likely due to some other module mutating `UnitfulMoles` with `eval` during precompilation - don't do this.
Stacktrace:
  [1] eval
    @ ./boot.jl:368 [inlined]
  [2] eval
    @ ~/.julia/packages/UnitfulMoles/RTl52/src/UnitfulMoles.jl:1 [inlined]
  [3] getweight(arg::SubString{String})
    @ UnitfulMoles ~/.julia/packages/UnitfulMoles/RTl52/src/UnitfulMoles.jl:168
  [4] var"@compound"(__source__::LineNumberNode, __module__::Module, name::Symbol)
    @ UnitfulMoles ~/.julia/packages/UnitfulMoles/RTl52/src/UnitfulMoles.jl:78
  [5] include
    @ ./Base.jl:417 [inlined]
  [6] 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, UInt64}}, source::String)
    @ Base ./loading.jl:1373
  [7] top-level scope
    @ none:1
  [8] eval
    @ ./boot.jl:368 [inlined]
  [9] eval(x::Expr)
    @ Base.MainInclude ./client.jl:462
 [10] top-level scope
    @ none:1
in expression starting at /home/runner/work/DAMMmodel.jl/DAMMmodel.jl/src/DAMMmodel.jl:12
in expression starting at /home/runner/work/DAMMmodel.jl/DAMMmodel.jl/src/DAMMmodel.jl:1

the expression in DAMMmodel.jl line 12 is @Compound CO2

Is this a known issue? Do you know how to fix it?

@rafaqz
Copy link
Owner

rafaqz commented Jan 7, 2022

Its probably a bug with escaping in the @compound macro.

@AlexisRenchon
Copy link
Author

do you think there is a way around it for Documenter?

@rafaqz
Copy link
Owner

rafaqz commented Jan 7, 2022

We probably just have to fix the macro.

@AlexisRenchon
Copy link
Author

It also crashes for Julia Registry, making UnitfulMoles unusable as a package dependency if you use @Compound.
Same error message, during AutoMerge

@rafaqz
Copy link
Owner

rafaqz commented Jan 10, 2022

Sure, you shouldn't register it anyway with a bug like that ;)

I will look at fixing it today, I imagine its only a small change. But I wrote the code a few years ago so we will see.

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

Successfully merging a pull request may close this issue.

2 participants