Change unclear errors to specific warning when no packages are specified#137
Open
LukasWallrich wants to merge 1 commit intotrinker:masterfrom
Open
Change unclear errors to specific warning when no packages are specified#137LukasWallrich wants to merge 1 commit intotrinker:masterfrom
LukasWallrich wants to merge 1 commit intotrinker:masterfrom
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I am currently using
pacmanwhile 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 inError in match.call(expand.dots = FALSE)[[2]] : subscript out of bounds, whilep_load(character.only = TRUE)results inError in if (p_loaded(char = package)) { : argument is not interpretable as logicalThe 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.