Skip to content

Commit

Permalink
[starlark] Use namespace in GlobalsBuilder
Browse files Browse the repository at this point in the history
Summary:
Instead of a struct.

This temporarily regresses docs somewhat, but these were already useless anyway, and the rest of the stack fixes them

I updated the generated docs of promptlark as a part of this diff, there's nothing checking that those stay up to date though, which is a bit unfortunate

Test Plan: CI

Reviewed By: stepancheg

Differential Revision: D61778031

fbshipit-source-id: 5601cfc90ae9815c8fcbc10d9413de5c133d35e5
  • Loading branch information
JakobDegen authored and facebook-github-bot committed Oct 23, 2024
1 parent 0b96213 commit 4b5d780
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion antlir/bzl/shape2/bzl2ir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ impl FileLoader for Dependencies {
let module = Module::new();
{
let mut evaluator: Evaluator = Evaluator::new(&module);
let globals = bzl_globals().with_struct("shape_impl", shape).build();
let globals = bzl_globals().with_namespace("shape_impl", shape).build();
evaluator
.eval_module(ast, &globals)
.map_err(starlark::Error::into_anyhow)?;
Expand Down
4 changes: 2 additions & 2 deletions antlir/bzl/starlark_unittest/src/starlark_unittest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,9 @@ fn globals() -> Globals {
LibraryExtension::Json,
LibraryExtension::Typing,
])
.with_struct("unittest", unittest)
.with_namespace("unittest", unittest)
.with(saving_fail)
.with_struct("native", native)
.with_namespace("native", native)
.build()
}

Expand Down

0 comments on commit 4b5d780

Please sign in to comment.