[llvm] [bazel] Fix lit tests with python 3.11+ (PR #87022)

Keith Smiley via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 1 10:03:36 PDT 2024


keith wrote:

I actually wish I had found this issue first since that would have helped a lot.

I was lucky enough to hit the failure on my macOS machine, but had a Linux machine where I wasn't hitting it (but I didn't know why yet). From there I threw a `print(sys.path)` in the first line of the `lit.py` script where I spotted a difference. I also happened to know that it's been an issue in bazel before that `sys.path` changes have broken things. From there I found https://github.com/bazelbuild/bazel/issues/9239 which through some cross links eventually lead me to https://github.com/bazelbuild/bazel/pull/15701 once it was clear it was python version related, and that it was in the name of better hermiticity, I just started looking for a fix.

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


More information about the llvm-commits mailing list