LibCST
LibCST copied to clipboard
Codegen broken in the latest release
I am building the arch package for libcst and am stuck with this failing codegen. I am using the github tarball.
Failed to generated a new /build/python-libcst/src/LibCST-0.4.6/libcst/_typed_visitor.py file, failure is saved in /build/python-libcst/src/LibCST-0.4.6/libcst/_typed_visitor.py.failed_generate.
Traceback (most recent call last):
File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/build/python-libcst/src/LibCST-0.4.6/libcst/codegen/generate.py", line 172, in <module>
sys.exit(main(sys.argv[1:]))
File "/build/python-libcst/src/LibCST-0.4.6/libcst/codegen/generate.py", line 153, in main
codegen_visitors()
File "/build/python-libcst/src/LibCST-0.4.6/libcst/codegen/generate.py", line 76, in codegen_visitors
format_file(visitors_file)
File "/build/python-libcst/src/LibCST-0.4.6/libcst/codegen/generate.py", line 29, in format_file
subprocess.check_call(["ufmt", "format", fname], stdout=devnull, stderr=devnull)
File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ufmt', 'format', '/build/python-libcst/src/LibCST-0.4.6/libcst/_typed_visitor.py']' returned non-zero exit status 1.
Any ideas?
Hmmm, what happens if you run ufmt format /build/python-libcst/src/LibCST-0.4.6/libcst/_typed_visitor.py? Any output?
I am not on the computer, I will try later. But what it seemed to me is that the _typed_visitor.py file is missing because it failed to generate.
That might be the case, and then there should be some more details in /build/python-libcst/src/LibCST-0.4.6/libcst/_typed_visitor.py.failed_generate about the failure that might help