Skip to content

No longer use fileinput when generating COMInterfaces as it breaks parallel builds#13367

Merged
michaelDCurran merged 3 commits into
nvaccess:masterfrom
lukaszgo1:I13290
Mar 10, 2022
Merged

No longer use fileinput when generating COMInterfaces as it breaks parallel builds#13367
michaelDCurran merged 3 commits into
nvaccess:masterfrom
lukaszgo1:I13290

Conversation

@lukaszgo1

Copy link
Copy Markdown
Contributor

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 fileinput module 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 fileinput anymore - 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:

  • Pull Request description:
    • description is up to date
    • change log entries
  • Testing:
    • Unit tests
    • System (end to end) tests
    • Manual testing
  • API is compatible with existing add-ons.
  • Documentation:
    • User Documentation
    • Developer / Technical Documentation
    • Context sensitive help for GUI changes
  • UX of all users considered:
    • Speech
    • Braille
    • Low Vision
    • Different web browsers
    • Localization in other languages / culture than English

@seanbudd

Copy link
Copy Markdown
Member

We are also considering reverting #13226

@lukaszgo1

Copy link
Copy Markdown
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 LeonarddeR left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking this!

Comment thread source/comInterfaces_sconscript Outdated
@lukaszgo1

Copy link
Copy Markdown
Contributor Author

@LeonarddeR All addressed.

@michaelDCurran michaelDCurran merged commit 6e39f7f into nvaccess:master Mar 10, 2022
@nvaccessAuto nvaccessAuto added this to the 2022.1 milestone Mar 10, 2022
@lukaszgo1 lukaszgo1 deleted the I13290 branch March 10, 2022 07:03
@feerrenrut feerrenrut modified the milestones: 2022.1, 2022.2 Mar 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Generation of comInterfaces sometimes fails when it is being done in parallel.

6 participants