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

Modify toolchain/autoupdate_testdata.py to use scripts/scripts_utils.py #4227

Merged
merged 1 commit into from
Aug 19, 2024

Conversation

hamphet
Copy link
Contributor

@hamphet hamphet commented Aug 19, 2024

The current toolchain/autoupdate_testdata.py script assumes the correct bazel version is already installed. This change uses scripts/scripts_utils.py to fallback to bazelisk.

@github-actions github-actions bot requested a review from jonmeow August 19, 2024 01:17
@hamphet hamphet marked this pull request as draft August 19, 2024 15:07
Copy link
Contributor

@jonmeow jonmeow left a comment

Choose a reason for hiding this comment

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

Thanks! Sorry about the inconvenience with this.

toolchain/autoupdate_testdata.py Outdated Show resolved Hide resolved
toolchain/autoupdate_testdata.py Outdated Show resolved Hide resolved
@jonmeow
Copy link
Contributor

jonmeow commented Aug 19, 2024

Is the __init__.py necessary? I think it may be causing the issue for pre-commit execution.

@hamphet hamphet force-pushed the autoupdate-bazelisk branch 2 times, most recently from ce45a9e to 9b464cb Compare August 19, 2024 15:20
@hamphet
Copy link
Contributor Author

hamphet commented Aug 19, 2024

Thanks for the suggestions, looks much better!

@hamphet hamphet marked this pull request as ready for review August 19, 2024 15:26
@github-actions github-actions bot requested a review from chandlerc August 19, 2024 15:26
Copy link
Contributor

@jonmeow jonmeow left a comment

Choose a reason for hiding this comment

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

mypy isn't doing great here, and carbon-lang is a nuisance for a directory name; can you use run_bazel.py for this?

toolchain/autoupdate_testdata.py Outdated Show resolved Hide resolved
toolchain/autoupdate_testdata.py Outdated Show resolved Hide resolved
@hamphet hamphet force-pushed the autoupdate-bazelisk branch from 9b464cb to 3c8d410 Compare August 19, 2024 16:54
@jonmeow jonmeow enabled auto-merge August 19, 2024 17:12
@jonmeow jonmeow added this pull request to the merge queue Aug 19, 2024
Merged via the queue into carbon-language:trunk with commit 6414ca9 Aug 19, 2024
7 checks passed
@hamphet hamphet deleted the autoupdate-bazelisk branch August 19, 2024 17:32
github-merge-queue bot pushed a commit that referenced this pull request Aug 22, 2024
I think `paths.parents[2]` is easier to read than
`path.parent.parent.parent`, just applying uniformly. I'd noticed this
while looking at #4227

Also remove a couple `resolve()` calls that shouldn't be necessary since
`__file__` is absolute (elsewhere in the same files, `resolve()` is used
to resolve potentially relative paths)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants