pecan icon indicating copy to clipboard operation
pecan copied to clipboard

`PEcAn.utils::download.file` masks `utils::download.file`. Change name?

Open Aariq opened this issue 3 years ago • 1 comments

https://github.com/PecanProject/pecan/blob/cd3e4c2dc1739b4165574dd1200f73886d80af9a/base/utils/R/utils.R#L647

This might be annoying to users who find base R's download.file() unexpectedly working differently and with different arguments. Consider renaming to download_file()?

Aariq avatar Jul 12 '22 16:07 Aariq

I support renaming it, or possibly retiring it entirely -- I think utils::download.file has gained some functionality in recent R releases that may (though I have not tested) let it handle firewalls natively.

As a historical note, I believe the original design was that PEcan.utils::download.file was supposed to intentionally mask utils::download.file, but to behave identically for users who didn't configure otherwise. But (1) it doesn't actually behave identically (our version ignores method for non-ftp downloads), and (2) as we become more consistent about using namespaces throughout PEcAn it becomes less and less likely that the PEcAn.utils copy will mask the base one effectively enough to be useful for those who did want it.

infotroph avatar Jul 12 '22 19:07 infotroph

@infotroph @Aariq is this issue still up for grabs?

moki1202 avatar Jan 30 '23 12:01 moki1202