WIP: Add bazel info starlark-environments-proto #24817
Draft
+408
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added
bazel info starlark-environments-proto
command that can be used by LSPs to obtain list of starlark symbols per starlark environment (BUILD file, .bzl file, MODULE file, etc) from running instance of bazel.This PR needs a lot of polishing, but decided to push it early to collect comments from interested parties on related issues - CC-ing @cameron-martin, @withered-magic
Comparison between data exported by this command and data created through
bazel build ...:gen_api_proto
: gistNeed decision
Currently used
builtin.Builtins
for easier comparison with data created by:gen_api_proto
.bazel help builtin-symbols-as-proto
#21936 (review)Current implementation does not fill
global.type
with types, param types orreturn_type
of callables. Need to figure out how to exactly represent types. Decision is related to deciding on the proto - for starlark protos there is a FR to add types: Stardoc protos and ModuleInfoExtractor / starlark_doc_extract should export parameter type annotations for builtin functions #21979Dump of issues noticed that need to be fixed as well:
PredefinedAttributes
bazel/src/main/java/com/google/devtools/build/lib/rules/Alias.java
Line 110 in b8073bb
select
:<a href=\"${link common-definitions#configurable-attributes}\">
<a href=\"../builtins/Label.html\">
actual
as one of firstVENDOR
fileWORKSPACE
filegenerator_name
, are those not available and should be filtered out?