-
Notifications
You must be signed in to change notification settings - Fork 0
Preprocessor target fix #31
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
Conversation
…ocessor unsendability
| logger.debug("Exiting semaphore '%s' with value '%i'", self._semaphore.name, self._semaphore.value) | ||
|
|
||
| if self._semaphore is not None: | ||
| self._semaphore.__exit__(*exc) # releases the semaphore |
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.
Why do we manually call __exit__? Shouldn't be close enough?
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.
We need either release or __exit__ (implicit release via provided context manager) here.
My thoughts here were, that if in newer versions of the posix_ipc library __exit__ implies more work or better exception handling that we already support it with this implementation. However, since we currently have to use a fixed version of the library we can cross-check with that particular implementation. Basically, I don't mind either approach.
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.
Okay, I think its fine. Was just wondering if it has any particular reasoning, but I guess relying on the context manager behavior is fine
| try: | ||
| cfg: ConfigParser = parse_configs(filenames or default_locations(HOMCC_CONFIG_FILENAME)) | ||
| except Error as err: | ||
| print(f"{err}; using default configuration instead") |
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.
Do we have to use print here because we have not initialized logging yet?
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.
Exactly, yes!
This PR's primary goal is to keep side effects that might occur during preprocessing which is triggered by -MD and related flags with their many resulting edge cases:
find_dependenciesandArguments.dependency_findingwere reworked such that if the execution of arguments leads to the creation of an explicit dependency file, that dependencies will be read from that file (rather than executing the preprocessor again and reading dependencies fromstdout)-MTAdditional changes:
skipifchecks for tests whether a specific tool (g++,clang++,schroot) is installed were refactored to their respective@pytest.mark.toolmarkersclientandserversubprocesswrapper classes