Skip to content

Conversation

@MichaelChirico
Copy link
Collaborator

@MichaelChirico MichaelChirico commented Mar 7, 2025

Part of #2191 -- continuing #2819. Also progress on #2737.

This one caught a pretty big gap in our current linter logic, as noted in #2820. Those are addressed here.

I left the new include_s4_slots=FALSE by default since apparently TRUE is only needed in one place to pass the current fuzz suite.

@codecov
Copy link

codecov bot commented Mar 7, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.27%. Comparing base (30d1e8e) to head (c11dc39).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2821   +/-   ##
=======================================
  Coverage   99.27%   99.27%           
=======================================
  Files         128      128           
  Lines        7165     7188   +23     
=======================================
+ Hits         7113     7136   +23     
  Misses         52       52           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Base automatically changed from fuzz-pipe to main July 24, 2025 20:14
R/source_utils.R Outdated
} else {
res <- function_call_cache[names(function_call_cache) %in% function_names]
}
if (include_s4_slots) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since we have 4 branches anyway, we might as well make them parallel, WDYT?

if (!is.null(function_names)) {
  if (include_s4_slots) {
    res <- combine_nodesets(function_call_cache, s4_slot_cache)
  } else {
    res <- function_call_cache
  }
} else {
  if (include_s4_slots) {
    res <- combine_nodesets(
      function_call_cache[names(function_call_cache) %in% function_names],
      s4_slot_cache[names(s4_slot_cache) %in% function_names]
    )
  } else {
    res <- function_call_cache[names(function_call_cache) %in% function_names]
  }
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Works for me! The only downside I saw was repeating the clutter-ish names(function_call_cache) %in% function_names, so I pulled that into a variable. I think that also saves us the "embarassment" of having to disable unnecessary_nesting_linter() which is not equipped to allow "highly parallel" if/else structures like that.

@AshesITR AshesITR merged commit 175065c into main Jul 26, 2025
21 checks passed
@AshesITR AshesITR deleted the fuzz-dollar branch July 26, 2025 07:15
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.

3 participants