JuliaMolSim / Molly.jl

Molecular simulation in Julia
Other
371 stars 51 forks source link

Hotfix for Julia 1.9 #118

Closed axsk closed 1 year ago

axsk commented 1 year ago

Using the new extension system, it seems the dualize function defined in FordwardDiff's ForwardDiffStaticArraysExt extension module is not importable (at least I could not manage to do it).

However, since the signature defined here (in Molly) is only used from within Zygote, I supposed it's safe to simply define it independent of ForwardDiff's dualize. Maybe this dualize could/should be called offset_dualize to clearly distinguish it?

Using this little trick allowed me to load Molly on 1.9.0rc1. However, I couldn't run Pkg.test because it fails due to some GL stuff not working (running it on a remote node without even an display server) and I was not using the differentiable capabilities so far, so I cannot say anything about correctness.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (a2076b0) 83.77% compared to head (3c10607) 83.77%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #118 +/- ## ======================================= Coverage 83.77% 83.77% ======================================= Files 33 33 Lines 3969 3969 ======================================= Hits 3325 3325 Misses 644 644 ``` | [Impacted Files](https://codecov.io/gh/JuliaMolSim/Molly.jl/pull/118?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaMolSim) | Coverage Δ | | |---|---|---| | [src/zygote.jl](https://codecov.io/gh/JuliaMolSim/Molly.jl/pull/118?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaMolSim#diff-c3JjL3p5Z290ZS5qbA==) | `79.53% <100.00%> (ø)` | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaMolSim). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaMolSim)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

jgreener64 commented 1 year ago

Thanks for fixing this. I asked on Slack and it seems that this function is indeed not importable. Looks good to me.

On machines where there is no display you can run the tests with VISTESTS=0 julia test/runtests.jl.