Skip to content

Conversation

@ben-schwen
Copy link
Member

@ben-schwen ben-schwen commented Dec 22, 2025

Closes #7501
Follows #7492

@MichaelChirico
Copy link
Member

I think #7492 omitted NEWS because it was fixing an issue in dev; I guess this needs NEWS because 1.18.0 will already be on CRAN? I guess this will need to simmer a bit to answer that with certainty.

@ben-schwen
Copy link
Member Author

I think #7492 omitted NEWS because it was fixing an issue in dev; I guess this needs NEWS because 1.18.0 will already be on CRAN? I guess this will need to simmer a bit to answer that with certainty.

True, but I guess that depends on whether we were able to submit 1.18.0. With all the revdeps failing, I'm not so sure about it...

@codecov
Copy link

codecov bot commented Dec 22, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.04%. Comparing base (dc1dbe9) to head (156f4ff).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #7500   +/-   ##
=======================================
  Coverage   99.04%   99.04%           
=======================================
  Files          87       87           
  Lines       16694    16699    +5     
=======================================
+ Hits        16534    16539    +5     
  Misses        160      160           

☔ 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.

@github-actions
Copy link

github-actions bot commented Dec 22, 2025

No obvious timing issues in HEAD=set_delete
Comparison Plot

Generated via commit 156f4ff

Download link for the artifact containing the test results: ↓ atime-results.zip

Task Duration
R setup and installing dependencies 2 minutes and 59 seconds
Installing different package versions 22 seconds
Running and plotting the test cases 5 minutes and 5 seconds

@TysonStanley
Copy link
Member

I think #7492 omitted NEWS because it was fixing an issue in dev; I guess this needs NEWS because 1.18.0 will already be on CRAN? I guess this will need to simmer a bit to answer that with certainty.

True, but I guess that depends on whether we were able to submit 1.18.0. With all the revdeps failing, I'm not so sure about it...

Not sure either, I've asked Kurt about it. Will let you know when he tells me. Asked what the priority is (getting a fix on CRAN with needing a patch in the next month or waiting to get it on CRAN until after the holidays).

R/data.table.R Outdated
ok = selfrefok(x, verbose=FALSE)
if (ok < 1L) {
# Table is not safe to resize (either fresh from disk or shallow copy)
setalloccol(x, n=eval(getOption("datatable.alloccol")), verbose=FALSE)
Copy link
Member

Choose a reason for hiding this comment

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

Unfortunately, this only fixes x in the environment of set. Now set needs to reassign x in the caller's environment. Would this be enough, or do we need the deeper magic from [.data.table?

xsub <- substitute(x)
# setalloccol(...)
eval(
  substitute(
    x <- xnew,
    list(x = xsub, xnew = x)
  ),
  parent.frame()
)

Copy link
Member

Choose a reason for hiding this comment

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

    if ((is.null(value) || (is.list(value) && any(vapply_1b(value, is.null)))) && selfrefok(x, verbose=FALSE) < 1L) {
      name = substitute(x)
      setalloccol(x, verbose=FALSE)
      if (is.name(name)) {
        assign(as.character(name), x, parent.frame(), inherits=TRUE)
      }
    }

Copy link
Member

Choose a reason for hiding this comment

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

?

Copy link
Member

Choose a reason for hiding this comment

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

Are we expecting people to call set() on sub-expressions (e.g. set(foo[[bar]]$baz, i, j, value))? If not, this should definitely work, thank you!

Copy link
Member Author

Choose a reason for hiding this comment

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

well if someone is putting set on sub-expressions, he should probably self assign the results anyway

@ben-schwen ben-schwen merged commit 64e9ec1 into master Dec 23, 2025
12 checks passed
@ben-schwen ben-schwen deleted the set_delete branch December 23, 2025 12:54
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.

revdep set needs setalloccol if selfref not ok

5 participants