https://www.boundaryml.com logo
playground viz bugs
# contributing
j
I found a bug with namespaces/graph view and fixed it. https://github.com/BoundaryML/baml/pull/3997
b
Oh, this is interesting - I think the underlying bug here is that function references are not qualified correctly, and the fact that they're getting passed around as strings is wrong @rossir.paulo (BAML) is our playground guy so I'll let him own this, I don't know a lot about the playground internals
j
It did smell like there might be something underlying that's not as intended. For the current implementation the fix makes sense but yeah idk if this is actually the intended implementation to start with because it does seem rather fragile. Who knows maybe we're both wrong and it makes perfect sense lol.
b
Internally our rule is that if you call a function in a different namespace, you must fully qualify it, so e.g. if you're in
baml_src/ns_foo/foo.baml
and you want to call
baml_src/ns_bar/bar.baml::MakeBar()
, you have to write
root.bar.MakeBar()
(the idea being that baml syntax enforces fully qualified cross-namespace references, and that coding agents can therefore do 1-hop reasoning to follow references across files rather than having to search a chain of symbols)
And
root.
is the prefix used for the "current" package (we don't have a package distribution system yet, so only builtin packages like
baml.
assert.
log.
are the only 3p packages your code can reference)
so that's why i'm pretty sure stripping
root.
isn't the right fix, but i'll let paulo say what the plan is for playground is
3 Views