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

Build errors relating to pltrend #394

Closed
morungos opened this issue Dec 10, 2023 · 4 comments
Closed

Build errors relating to pltrend #394

morungos opened this issue Dec 10, 2023 · 4 comments

Comments

@morungos
Copy link
Contributor

Surprisingly, since we merged #385, we've seen build errors. The errors are as follows:

══ Failed tests 
── Error ('test-config-plotting.R:87:5'): plotting works with configurations ───
Error in `eval(substitute(expr), data, enclos = parent.frame())`: object 'pltrend' not found
Backtrace:
    ▆
 1. └─harsat::write_summary_table(...) at test-config-plotting.R:87:5
 2.   └─harsat::ctsm_summary_overview(...)
 3.     └─harsat::ctsm_symbology_OSPAR(out, info, timeSeries, classColour)
 4.       ├─base::with(...)
 5.       └─base::with.default(...)
 6.         └─base::eval(substitute(expr), data, enclos = parent.frame())
 7.           └─base::eval(substitute(expr), data, enclos = parent.frame())

[ FAIL 1 | WARN 0 | SKIP 0 | PASS 21 ]
Error: Error: Test failures
Execution halted

This is interesting, because it isn't in a place where we'd expect changes -- although it is in a place where we have added tests. So it is most likely tests failing due to the context for GitHub actions, and not specially to do with plotting, even though it is looking like it is in substituted contexts. In any event, we do need to sort this out. And, ideally, we need to find out why this doesn't happen when you run devtools::test() or devtools::check() on a normal system.

Looks to me like the issue is odd usage of pltrend as a variable in ctsm_symbology_OSPAR -- I'll take a wild guess that this comes down to exists() and is.na() not doing the same thing. However, the way with() works is masking all the error handling. However, that doesn't explain why the issue is not showing consistently.

Regardless, this is a real issue, as we get failures in the actions.

@morungos
Copy link
Contributor Author

This is likely a blocker, as we will need to fix it to make a new release.

@morungos
Copy link
Contributor Author

Note that the error logs contain quite a few messages:

Error in initializePtr() : 
  function 'cholmod_factor_ldetA' not provided by package 'Matrix'

This suggests a binary incompatibility might be at play: https://stackoverflow.com/a/77532685. That would explain why this only happens in certain environments. I'n using Matrix 1.6-1.1, according to my R Studio, but, sadly, so is the build system.

I did wipe all the caches when I was updating for plots, and fixing a few issues. It may be bad timing that this has caused some weird conflict. Or it might still be some deeper issue.

@morungos
Copy link
Contributor Author

So, I suspect this is some really bad R thing which we are not at all responsible for, but we still need to fix it for GitHub actions, because nobody else will.

@morungos
Copy link
Contributor Author

Closing now, as the workaround of manual deployment of Matrix does allow the tests to complete okay. This means R CMD check works, and we can build.

At some point, we should try removing this extra step, but it's insignificant, and we will need a few months for lme4 to stabilize`.

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

1 participant