Open
Conversation
Owner
ms609
commented
Mar 19, 2026
- Initial R-side prototype from Takazawa et al. 2026
This comment was marked as outdated.
This comment was marked as outdated.
Performance benchmark results
|
Performance benchmark results
|
Performance benchmark results
|
Performance benchmark results
|
Exported functions (thin wrappers) use Rcpp::stop() for input validation — the exception is caught immediately by BEGIN_RCPP/END_RCPP in the generated RcppExports wrapper. Implementation functions retain Rf_error() for defensive guards that should never be reached if wrappers validate correctly (LCOV_EXCL, This pattern avoids C++ exception unwinding through complex stack frames, which can cause std::terminate() on ARM. Revert "Rf_error →Rcpp:stop()" This reverts commit b20e03e. Test R-level guards instead of C++ error paths (ARM safety)
These guards are unreachable when exported wrappers validate correctly. ASSERT() is active in debug builds and compiles to nothing in release.
Rcpp::stop() causes std::terminate() on ARM regardless of call depth. All input validation now happens in R wrappers before entering C++. C++ functions use ASSERT() for debug-only invariant checks. Tests updated to exercise R-level guards instead of calling C++ with deliberately invalid input.
Commit 87e6cd8 removed Rcpp::stop() from C++ and replaced with ASSERT() (compiled out in release). Tests still expected errors from C++ calls. This commit: - mismatch_size(), confusion(): Add R validation wrappers (nTip, nrow checks) shadowing RcppExports versions - consensus_info(): Add R wrapper checking p range and CT_MAX_LEAVES (16383) limit - HierarchicalMutualInfo(): Check tip count mismatch for phylo inputs - test-hmi.cpp.R: Test EHMI() R guards instead of EHMI_xptr() - test-tree_distance.R: Replace direct cpp_* error tests with .ValidateSplitArgs test (R-level validation path) Fixes all 19 test failures from GHA.
Performance benchmark results
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.