Skip to content

Conversation

@pfuehrlich-pik
Copy link

Even if package x was already attached when calling local_package(x) x was still detached at the end of the current execution context. This is confusing, because local_* functions should ideally restore the same global state as before. with_package already had a check for that, and with this PR the same check is used for local_package. Furthermore with_package is now implemented using local_package to reduce code duplication. This is also removes the on.exit that with_package was using instead of defer.

@pfuehrlich-pik
Copy link
Author

Any comments on this? Maybe @jimhester ?

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.

1 participant