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

bpart: Also partition the export flag #57405

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

Keno
Copy link
Member

@Keno Keno commented Feb 14, 2025

Whether or not a binding is exported affects the binding resolution of any downstream modules that using the module that defines the binding. As such, it needs to fully participate in the invalidation mechanism, so that code which references bindings whose resolution may have changed get properly invalidated.

To do this, move the exportp flag from Binding into a separate bitflag set that gets or'd into the BindingPartition ->kind field. Note that we do not move publicp in the same way since it does not affect binding resolution.

There is currently no mechanism to un-export a binding, although the system is set up to support this in the future (and Revise may want it). That said, at such a time, we may need to revisit the above decision on publicp.

Lastly, I will note that this adds a fair number of additional invalidations. Most of these are unnecessary, as changing an export only affects the downstream users not the binding itself. I am planning to tackle this as part of a larger future PR that avoids invalidation when this is not required.

Fixes #57377

@KristofferC KristofferC added the backport 1.12 Change should be backported to release-1.12 label Feb 14, 2025
@KristofferC KristofferC mentioned this pull request Feb 14, 2025
23 tasks
Whether or not a binding is exported affects the binding resolution of
any downstream modules that `using` the module that defines the binding.
As such, it needs to fully participate in the invalidation mechanism,
so that code which references bindings whose resolution may have changed
get properly invalidated.

To do this, move the `exportp` flag from Binding into a separate bitflag
set that gets or'd into the BindingPartition `->kind` field. Note that
we do not move `publicp` in the same way since it does not affect binding
resolution.

There is currently no mechanism to un-export a binding, although the system
is set up to support this in the future (and Revise may want it). That said,
at such a time, we may need to revisit the above decision on `publicp`.

Lastly, I will note that this adds a fair number of additional invalidations.
Most of these are unnecessary, as changing an export only affects the *downstream*
users not the binding itself. I am planning to tackle this as part of a larger
future PR that avoids invalidation when this is not required.

Fixes #57377
@Keno Keno force-pushed the kf/partitionexport branch from 208b7df to b9b8266 Compare February 14, 2025 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 1.12 Change should be backported to release-1.12
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Export invalidation fails to happen properly (binding partitions)
2 participants