Skip to content

Conversation

@MichaelChirico
Copy link
Member

These call sites were identified by gemini; it identified the file name & line number of possible sites, and I reviewed and applied the edits. I instructed it to ignore cases like those mentioned in #7611 (comment) -- they are quite numerous and of questionable value; anyway, they are easy to find with regex. The goal here was to comb the source for places that require a bit more contextualization to classify.

Currently based against #7611.

@codecov
Copy link

codecov bot commented Jan 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.02%. Comparing base (60f2ba2) to head (2b330f3).
⚠️ Report is 1 commits behind head on ro-access.

Additional details and impacted files
@@            Coverage Diff             @@
##           ro-access    #7615   +/-   ##
==========================================
  Coverage      99.02%   99.02%           
==========================================
  Files             87       87           
  Lines          16903    16903           
==========================================
  Hits           16739    16739           
  Misses           164      164           

☔ 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

No obvious timing issues in HEAD=ro-part-ii
Comparison Plot

Generated via commit 2b330f3

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

Task Duration
R setup and installing dependencies 5 minutes and 23 seconds
Installing different package versions 11 minutes and 37 seconds
Running and plotting the test cases 3 minutes and 40 seconds

Copy link
Member

@ben-schwen ben-schwen left a comment

Choose a reason for hiding this comment

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

Went through all of them and LGTM.

But shouldn't the compiler cry anyway when we write at *_RO vectors since it it basically a write at const int?

@ben-schwen ben-schwen merged commit a9f74ec into ro-access Jan 21, 2026
13 checks passed
@ben-schwen ben-schwen deleted the ro-part-ii branch January 21, 2026 08:42
@MichaelChirico
Copy link
Member Author

Went through all of them and LGTM.

But shouldn't the compiler cry anyway when we write at *_RO vectors since it it basically a write at const int?

I agree the compiler should complain if we get one wrong

@MichaelChirico
Copy link
Member Author

(oops @ben-schwen this was targeting the other PR branch, #7611, not master 😬)

@MichaelChirico
Copy link
Member Author

But shouldn't the compiler cry anyway when we write at *_RO vectors since it it basically a write at const int?

Yes... I suppose the maximalist way to fix this would be to just replace INTEGER with INTEGER_RO everywhere, try to compile, iterate. It would wind up including the 100s cases like LOGICAL(narm)[0], generating some code bloat by subverting the very common idiom. I only see 20 files on CRAN doing that (funnily enough, two are ours 😅)

https://github.com/search?q=org%3Acran%20lang%3Ac%20%2FINTEGER_RO%5C(%5Cw%2B%5C)%5C%5B%5Cw%2B%5C%5D%2F&type=code

int istatus = INTEGER_RO(status)[0], nx = INTEGER_RO(x)[0], nk = INTEGER_RO(k)[0];

Another thing to explore could be changing up so that the default is read-only, and defining our own macro for writeable accessors:

  • INTEGER(): current INTEGER_RO()
  • INTEGER_W() - current INTEGER()

But that makes our codebase confusing for outside contributors.

@ben-schwen ben-schwen restored the ro-part-ii branch January 21, 2026 17:32
@ben-schwen
Copy link
Member

(oops @ben-schwen this was targeting the other PR branch, #7611, not master 😬)

I just saw it 🙈
Should I revert?

@MichaelChirico
Copy link
Member Author

I think it's fine to squash+merge both to master, just makes reviewing the other one a little more tedious.

Would you mind reviewing it? It'll be easiest for you since you already reviewed this one.

@ben-schwen ben-schwen deleted the ro-part-ii branch January 21, 2026 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants