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

WIP: Add bazel info starlark-environments-proto #24817

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hauserx
Copy link
Contributor

@hauserx hauserx commented Jan 2, 2025

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: gist

Need decision

Dump of issues noticed that need to be fixed as well:

  • Some common rule attributes are missing documentation, documentation seems to be in HTML pages for those:
    PredefinedAttributes
  • Documentation for some native rules is in comments, like here:
    /*<!-- #BLAZE_RULE (NAME = alias, FAMILY = General)[GENERIC_RULE] -->
    and its parsed out by BuildDocCollector from source files...
  • There are two forms of links, see e.g. select:
    • <a href=\"${link common-definitions#configurable-attributes}\">
    • <a href=\"../builtins/Label.html\">
  • Not yet supported symbols:
    • Actions (StructsImpl), AnalysisFailureInfo, CcToolchainConfigInfo, PackageSpecificationInfo,
    • apple_common, android_common, attr, config, coverage_common, java_common
  • Completely missing:
    • bind
  • Missing attributes for:
    • cc_proto_library, java_binary
  • Missing docs:
    • config_settings, constraint_value
  • Special cases:
    • None, True, False
    • experimental_java_library_export_do_not_use
  • Remove symbol names starting with _
  • Remove params starting with $, also with : (:action_listener)
  • Sort params - e.g. alias should have mandatory actual as one of first
  • Support VENDOR file
  • Support WORKSPACE file
  • What with params like generator_name, are those not available and should be filtered out?
  • What to do with AutoloadSymbols which does not seem to be well supported? Like android_library.

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

Successfully merging this pull request may close these issues.

1 participant