-
Notifications
You must be signed in to change notification settings - Fork 696
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
Add PHONY rules for lint and lint-json #10584
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm generally not sure how much profit we get from such simplistic one-line, three-four-words make rules. This saves very little but makes Makefile bigger and harder to maintain. But I'm not opposed to it. Myself, I don't really use the Makefile.
One more thing I always say about new targets in the Makefile: consider updating the CI to use these targets if you don't want them to bitrot right away.
It can save time:
|
I had but we use cabal/.github/workflows/lint.yml Lines 10 to 18 in 75cac83
|
I'm not saying
Yes, this is my usual beef with GitHub actions that run things -- they foster diverging workflows locally vs. in CI, I think it's a bad design. I wish CI only used setup-actions and running stuff was done via make targets -- we'd have a single source of truth to work with. |
I was showing the time saving by running the recipe for the .PHONY: lint
lint: ## Run HLint
hlint -j . |
@ulysses4ever I agree. It can be hard to run github actions locally without hassle (having tried nektos/act). |
f4ff3d7
to
8aecf89
Compare
It's okay, maybe it was me who wasn't clear enough. Just to reiterate: I doubt that adding a make target as small as |
I think having a documented single source of truth for local checks is an advantage over developers having to dig to find out how we use it locally. CI using it is of course the obvious next step after that, but IIRC I was a bit worried about the way the CI actions worked and didn't want to sit down and research why they looked weird. |
Yes, treating Makefile as documentation is a great idea. I agree. The only issue is that, as always with the docs, it needs active maintenance. In my experience, 50-80% of our Makefile is badly outdated. Calling make in CI could counter that, but I don't see as much energy in that direction as pumping more and more targets into the Makefile has. I think it's a path to nowhere. |
Admittedly I've put more effort into documenting it in |
Sorry, I'm a bit lost here:
I'd prefer 0 bitrot in this repository. I think it's confusing to unsuspected people and therefore harmful. That's why I always bring up this point about exercising the Makefile in CI. Core devs that show up on the calls can do whatever --- they will find their way around bitrot. It's the rest 99% who I'm worried about. |
Label merge+no rebase is necessary when the pull request is from an organisation. |
I think the only way CI wins for something that can easily be checked locally (which is the point of the |
I've been struggling to find what is failing with CI validate runs for #10546. One benefit of running locally is that it is about 30x faster. |
Fixes #10583, adding
PHONY
rules forlint
andlint-json
.significance: significant
in the changelog file.