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

Address #1108: enable finalizeOnExit via RCPP_USE_FINALIZE_ON_EXIT #1180

Merged
merged 2 commits into from
Oct 1, 2021

Conversation

Enchufa2
Copy link
Member

Building on #656, closes #1108. As discussed, enables switching default behaviour to finalizeOnExit=true by defining RCPP_USE_FINALIZE_ON_EXIT.

Checklist

  • Code compiles correctly
  • R CMD check still passes all tests
  • Prefereably, new tests were added which fail without the change
  • Document the changes by file in ChangeLog

Copy link
Member

@eddelbuettel eddelbuettel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@codecov
Copy link

codecov bot commented Sep 29, 2021

Codecov Report

Merging #1180 (0ae2df9) into master (1abe59a) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1180   +/-   ##
=======================================
  Coverage   97.44%   97.44%           
=======================================
  Files          64       64           
  Lines        2783     2783           
=======================================
  Hits         2712     2712           
  Misses         71       71           
Impacted Files Coverage Δ
inst/include/Rcpp/XPtr.h 100.00% <ø> (ø)

@Enchufa2
Copy link
Member Author

Some platforms fail, I suppose, because the image has an old version of tinytest which doesn't include expect_stdout. Do you want me to change this in favour of expect_equal(capture.output(...))?

@eddelbuettel
Copy link
Member

Alternatively, just do (as I often do) if (getVersion() < "3.6.0") exit_file("Skip remainder on older test platform") which has the advantages of keeping our main code cleaner / newer as we want it and we don't waste time testing on a less-relevant platform. We do know the underlying test is fine; life is simply too short to spend the wrong part of the 80/20 rule on arcane CI issues. (And I don't know what the cutoff is; you can also directly test packageVersion("tinytest") for suitable cut-off.)

@eddelbuettel eddelbuettel merged commit 556b6d4 into master Oct 1, 2021
@Enchufa2 Enchufa2 deleted the feature/finalizeOnExit branch October 1, 2021 14:03
@Enchufa2 Enchufa2 mentioned this pull request Oct 13, 2021
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 this pull request may close these issues.

Add explicit finalizer signature to XPtr
2 participants