aspect-build / aspect-workflows-template

Scaffolding for new Aspect workspace
1 stars 1 forks source link

[FR]: bring in ruff via bzlmod #70

Closed jab closed 1 month ago

jab commented 1 month ago

What is the current behavior?

fetch_ruff() is called in WORKSPACE.bazel. Users (especially those who are new to Bazel) could find it confusing that this template sets up all dependencies in MODULE.bazel except for ruff, which is actually hiding in WORKSPACE.bazel (and there's no explanation about this discrepancy). Users may have heard that WORKSPACE files are deprecated and conclude they're getting set up with tech debt out-of-the-box, and may know they'll need to do to something to migrate once Bazel stops supporting WORKSPACE files, but not know what.

Describe the feature

Remove WORKSPACE.bazel and pull in ruff via MODULE.bazel, so bzlmod is used exclusively, and there's only a single file where all dependencies are declared.

https://github.com/aspect-build/rules_lint/issues/279#issuecomment-2160983372 suggests this is possible using multitool.

alexeagle commented 1 month ago

This repo is following the install instructions for rules_lint, so any change belongs there first, FYI