Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

library(data.table) fails if "Packaged" field is not present in DESCRIPTION #1706

Closed
restonslacker opened this issue May 16, 2016 · 3 comments
Labels
Milestone

Comments

@restonslacker
Copy link
Contributor

Recently, R seems to no longer add the "Packaged" field to DESCRIPTION when building from source. This prevents an end-user from loading the dev version because of the "staleness" check in onAttach(). However, "Built" is in there (at least on the systems I tested this against). I will submit a that PR attempts to capture that and use it as a substitute. If that fails, it returns since this check is purely informational.

@jangorecki
Copy link
Member

Looks like we don't have to try() as read.dcf has an argument fields. Check below

read.dcf(system.file("DESCRIPTION", package="data.table"), fields="Packaged")
read.dcf(system.file("DESCRIPTION", package="data.table"), fields="notexistingfield")
# or even
read.dcf(system.file("DESCRIPTION", package="data.table"), fields=c("Packaged","notexistingfield"))

Then we can handle that with is.na.

restonslacker added a commit to restonslacker/data.table that referenced this issue May 16, 2016
…is not present in DESCRIPTION

alternate approach to this issue which avoids call to try()
@restonslacker
Copy link
Contributor Author

there is a new commit that removes the call to try()

arunsrinivasan added a commit that referenced this issue May 20, 2016
Closes #1706, library(data.table) fails if "Packaged" field is not pr…
@arunsrinivasan
Copy link
Member

Just ran into this as well. Thanks for the PR @restonslacker. Merged.

@arunsrinivasan arunsrinivasan added this to the v1.9.8 milestone May 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants