Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd a --nightly | -n flag to mach run commands for linux #19947
Conversation
highfive
commented
Feb 4, 2018
|
Thanks for the pull request, and welcome! The Servo team is excited to review your changes, and you should hear from @glennw (or someone else) soon. |
highfive
commented
Feb 4, 2018
|
Heads up! This PR modifies the following files:
|
d19f510
to
e81328f
| if is_windows(): | ||
| print("The nightly flag is not supported on windows yet.") | ||
| sys.exit(1) | ||
| os_prefix = "windows-msvc" |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
o0Ignition0o
Feb 5, 2018
Author
Contributor
Good catch ! I was actually working on a multi platform solution, and then decided to split the merge requests. I'll remove it :)
e81328f
to
e115b5a
|
|
e115b5a
to
ed3911b
|
r? @jdm Sorry about the delay; let's get a more appropriate reviewer on this. |
|
Hi :) |
ca0721a
to
ed3911b
This looks weird, but I'm not really sure it's related to the changes I've made, any thoughts ? |
|
You can ignore the taskcluster failure. |
|
Ok thanks ! |
|
Hey there :) is anyone available for some suggestions or a code review ? I'm not at home but I'll ask on IRC as soon as I come home :) |
|
Ugh, sorry for forgetting about this. I'll review it today. |
|
This looks really great! Thanks! |
| env = self.build_env() | ||
| env["RUST_BACKTRACE"] = "1" | ||
|
|
||
| servo_cmd = [bin or self.get_binary_path(release, dev)] + params | ||
| servo_cmd = [bin or self.get_nightly_binary_path( | ||
| nightly.strip()) or self.get_binary_path(release, dev)] + params |
This comment has been minimized.
This comment has been minimized.
| e.reason)) | ||
| sys.exit(1) | ||
| except AttributeError as e: | ||
| print("Could not fetch a nightly version for date {} and platform {} ".format( |
This comment has been minimized.
This comment has been minimized.
| # (eg /foo/bar/baz.tar.gz extracts to /foo/bar/baz) | ||
| destination_file = path.join( | ||
| nightly_target_directory, file_to_download) | ||
| destination_folder = destination_file[:destination_file.index('.')] |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Add a --nightly | -n flag to mach run commands for linux First tries to download and extract a specific nightly version to run mach commands against. <!-- Please describe your changes on the following line: --> I chose to split the Pull requests for each platform to avoid submitting a huge one, and to make sure I get the logic right. I'm able to download / extract a nightly version, and I keep nightly versions in the target folder. Windows and Mac OS support will be filed in separate PRs. This is part of step two for #19505 The mentor on the issue is jdm --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [X] These changes do not require tests because it is part of a ./mach command. <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19947) <!-- Reviewable:end -->
|
|
|
|
Ok I found two ways to handle this issue:
I think using "" as default would be more elegant, but I can understand that CommandArgument / public api consistency might be more important. |
bea6150
to
67a7a26
|
Ok I went for the empty default string, please let me know if you think the other approach is better :) |
|
@bors-servo try |
Add a --nightly | -n flag to mach run commands for linux First tries to download and extract a specific nightly version to run mach commands against. <!-- Please describe your changes on the following line: --> I chose to split the Pull requests for each platform to avoid submitting a huge one, and to make sure I get the logic right. I'm able to download / extract a nightly version, and I keep nightly versions in the target folder. Windows and Mac OS support will be filed in separate PRs. This is part of step two for #19505 The mentor on the issue is jdm --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [X] These changes do not require tests because it is part of a ./mach command. <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19947) <!-- Reviewable:end -->
|
@bors-servo try |
|
@o0Ignition0o Another option would be to strip the value inside get_nightly_binary_path once it has been checked for None. |
67a7a26
to
aa7b43b
…version to run mach commands against. This currently only work on linux, but windows and mac os support will follow in subsequent PRs.
aa7b43b
to
10822ce
|
It is indeed a better approach ! |
|
@bors-servo r+ |
|
|
Add a --nightly | -n flag to mach run commands for linux First tries to download and extract a specific nightly version to run mach commands against. <!-- Please describe your changes on the following line: --> I chose to split the Pull requests for each platform to avoid submitting a huge one, and to make sure I get the logic right. I'm able to download / extract a nightly version, and I keep nightly versions in the target folder. Windows and Mac OS support will be filed in separate PRs. This is part of step two for #19505 The mentor on the issue is jdm --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [X] These changes do not require tests because it is part of a ./mach command. <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19947) <!-- Reviewable:end -->
|
|
Windows support for the --nightly | -n flag to mach run commands. <!-- Please describe your changes on the following line: --> Add windows support to the -n flag. --- Followup to #19947 , this PR will add windows support to the -n flag. This is part of step two for #19505 <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). The feature does not work just yet, I'm able to download and extract the archive, but it's not running the executable yet. @tigercosmos might be a good reviewer on this one :) <!-- Either: --> - [ ] There are tests for these changes OR - [X] These changes do not require tests because they're part of a ./mach command. <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20122) <!-- Reviewable:end -->
o0Ignition0o commentedFeb 4, 2018
•
edited by jdm
First tries to download and extract a specific nightly version to run mach commands against.
I chose to split the Pull requests for each platform to avoid submitting a huge one, and to make sure I get the logic right.
I'm able to download / extract a nightly version, and I keep nightly versions in the target folder.
Windows and Mac OS support will be filed in separate PRs.
This is part of step two for #19505
The mentor on the issue is jdm
./mach build -ddoes not report any errors./mach test-tidydoes not report any errorsThis change is