bpart: Also partition the export flag #57405
Open
+180
−110
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.
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 movepublicp
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