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

fix: Downgrade mustExist errors to a warning #385

Merged
merged 2 commits into from
Apr 18, 2024

Conversation

gadenbuie
Copy link
Member

Fixes #330

As described in the issue, globals::globalsOf(mustExist = TRUE) sometimes has false positives, for metaprogramming issues or when encountering a symbol that is defined later but that would be valid at runtime.

This PR downgrades mustExist errors to a warning message. Doing so requires two calls to globals::globalsOf():

  1. The first call uses mustExist = FALSE. Ignoring potentially non-existant globals might lead to other errors that are masked by the mustExist = TRUE case.

  2. The second call uses mustExist = TRUE. If an error occurs at this step, then we downgrade "failed to locate" errors to a warning, otherwise we rethrow.

Copy link
Collaborator

@schloerke schloerke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@schloerke schloerke merged commit cd33616 into main Apr 18, 2024
17 checks passed
@schloerke schloerke deleted the fix/330-downgrade-must-exist-error branch April 18, 2024 14:11
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.

Breaking changes to Appdriver tests with new version 0.2.1
2 participants