[llvm] [llvm-lit] Fixing lit's Internal Shell's Unhashable TypeError (PR #101590)

Paul Kirth via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 2 14:35:56 PDT 2024


ilovepi wrote:

Suggested title:
`[llvm-lit] Fix Unhashable TypeError when using lit's internal shell`

For the description:
```
When using lit's internal shell, commands like ______ result in a type error. This happens because when
____ is called in TestRunner.py its passed a GlobItem, which does not implement Hashable.

We could either implement the required interface, or more simply, ensure that the passed in parameter is of the correct type. expand_glob is used elsewhere to convert GlobItems into _____ types, which are hashable, and is used at the call site to prevent this error. ...
```

You can fill in more details, but this is a more useful type of commit message, and communicates a lot to other developers coming along later. Also, you don't need to use my text verbatim (er even something so long winded!), but something more along these lines would be a big improvement in my opinion.

If you look through the commit logs you'll see there isn't a strong convention in how people describe their patches. Some will be very short, some will be very long, and most somewhere between. However, I'd also encourage you to scan the patch, and see what it does for yourself. After a brief survey, I think you'll agree that when authors provide a sufficiently detailed account of what they did and why, its usually easier to follow the important bits in the patch.

https://github.com/llvm/llvm-project/pull/101590


More information about the llvm-commits mailing list