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

toolexec: Add required-packages flag #116

Merged
merged 1 commit into from
Nov 11, 2024
Merged

Conversation

prashantv
Copy link
Contributor

toolexec mode only rewrites packages that have import the errtrace
package, and others are silently ignored which can lead to unintended
missed rewrites.

Accept package selectors of packages that must import errtrace if a
rewrite is required.

Most of this change is setting up the machinery for toolexec flags:

  • Set up a new flagset for toolexec flags, which are only parsed once
    we know we're in toolexec mode.
  • Include a hash of the flag values in the version key as a previously
    cached output may not be valid when flags change. E.g., a previous
    package success should fail if the required-packages flag changes and
    it contains a package that needs a rewrite but is missing the import.

@prashantv prashantv requested a review from abhinav November 10, 2024 23:04
toolexec mode only rewrites packages that have import the errtrace
package, and others are silently ignored which can lead to unintended
missed rewrites.

Accept package selectors of packages that must import errtrace if a
rewrite is required.

Most of this change is setting up the machinery for toolexec flags:
 - Set up a new flagset for toolexec flags, which are only parsed once
   we know we're in toolexec mode.
 - Include a hash of the flag values in the version key as a previously
   cached output may not be valid when flags change. E.g., a previous
   package success should fail if the required-packages flag changes and
   it contains a package that needs a rewrite but is missing the import.
@prashantv prashantv force-pushed the prashant/toolexec-flags branch from ae4efd5 to 5e269d7 Compare November 10, 2024 23:24
@prashantv prashantv merged commit 39cae41 into main Nov 11, 2024
14 checks passed
@prashantv prashantv deleted the prashant/toolexec-flags branch November 11, 2024 00:40
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.

2 participants