-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Misc fixes #13017
Misc fixes #13017
Conversation
mesonbuild/utils/universal.py
Outdated
if o: | ||
mlog.debug(f'stdout:\n{o.strip()}\n-----------') | ||
if e: | ||
mlog.debug(f'stderr:\n{e.strip()}\n-----------') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it matters, but this is a slight behavior change: before there would be no debug message for stdout or stderr being only whitespace. Now the stdout:
and stderr:
headers are printed anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that I think about it, I believe that was actually my original reason for writing the original version the way I did. Drat.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything but the commit that was called out earlier looks good to me! Cherry-pick as you wish
It is generally accepted practice to convert dict.keys() to a list before iterating over it and e.g. deleting values, as keys returns a live-action view. In this case, we use the difference of *two* dict keys, which returns a regular non-view set and doesn't need protecting. Iteration order doesn't matter (the set already randomizes it anyway). Avoid the cost of converting to a list.
Popen_safe_logged has a small inefficiency. It evaluates the stripped version of stdout/stderr before checking if it exists, for logging purposes. This would sometimes crash, if it was None instead of ''. Fixes mesonbuild#12979
Any code that needs to know mesonlib.python_command currently assumes the PyInstaller bundle reference is added to the sys module, which means that it assumes the only freeze tool used is PyInstaller. Really, all we need to check is sys.frozen as it's never normally set, but always set for a freeze. We don't care if it was PyInstaller specifically, and we don't need its bundle directory. See mesonbuild#13007
We have two copies of other.h, one of which is generated. If we don't include the include/ directory then building fails unless the custom_target which copies it over, happens to run early enough. On parallel builds this may fall on its face.
1fd7c0f
to
1baabbc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for cleaning it up!
Fixes #12979