Skip to content

Conversation

@klin333
Copy link

@klin333 klin333 commented Jan 16, 2026

By default, file.info() has extra_cols = TRUE. This gets very annoying on Windows since R4.5.0, which added extra columns which sometimes can fail and give warnings.

All uses of file.info in shiny package does not need these extra columns anyway. So this PR changes file.info() to the R provided convenience functions of file.mtime(), file.size() and file.info(..., extra_cols = FALSE)

@CLAassistant
Copy link

CLAassistant commented Jan 16, 2026

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ gadenbuie
❌ kai-lin-cci
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link
Member

@gadenbuie gadenbuie left a comment

Choose a reason for hiding this comment

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

Thank you!

I think we were using file.info() as an optimization, because file.size() and others call file.info() under the hood, but they also nicely incorporate the extra_cols = FALSE flag and after looking into it a little bit I think the performance benefit is negligible.

# because native.enc is also normally UTF-8 based on *nix)
if (!isWindows()) return('UTF-8')
size <- file.info(file)[, 'size']
size <- file.info(file, extra_cols = FALSE)[, 'size']
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
size <- file.info(file, extra_cols = FALSE)[, 'size']
size <- file.size(file)

@klin333
Copy link
Author

klin333 commented Jan 18, 2026

arghhh... i committed using my employment email address, and when i signed the CLA, github auto put my employment email address wrong, and now i can't re-sign the CLA... Is there something that maintainers can do to allow me to re-sign, and i'll put in the correct email address matching my commits?

really really sorry about this...

@gadenbuie
Copy link
Member

@klin333 thanks but don't worry about the CLA! We've switch Shiny to an MIT license and the CLA is less important now; we'll probably disable the CLA bot soon. And (not to diminish your contribution in any way), this PR isn't likely copyrightable anyway.

@klin333
Copy link
Author

klin333 commented Jan 20, 2026

thanks @gadenbuie. any chance you can help allow this merge through. it seems to be currently stuck at the licensing cla check.

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.

4 participants