This is an archive of the discontinued LLVM Phabricator instance.

[UTC] Fix git URL regex
Needs RevisionPublic

Authored by hnrklssn on Jul 5 2023, 5:38 AM.

Details

Reviewers
nikic
Summary

The previous git URL regex only matched SSH urls, starting with 'git@'.
If the repo was cloned using a https URL it would not match.

rdar://105239218

Diff Detail

Event Timeline

hnrklssn created this revision.Jul 5 2023, 5:38 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 5 2023, 5:38 AM
hnrklssn requested review of this revision.Jul 5 2023, 5:38 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 5 2023, 5:38 AM

This patch has already been landed as 6d64faf. This is my first time requesting a post-commit review (since I broke the buildbot and the fix was trivial), so please let me know if I missed something in that process.

nikic added inline comments.Jul 5 2023, 5:42 AM
llvm/utils/UpdateTestChecks/common.py
1576

I think this needs to be more permissive than that. E.g. my installed clang version is clang version 15.0.7 (Fedora 15.0.7-2.fc37) and my development version is just clang version 17.0.0 because I have git detection disabled. (If this is the same as clang -v.)

hnrklssn added inline comments.Jul 5 2023, 7:15 AM
llvm/utils/UpdateTestChecks/common.py
1576

Do you think (\w+ version )[\d.]+( \([\w.:/@ -]+\))? would work well, or should we go all out with (\w+ version )[\d.]+.*?

hnrklssn added inline comments.Jul 5 2023, 7:41 AM
llvm/utils/UpdateTestChecks/common.py
1576

Looking into the various possible custom version outputs, I think this is a reasonable approach that works well for all outputs that don't contain the " character: (\w+ version )[\d.]+.*(?=\")

hnrklssn updated this revision to Diff 537356.Jul 5 2023, 7:44 AM

Handle lack of git URL, as well as custom additions to the version message.

nikic requested changes to this revision.Jul 6 2023, 12:41 AM

Superseded by D154520, I believe.

This is my first time requesting a post-commit review (since I broke the buildbot and the fix was trivial), so please let me know if I missed something in that process.

Generally, post-commit review means that someone sees your commit and leaves a comment on it -- it's not necessary to submit an actual review for it after the fact.

This revision now requires changes to proceed.Jul 6 2023, 12:41 AM