bazelbuild / bazelbuild/bazel

Add static typing of builtin objects and functions

Open
#28,325 0 comments 0 reactions 1 assignee Claimed by @brandjon View on GitHub
P1 team-Starlark-Interpreter type: feature request
Dominant language
Java
Stars
25.8k
Forks
4.6k
Avg merge
2d 16h
Merged PRs (30d)
72

Description

- [x] `TypeTagger` should type `Binding`s for predeclared/universal symbols by retrieving their `StarlarkType` from the module object. The static `TypeChecker` should make use of this information to catch type errors involving these symbols.
- [x] `StarlarkType`s should be able to report their available field/method names and associated types. These should be queried within `TypeChecker`'s handling of `DotExpression`.
- [ ] Type signatures for builtin objects (e.g. global modules like `attr`, or types like `depset`) should be stored in and retrieved from the `StarlarkClassDescriptor`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.