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

Make @include_using the default catch-all behavior #51

Merged
merged 5 commits into from
May 26, 2024

Conversation

disberd
Copy link
Owner

@disberd disberd commented May 26, 2024

This PR makes the use of @include_using obsolete as it becomes the default when doing a catchall-import (e.g. @fromparent import *).

It now adds an equivalent opt out fake macro @exclude_using to have the 0.7 behavior where all names brought into the target scope with using statements are not imported with catch-all.

As this is now by default re-exporting everything, this PR also added another step in the filtering process of names to import.
At the moment, whenever a name to be imported in the calling Pluto notebook is already defined (and not pointing to some value/function defined withint the previous version of the target package itself), it is skipped.
When there is a clash between a name to import an a name already existing in the caller module (which is tied to a different object than the one imported by the target package), a warning will be issued like below:
image

Copy link

codecov bot commented May 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.43%. Comparing base (498aeea) to head (5993171).

Current head 5993171 differs from pull request most recent head 7db98e4

Please upload reports for the commit 7db98e4 to get more accurate results.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #51      +/-   ##
==========================================
+ Coverage   99.42%   99.43%   +0.01%     
==========================================
  Files          16       16              
  Lines        1209     1234      +25     
==========================================
+ Hits         1202     1227      +25     
  Misses          7        7              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@disberd disberd merged commit 8f7b9a0 into master May 26, 2024
0 of 7 checks passed
@disberd disberd deleted the default_include_using branch June 4, 2024 12:28
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