trixi-framework / trixi-framework/Trixi.jl
`@muladd` (potentially) breaking Revise.jl when `include`ing other files
- Dominant language
- Julia
- Stars
- 731
- Forks
- 166
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 25
Description
I noticed that when trying to modify `src/callbacks_step/analysis.jl` in a Revise-enabled Julia session, Revise failed because it tried to re-include a file `analysis_dg1d.jl` from the *working directory* (in this case my Trixi root folder) instead of the *relative directory* of the file where the `include` is actually located (i.e., the same directory where `analysis.jl` is located).
For this particular problem I was able to fix the issue by moving the `include`s outside the `@muladd` macro in https://github.com/trixi-framework/Trixi.jl/pull/1288/commits/891b8f8f724a9db81a12ddfc7be7bb7e2101f90b. It thus might make sense to fix this in all files in Trixi. However, first, one should really find out what caused this and if it is a problem for any included file or if there's something special about analysis (since I seem to be the first one who stumbled across this).
Contributor guide
Research direction
Reproduce the Revise failure while modifying src/callbacks_step/analysis.jl, focusing on its include of analysis_dg1d.jl from the working directory. Read the @muladd handling and compare it with the include changes in commit 891b8f8f724a9db81a12ddfc7be7bb7e2101f90b. Done means determining whether other included files are affected and defining a consistent fix.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100