No longer use fileinput when generating COMInterfaces as it breaks parallel builds#13367
Merged
Conversation
5 tasks
Member
|
We are also considering reverting #13226 |
Contributor
Author
|
Note that even if #13226 gets reverted this PR should still be merged since, as @michaelDCurran said, allowing people to build in parallel is still beneficial. |
LeonarddeR
suggested changes
Feb 21, 2022
LeonarddeR
left a comment
Collaborator
There was a problem hiding this comment.
Thanks for taking this!
Contributor
Author
|
@LeonarddeR All addressed. |
LeonarddeR
approved these changes
Feb 21, 2022
michaelDCurran
approved these changes
Mar 10, 2022
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Link to issue number:
Fixes #13290
Related to this thread on nvda-devel by @MarcoZehe
Summary of the issue:
PR #13226 started building nVDA in parallel. While this offers significant speed improvements the way in which we were generating COMInterfaces was not thread safe. The issue was caused by the
fileinputmodule which redirects stdout to a given file and this cannot be done in multiple threads at the same time. Also, as discovered by @MarcoZehe in the thread linked above when stdout is redirected to a file some other build step which is executing in a separate thread can write to it and the text which should be shown on screen ends up in the COMInterface file.Description of how this pull request fixes the issue:
Were not using
fileinputanymore - the IDE friendly content is generated in memory and then written to the file afterwards.Testing strategy:
Made sure that COMInterfaces can be generated from a clean checkout.
Known issues with pull request:
None known
Change log entries:
None needed.
Code Review Checklist: