Skip to content

Windows support for the --nightly | -n flag to mach run commands. #20122

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

Merged
merged 1 commit into from
Mar 16, 2018

Conversation

o0Ignition0o
Copy link
Contributor

@o0Ignition0o o0Ignition0o commented Feb 26, 2018

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

  • ./mach build -d does not report any errors
  • ./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 :)

  • There are tests for these changes OR
  • These changes do not require tests because they're part of a ./mach command.

This change is Reviewable

@highfive
Copy link

Thanks for the pull request, and welcome! The Servo team is excited to review your changes, and you should hear from @pcwalton (or someone else) soon.

@highfive
Copy link

Heads up! This PR modifies the following files:

  • @wafflespeanut: python/servo/command_base.py, python/servo/post_build_commands.py

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Feb 26, 2018
@o0Ignition0o o0Ignition0o force-pushed the mach_run_nightly_windows branch from 336a10b to b97aa8e Compare February 26, 2018 07:04
@tigercosmos
Copy link
Contributor

I guess we should merge #19947, and then go to work on this. The two code are overlaid.

@jdm jdm assigned jdm and unassigned pcwalton Feb 26, 2018
@o0Ignition0o
Copy link
Contributor Author

Yeah definitely ! :)

Copy link
Member

@jdm jdm left a comment

Choose a reason for hiding this comment

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

This looks like a good improvement on the original PR. Thanks!

print("Extracting to {} ...".format(destination_folder))
if is_windows():
command = 'msiexec /a {} /qn TARGETDIR={}' \
.format(os.path.join(nightlies_folder, destination_file), destination_folder)
Copy link
Member

Choose a reason for hiding this comment

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

Let's use this formatting instead:

command = 'msiexec /a {} /qn TARGETDIR={}'.format(
    path.join(...), destination_folder)

bin_folder = path.join(destination_folder, "servo")
if is_windows():
bin_folder = path.join(destination_folder, "PFiles", "Mozilla research", "Servo Tech Demo")
print(path.join(bin_folder, "servo{}".format(BIN_SUFFIX)))
Copy link
Member

Choose a reason for hiding this comment

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

Do we still need this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think I could extract the .msi archive to %temp% and just keep the .exe file instead :)

Copy link
Member

Choose a reason for hiding this comment

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

I was asking about the print, but it's worth a try!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh I see, no it's debug code I use (I seem to get the right path but when I try to ./mach run with a path to the executable it just won't ^^
I guess as soon as I figure it out I'll remove the WIP tag on the PR (Probably this weekend :))

@jdm jdm added S-needs-code-changes Changes have not yet been made that were requested by a reviewer. and removed S-awaiting-review There is new code that needs to be reviewed. labels Mar 5, 2018
@bors-servo
Copy link
Contributor

☔ The latest upstream changes (presumably #19947) made this pull request unmergeable. Please resolve the merge conflicts.

@highfive highfive added the S-needs-rebase There are merge conflict errors. label Mar 7, 2018
@o0Ignition0o o0Ignition0o force-pushed the mach_run_nightly_windows branch from b97aa8e to 887fcf6 Compare March 11, 2018 16:07
@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-needs-code-changes Changes have not yet been made that were requested by a reviewer. labels Mar 11, 2018
@o0Ignition0o o0Ignition0o force-pushed the mach_run_nightly_windows branch from 887fcf6 to a132a9b Compare March 11, 2018 16:50
@o0Ignition0o o0Ignition0o changed the title [WIP] Windows support for the --nightly | -n flag to mach run commands. Windows support for the --nightly | -n flag to mach run commands. Mar 11, 2018
@o0Ignition0o
Copy link
Contributor Author

o0Ignition0o commented Mar 11, 2018

This should be reviewable now.
Please not I have not been able to run the executable on my windows virtual machine (but I still couldn't do so when downloading and running it manually). So extra caution / trying to run it on windows would be more than appreciated ^^'

The command to run would be

./mach run -n 2018-02-25 https://mozilla.org

@jdm
Copy link
Member

jdm commented Mar 11, 2018

Is there a difference if you run a windows nightly since March 1? There was a two month period in which we broke nightlies on windows at startup.

@o0Ignition0o
Copy link
Contributor Author

o0Ignition0o commented Mar 11, 2018

I got the same result as I ran

PS C:\Users\jerem\Documents\Mozilla\servo> .\mach.bat run -n 2018-03-08 https://mozilla.org

The window seems to open and closes instantly.
The same behaviour happens when I run the Windows Build ZIP from https://download.servo.org/ so I'm pretty convinced it has to do with my setup
Edit :

Failed to create window.: NoAvailablePixelFormat (thread main, at libcore\result.rs:916)

This is definitely related to my VM setup x)

@jdm
Copy link
Member

jdm commented Mar 16, 2018

Let's go ahead and merge this. If anybody tests it in a non-VM environment they can let us know how it goes.
@bors-servo r+

@bors-servo
Copy link
Contributor

📌 Commit a132a9b has been approved by jdm

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. S-needs-rebase There are merge conflict errors. labels Mar 16, 2018
@bors-servo
Copy link
Contributor

⌛ Testing commit a132a9b with merge f5c1f51...

bors-servo pushed a commit that referenced this pull request Mar 16, 2018
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 -->
@bors-servo
Copy link
Contributor

☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-css1, mac-rel-css2, mac-rel-wpt1, mac-rel-wpt2, mac-rel-wpt3, mac-rel-wpt4, windows-msvc-dev
Approved by: jdm
Pushing f5c1f51 to master...

@bors-servo bors-servo merged commit a132a9b into servo:master Mar 16, 2018
@highfive highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Mar 16, 2018
@o0Ignition0o o0Ignition0o deleted the mach_run_nightly_windows branch December 8, 2018 12:51
@o0Ignition0o o0Ignition0o mentioned this pull request Dec 8, 2018
5 tasks
bors-servo pushed a commit that referenced this pull request Dec 22, 2018
./mach run -n on mac os.

<!-- Please describe your changes on the following line: -->
Add macos support to the -n flag.

Followup to #20122 , this PR will add macos 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).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because this mach command does not build anything

<!-- 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/22387)
<!-- Reviewable:end -->
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.

6 participants