[Commented On] D10538: tests: allow trunk versions of clang-format to be used
spectral (Kyle Lippincott)
phabricator at mercurial-scm.org
Tue Sep 7 19:12:20 UTC 2021
spectral added a comment.
In D10538#164587 <https://phab.mercurial-scm.org/D10538#164587>, @durin42 wrote:
> In D10538#160330 <https://phab.mercurial-scm.org/D10538#160330>, @spectral wrote:
>
>> I think that the worst that can happen with this change is:
>> a. clang-format makes a backwards-incompatible change
>
> This has happened (in the past, anyway) pretty regularly. When I asked djasper about it, his answer was "you should check in the clang-format binary you want to test against" which we obviously can't do. :/
One thing I noticed: currently the check is for >= major version 11. So presumably we *already* have these version skew issues, we're just not detecting 'trunk' as being likely-recent.
In D10538#164634 <https://phab.mercurial-scm.org/D10538#164634>, @marmoute wrote:
> The CI running on Heptapod is available to any developer who pushs draft to it, and it uses the "correct" black version, pinned in the docker image what we uses for the CI.
> Something we have been entertaining for a while is to a manually trigger a CI "job" that would run the black formatter one current stack and push back the result to heptapod. This would give a simple option to format with the right version when the CI complains about it. It looks like it could fit the @spectral usecase here.
> (The docker image can be easily updated to newer version when appropriate by anyone creating a Merge request here: https://foss.heptapod.net/octobus/ci-dockerfiles/)
While this is/would be very useful, it requires manual action, I think? My goal is to prevent that. I want/need there to be a single command I can run that ensures a commit is ready to land: correctly formatted, tests pass, etc.; there's a reason these check-format tests exist as tests. :/
Ideally I'd be able to list features (like `black,clang-format`) or tests (`test-check-format.t,test-check-clang-format.t`) that if they're skipped due to missing features they're treated as //errors//. My copy of black seems to have broken itself somehow, and I only noticed because I explicitly went looking for these format checking tests being skipped, knowing that it's been a problem in the past.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D10538/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D10538
To: spectral, #hg-reviewers, durin42
Cc: marmoute, durin42, martinvonz, joerg.sonnenberger, mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mercurial-scm.org/pipermail/mercurial-patches/attachments/20210907/afab705f/attachment-0001.html>
More information about the Mercurial-patches
mailing list