You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Store module private variables in module, not in locals
Summary:
When loaded symbols are no longer reexported (D30534539), module private symbols (e. g. loaded symbols) are stored in local stack.
This diff changes privates to store them in module itself (like with public module variables).
The reasons for this diff:
* eventually replace `ValueRef` with explicit cell objects
* to implement loaded constants propagation
This diff it useful as is because it improves error message on trying to import private symbols. For example, for this code:
```
# a.bzl
x = 1
# b.bzl
load("a.bzl", "x")
# c.bzl
load("b.bzl", "x")
```
Previously error message was `Variable 'x' not found`, now error message is `Module symbol 'x' is not exported`.
Reviewed By: ndmitchell
Differential Revision: D30561707
fbshipit-source-id: 309948560569f48f00e520424edaf1a197c0ff70
0 commit comments