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

feat: use rules_multitool #161

Merged
merged 10 commits into from
Mar 8, 2024
Merged

feat: use rules_multitool #161

merged 10 commits into from
Mar 8, 2024

Conversation

alexeagle
Copy link
Member

@alexeagle alexeagle commented Feb 24, 2024

Suggestions from 1.0 API design review.
I'll followup with other provided tools in a subsequent PR after we are happy with the shape of this one.

  • bzlmod users no longer have a fetch that's still hanging out in WORKSPACE.bzlmod
  • the name of the repo is prefixed with aspect_rules_lint. so we don't worry about collisions

Type of change

  • New feature or functionality (change which adds functionality)

For changes visible to end-users

  • Relevant documentation has been updated

Test plan

  • Covered by existing test cases

multitool/defs.bzl Outdated Show resolved Hide resolved
multitool/defs.bzl Outdated Show resolved Hide resolved
@alexeagle alexeagle changed the title feat: provide yamlfmt without boilerplate feat: use rules_multitool Mar 6, 2024
@alexeagle
Copy link
Member Author

FYI @mark-thm

So far this just replaces the most obvious subset of formatters that have
four binaries for Mac/Linux x86_64/arm64.

The pattern can be extended to provide more tools by default.
We should NOT try to continue the pattern to anything that requires additional Bazel rules to provide a runtime, such as Prettier.
@alexeagle
Copy link
Member Author

Oh there's still a bug in rules_multitool. I see that I'm downloading tools for all platforms rather than only for the host platform. @mark-thm want me to file an issue on the repo?

@mark-thm
Copy link
Contributor

mark-thm commented Mar 6, 2024

@alexeagle it's unclear to me what the right behavior is here, but I threw together theoremlp/rules_multitool#12 as a candidate fix.

it no longer fetches tools for all platforms"
@alexeagle
Copy link
Member Author

That bug was fixed in theoremlp/rules_multitool#16 (thanks!) so this should be ready to go @jbedard

@jbedard
Copy link
Member

jbedard commented Mar 8, 2024

Have you looked at the CI failures?

@mark-thm
Copy link
Contributor

mark-thm commented Mar 8, 2024

You need 0.4.0 to resolve those (it contains the fix that allows you to have a top-level $schema key)

@alexeagle alexeagle merged commit 90a71ad into main Mar 8, 2024
8 checks passed
@alexeagle alexeagle deleted the use_multitool branch March 8, 2024 19:56
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.

3 participants