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

Closed
restonslacker opened this Issue May 16, 2016 · 3 comments

Comments

Projects
None yet
3 participants
@restonslacker
Contributor

restonslacker commented May 16, 2016

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

This comment has been minimized.

Show comment
Hide comment
@jangorecki

jangorecki May 16, 2016

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.

Member

jangorecki commented May 16, 2016

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

Closes #1706 library(data.table) fails if "Packaged" field is not pr…
…esent in DESCRIPTION

alternate approach to this issue which avoids call to try()
@restonslacker

This comment has been minimized.

Show comment
Hide comment
@restonslacker

restonslacker May 16, 2016

Contributor

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

Contributor

restonslacker commented May 16, 2016

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

arunsrinivasan added a commit that referenced this issue May 20, 2016

Merge pull request #1707 from restonslacker/bug/onAttach_Packaged_check
Closes #1706, library(data.table) fails if "Packaged" field is not pr…
@arunsrinivasan

This comment has been minimized.

Show comment
Hide comment
@arunsrinivasan

arunsrinivasan May 20, 2016

Member

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

Member

arunsrinivasan commented May 20, 2016

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

@arunsrinivasan arunsrinivasan added the bug label May 20, 2016

@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