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 upWin32 support #9385
Win32 support #9385
Conversation
- Add SERVO_USE_NIGHTLY_RUST env var to use the latest rust/cargo nightly snapshot - Fix up looking for cargo binary (in cargo/bin/cargo, not bin/cargo) - Fix up win32 executable checking (use .exe suffix) - fix up win32 PATH handling (subprocess must use shell=True for PATH change to be honored)
highfive
commented
Jan 20, 2016
|
Heads up! This PR modifies the following files:
|
highfive
commented
Jan 20, 2016
|
I left the python stuff and the sandboxing stuff alone. Reviewed 5 of 14 files at r1, 2 of 3 files at r2, 4 of 9 files at r4. components/gfx/Cargo.toml, line 88 [r4] (raw file): components/servo/Cargo.lock, line 72 [r4] (raw file): components/servo/Cargo.lock, line 913 [r4] (raw file): components/servo/Cargo.lock, line 1660 [r4] (raw file): components/util/Cargo.toml, line 71 [r4] (raw file): ports/gonk/Cargo.lock, line 54 [r4] (raw file): Comments from the review on Reviewable.io |
|
Review status: 6 of 24 files reviewed at latest revision, 6 unresolved discussions. components/gfx/Cargo.toml, line 88 [r4] (raw file): components/servo/Cargo.lock, line 72 [r4] (raw file): components/servo/Cargo.lock, line 913 [r4] (raw file): components/servo/Cargo.lock, line 1660 [r4] (raw file): components/util/Cargo.toml, line 71 [r4] (raw file): ports/gonk/Cargo.lock, line 54 [r4] (raw file): Comments from the review on Reviewable.io |
|
I've looked into some of the Python code. Review status: 6 of 25 files reviewed at latest revision, 9 unresolved discussions. python/servo/command_base.py, line 21 [r4] (raw file): BIN_SUFFIX = '.exe' if sys.platform == 'win32' else ''python/servo/command_base.py, line 46 [r4] (raw file): known_os = {
'linux': 'unknown-linux-gnu',
# all other OSes
}
os_type = 'pc-windows-gnu' if os_type.startswith('mingw64_nt-') else known_os.get(os_type, 'unknown')python/servo/command_base.py, line 65 [r4] (raw file): return int(os.environ.get('SERVO_USE_NIGHTLY_RUST', 0))python/servo/command_base.py, line 77 [r4] (raw file): return subprocess.call(*args, shell = sys.platform == 'win32', **kwargs)python/servo/command_base.py, line 89 [r4] (raw file): def verbose_caller(*args, **kwargs):
# verbose stuff ...
call_func = kwargs.pop('call_func', subprocess.call)
# default to subprocess.call (we could also pass subprocess.check_call to `kwargs`)
return call_func(*args, shell = sys.platform == 'win32', **kwargs)Comments from the review on Reviewable.io |
|
Reviewed 6 of 6 files at r5. Comments from the review on Reviewable.io |
|
components/util/workqueue.rs, line 108 [r5] (raw file): Comments from the review on Reviewable.io |
|
Review status: 12 of 25 files reviewed at latest revision, 7 unresolved discussions. components/compositing/constellation.rs, line 413 [r5] (raw file): python/servo/command_base.py, line 65 [r4] (raw file): Comments from the review on Reviewable.io |
|
python/servo/command_base.py, line 77 [r4] (raw file): Comments from the review on Reviewable.io |
|
Review status: 12 of 25 files reviewed at latest revision, 8 unresolved discussions. python/servo/command_base.py, line 227 [r5] (raw file): Comments from the review on Reviewable.io |
|
Review status: 12 of 25 files reviewed at latest revision, 8 unresolved discussions. python/servo/command_base.py, line 65 [r4] (raw file): python/servo/command_base.py, line 77 [r4] (raw file): Comments from the review on Reviewable.io |
|
python/servo/command_base.py, line 65 [r4] (raw file): This is how I would write it personally:
Comments from the review on Reviewable.io |
|
Review status: 12 of 25 files reviewed at latest revision, 10 unresolved discussions, some commit checks failed. components/servo/lib.rs, line 270 [r5] (raw file): components/servo/lib.rs, line 275 [r5] (raw file): Comments from the review on Reviewable.io |
|
Review status: 12 of 25 files reviewed at latest revision, 9 unresolved discussions, some commit checks failed. components/compositing/constellation.rs, line 413 [r5] (raw file): components/servo/lib.rs, line 270 [r5] (raw file): components/servo/lib.rs, line 275 [r5] (raw file): components/util/workqueue.rs, line 108 [r5] (raw file): python/servo/command_base.py, line 21 [r4] (raw file): python/servo/command_base.py, line 46 [r4] (raw file): python/servo/command_base.py, line 65 [r4] (raw file): python/servo/command_base.py, line 77 [r4] (raw file): python/servo/command_base.py, line 89 [r4] (raw file): Comments from the review on Reviewable.io |
|
@pcwalton can you please look at larsbergstrom@843f983? |
|
Review status: 12 of 25 files reviewed at latest revision, 9 unresolved discussions, some commit checks failed. components/util/workqueue.rs, line 108 [r5] (raw file): python/servo/command_base.py, line 46 [r4] (raw file): Comments from the review on Reviewable.io |
|
python/servo/command_base.py, line 46 [r4] (raw file): Comments from the review on Reviewable.io |
|
Tidy says the following:
And this fails to build in travis due to:
|
|
Review status: 9 of 25 files reviewed at latest revision, 8 unresolved discussions. python/servo/command_base.py, line 77 [r4] (raw file): python/servo/command_base.py, line 89 [r4] (raw file): Comments from the review on Reviewable.io |
|
python/servo/command_base.py, line 77 [r4] (raw file): return subprocess.call(*args, shell=sys.platform == 'win32', **kwargs)
# or
shell= sys.platform == 'win32'
return subprocess.call(*args, shell=shell, **kwargs)or the style checker (flake8) will complain (you could add parens for clarity if you wish). Make sure to retain the comment about the PATH handling on windows. Comments from the review on Reviewable.io |
|
python/servo/command_base.py, line 77 [r4] (raw file): shell = sys.platform == 'win32'for line 5 of my previous post Comments from the review on Reviewable.io |
|
Review status: 9 of 25 files reviewed at latest revision, 8 unresolved discussions. components/util/workqueue.rs, line 108 [r5] (raw file): I also don't understand why this ignores the Comments from the review on Reviewable.io |
|
@larsbergstrom That commit looks good to me. |
|
Review status: 9 of 25 files reviewed at latest revision, 8 unresolved discussions. components/util/workqueue.rs, line 108 [r5] (raw file): python/servo/command_base.py, line 46 [r4] (raw file): python/servo/command_base.py, line 77 [r4] (raw file): python/servo/command_base.py, line 89 [r4] (raw file): Comments from the review on Reviewable.io |
|
Python stuff LGTM |
|
@bors-servo r=frewsxcv,pcwalton,jdm,ecoal95 |
|
|
…oal95 Win32 support r? @frewsxcv for python stuff r? @pcwalton for the "remove usage of Gaol" stuff for Win32 r? anybody else for misc cargo.lock updates, etc. This replaces #7878. This works best with servo/mozjs#71, too, to enable static linking, but can be run without (via some PATH hackery). The instructions are here, and will be added to a .md file in the repo once the mozjs changes also land: https://hackpad.com/Servo-on-Windows-C1LPcI2bP25 I'd like to get these changes landed because I've been rebasing them for months, they're otherwise quite stable, and don't affect our other platforms and targets. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9385) <!-- Reviewable:end -->
|
|
|
|
|
@larsbergstrom Should we move https://hackpad.com/Servo-on-Windows-C1LPcI2bP25 to servo/wiki? |
|
@paulrouget I meant to move it to Readme.md, and will do so in a follow-up. Thanks for the reminder! |
ghost
commented
Jan 27, 2016
|
Great! |
|
@jasonwilliams200k #9406 |
larsbergstrom commentedJan 20, 2016
r? @frewsxcv for python stuff
r? @pcwalton for the "remove usage of Gaol" stuff for Win32
r? anybody else for misc cargo.lock updates, etc.
This replaces #7878.
This works best with servo/mozjs#71, too, to enable static linking, but can be run without (via some PATH hackery).
The instructions are here, and will be added to a .md file in the repo once the mozjs changes also land:
https://hackpad.com/Servo-on-Windows-C1LPcI2bP25
I'd like to get these changes landed because I've been rebasing them for months, they're otherwise quite stable, and don't affect our other platforms and targets.