Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tools/debug/bisect_pair_lines.py fails to compile: SyntaxError: invalid syntax #14696

Closed
jonassmedegaard opened this issue Jul 20, 2021 · 3 comments

Comments

@jonassmedegaard
Copy link

File tools/debug/bisect_pair_lines.py fails to compile:

File "/usr/share/emscripten/tools/debug/bisect_pair_lines.py", line 25
shutil.copyfile(sys.argv[1], 'left')
^
SyntaxError: invalid syntax

@jonassmedegaard
Copy link
Author

Likely directly related to #14074

@jonassmedegaard
Copy link
Author

Comparing with the similar code in tools/debug/bisect_pair_wast.py, maybe this is the fix:

--- a/tools/debug/bisect_pair_lines.py
+++ b/tools/debug/bisect_pair_lines.py
@@ -20,7 +20,7 @@ __rootpath__ = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
 def path_from_root(*pathelems):
   return os.path.join(__rootpath__, *pathelems)

-exec(Path(path_from_root('tools', 'shared.py').read())
+exec(Path(path_from_root('tools', 'shared.py')).read_text())

 shutil.copyfile(sys.argv[1], 'left')
 shutil.copyfile(sys.argv[2], 'right')

I am not strong in python, but at least that silences the error... :-/

@sbc100
Copy link
Collaborator

sbc100 commented Jul 27, 2021

Looks like a lot of the files in the directory could use some attention and possibly we can/should remove some of them.. I've never used them myself in many years working on emscripten.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants