google / pytype

A static type analyzer for Python code
https://google.github.io/pytype
Other
4.76k stars 277 forks source link

Commit bd2e0b3 breaks Windows CI #1744

Closed wyattscarpenter closed 1 month ago

wyattscarpenter commented 2 months ago

Commit bd2e0b359074bdccfcef4816279f90a1aaadd2b9, CI: Run testing on Windows and Mac in the same matrix (PiperOrigin-RevId: 662918967) (see also its pull request https://github.com/google/pytype/pull/1740), which otherwise seems like a good commit to me, drastically changes the errors encountered on Windows. Compare:

Previous commit https://github.com/google/pytype/actions/runs/10388692453/job/28764900312#step:6:203

This commit https://github.com/google/pytype/actions/runs/10389950475/job/28769242653#step:6:71

The new errors are stuff like ImportError: DLL load failed while importing cfg: The specified module could not be found., which is not really as tractable-seeming as the previous "oh, just a couple of minor import errors internal to the python tests" situation. So I think this change worsens the Windows CI path by breaking something.

I've tried to do the obvious things to get the Windows CI to work again, like putting its special code back in in conditional, but I couldn't get it to work :/

Meanwhile, I've rolled my main back to 53135b9a I'm getting the less-threatening errors again.

wyattscarpenter commented 2 months ago

Ah, with regard to "do the obvious thing", I eventually figured out that you just have to put the invocation of run_tests.py in the same step as setting the environment variables, and then it works again (you also need to run pip install right before, as well). There's probably a more elegant way to do it. For example, if the program could just find the right library, we could avoid many steps.