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

Add type information to builtins #11

Open
cameron-martin opened this issue Jan 31, 2024 · 2 comments
Open

Add type information to builtins #11

cameron-martin opened this issue Jan 31, 2024 · 2 comments

Comments

@cameron-martin
Copy link
Owner

#8 added autocomplete to builtins but typed everything as any. We can do better than this since there's a bunch of type information in the protobuf.

@cameron-martin
Copy link
Owner Author

It isn't that obvious to me how to construct non-primitive values of starlark::typing::Ty.

It looks like the only option is to use Ty::starlark_value, which would require generating instances of StarlarkValue from the protobuf.

@hauserx
Copy link
Contributor

hauserx commented Dec 13, 2024

On related note, there is bazelbuild/bazel#21979 which aims to add types to the stardoc output protos for builtin functions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants