Skip to content

Comments

Change unclear errors to specific warning when no packages are specified#137

Open
LukasWallrich wants to merge 1 commit intotrinker:masterfrom
LukasWallrich:patch-1
Open

Change unclear errors to specific warning when no packages are specified#137
LukasWallrich wants to merge 1 commit intotrinker:masterfrom
LukasWallrich:patch-1

Conversation

@LukasWallrich
Copy link

I am currently using pacman while teaching a course on reproducible research and the students find it very helpful - so thank you for this great package. However, novices make creative mistakes that currently result in unclear error messages, while the intended behaviour seems different.

Specifically, calling p_load() results in Error in match.call(expand.dots = FALSE)[[2]] : subscript out of bounds, while p_load(character.only = TRUE) results in Error in if (p_loaded(char = package)) { : argument is not interpretable as logical

The intended behaviour of the code seems to be to just return invisible()? In the first set of edits, I enable it to reach that condition. However, it would seem likely that these calls are usually mistakes, so that a warning would be helpful? I have added that in line 58. With this, I hope to be able to make a small contribution - of course, I am happy for you to address this in any other way as well.

I am currently using `pacman` while teaching a course on reproducible research and the students find it very helpful - so thank you for this great package. However, novices make creative mistakes that currently result in unclear error messages, while the intended behaviour seems different. 

Specifically, calling `p_load()` results in `Error in match.call(expand.dots = FALSE)[[2]] : subscript out of bounds`, while `p_load(character.only = TRUE)` results in ` Error in if (p_loaded(char = package)) { :  argument is not interpretable as logical` 

The intended behaviour of the code seems to be to just return invisible()? In the first set of edits, I enable it to reach that condition.  However, it would seem likely that these calls are usually mistakes, so that a warning would be helpful? I have added that in line 58. With this, I hope to be able to make a small contribution - of course, I am happy for you to address this in any other way as well.
@coveralls
Copy link

Coverage Status

Coverage remained the same at 0.0% when pulling 6ff4e61 on LukasWallrich:patch-1 into ace0936 on trinker:master.

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.

2 participants