This should better address symlinks and other weird situations instead of relying on path string comparisons.
Diff Detail
Diff Detail
Event Timeline
Comment Actions
I think the previous logic should have yielded a fairly stable identifier... do you have an example off-hand of a case that fails?
(i.e., I would have expected the call to os.path.realpath() to have done the moral equivalent of looking up a canonical path based on the inode, which normpath() alone won't do.)
llvm/utils/lit/lit/discovery.py | ||
---|---|---|
51 | .st_ino? |
Comment Actions
I don't have an example of where the former normalization breaks, but it just seemed like this is exactly what inodes were designed for. Plus if realpath is going to look up the inode anyway, might as well use it instead of then converting back into some string. So I think the code will work either way, I just felt better about having a map of integers instead of a map of strings since there's fewer things that could go wrong.
.st_ino?