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

Mark module_extension or tag_class deprecated #24843

Open
mering opened this issue Jan 7, 2025 · 2 comments
Open

Mark module_extension or tag_class deprecated #24843

mering opened this issue Jan 7, 2025 · 2 comments
Labels
team-Core Skyframe, bazel query, BEP, options parsing, bazelrc type: feature request untriaged

Comments

@mering
Copy link

mering commented Jan 7, 2025

Description of the feature request:

Add a flag to mark module extensions or single tag classes deprecated and print a warning to the user when used.

Which category does this issue belong to?

Core

What underlying problem are you trying to solve with this feature?

Help users migrate away from deprecated features.

Which operating system are you running Bazel on?

No response

What is the output of bazel info release?

No response

If bazel info release returns development version or (@non-git), tell us how you built Bazel.

No response

What's the output of git remote get-url origin; git rev-parse HEAD ?

No response

Have you found anything relevant by searching the web?

No response

Any other information, logs, or outputs that you want to share?

No response

@github-actions github-actions bot added the team-Core Skyframe, bazel query, BEP, options parsing, bazelrc label Jan 7, 2025
@fmeum
Copy link
Collaborator

fmeum commented Jan 7, 2025

While we could a deprecation attribute, couldn't you just print any kind of deprecation message you want in the module extension's implementation function? How would new functionality in Bazel allow you to do better?

@mering
Copy link
Author

mering commented Jan 7, 2025

While we could a deprecation attribute, couldn't you just print any kind of deprecation message you want in the module extension's implementation function? How would new functionality in Bazel allow you to do better?

  1. IIUC print() is marked as debug while deprecation is a warning.
  2. Buildifier linter warns/fails for print() statement. So one always has to add a comment to disable the linter in repos where this is enforced.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-Core Skyframe, bazel query, BEP, options parsing, bazelrc type: feature request untriaged
Projects
None yet
Development

No branches or pull requests

5 participants