Navigation Menu

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

Start on Mach package #11210

Merged
merged 1 commit into from Jun 6, 2016
Merged

Start on Mach package #11210

merged 1 commit into from Jun 6, 2016

Conversation

edunham
Copy link
Contributor

@edunham edunham commented May 16, 2016

Thank you for contributing to Servo! Please replace each [ ] by [X] when the step is complete, and replace __ with appropriate data:

  • ./mach build -d does not report any errors
    • these changes don't touch anything that mach build touches>
  • ./mach test-tidy --faster does not report any errors
    • Tidy errors on some dependencies that I think we'll need for real package but aren't using for android
  • These changes address ./mach package #9918 (github issue number if applicable).

Either:

  • There are tests for these changes OR
  • These changes do not require tests because I don't think Mach has tests yet?

Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process.


This change is Reviewable

@highfive
Copy link

Heads up! This PR modifies the following files:

  • @wafflespeanut: python/mach_bootstrap.py, python/servo/package_commands.py, python/servo/post_build_commands.py

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label May 16, 2016
@larsbergstrom larsbergstrom assigned larsbergstrom and unassigned nox May 16, 2016
@nox
Copy link
Contributor

nox commented May 16, 2016

This fails tidy.

$ ./mach test-tidy --no-progress
Checking files for tidiness...
./python/servo/package_commands.py:12: F401 'glob' imported but unused
./python/servo/package_commands.py:16: F401 'copy2' imported but unused
./python/servo/package_commands.py:16: F401 'copytree' imported but unused
./python/servo/package_commands.py:16: F401 'rmtree' imported but unused
./python/servo/package_commands.py:26: F401 'call' imported but unused
./python/servo/package_commands.py:26: F401 'check_call' imported but unused
./python/servo/package_commands.py:28: E302 expected 2 blank lines, found 1
./python/servo/post_build_commands.py:26: F401 'BuildNotFound' imported but unused

@nox nox added the S-fails-tidy `./mach test-tidy` reported errors. label May 16, 2016
@edunham
Copy link
Contributor Author

edunham commented May 16, 2016

@nox yep, I noted that in the amazing PR template which reminded me to run Tidy. PR is up mainly so @larsberg and I can point at it and discuss.

@nox
Copy link
Contributor

nox commented May 16, 2016

@edunham Oh sorry. :( I'm so accustomed to seeing this snippet of text that I don't notice unusual things in it anymore...

apk_path = binary_path + ".apk"
if not path.exists(apk_path):
result = Registrar.dispatch("package", context=self.context, release=release, dev=dev)
if result is not 0:
Copy link
Contributor

@frewsxcv frewsxcv May 18, 2016

Choose a reason for hiding this comment

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

The is binary operator is used to check references. i.e., (IIRC) it's possible for multiple instances of 0 to exist in memory, so this is not guaranteed to always pass. Whereas singletons, like None, True, and False only exist once in memory so is is okay. So this should maybe be an != operator instead

@larsbergstrom
Copy link
Contributor

Reviewed 2 of 2 files at r1, 2 of 2 files at r2.
Review status: all files reviewed at latest revision, 1 unresolved discussion, some commit checks failed.


Comments from Reviewable

@larsbergstrom
Copy link
Contributor

@edunham If you address the comment from @frewsxcv, we can land this. Or, you can add the initial packaging steps for mac/linux/etc. and we can go from there. Whichever you'd prefer!

@larsbergstrom larsbergstrom 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 May 26, 2016
@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 May 31, 2016
@highfive
Copy link

New code was committed to pull request.

@edunham
Copy link
Contributor Author

edunham commented May 31, 2016

@larsbergstrom Latest commits do naive packaging for OSX/Linux, including creating ./runservo.sh to invoke Servo with browserhtml.

Next steps:

  • Implement a blacklist or whitelist to nuke unneeded files from the release directory -- I've tried messing around with it a little but don't have a deep enough understanding of how Servo works to make good guesses on what's safe to eliminate. Arguably, the presence of any unneeded files in the release directory is actually an error in the build step anyways. edit: done in next commit after this comment
  • Tweak tarball naming if desired -- it's currently of the form 2016-05-31-1053-servo-tech-demo.tar.gz. I've included an hour/minute timestamp for now to assist with debugging -- I imagine we'll run into circumstances where we wonder whether a tarball was built before or after a specific patch landed. Longer-term, we may want to either take a name suffix argument to mach package or munge the names during upload, to differentiate nightlies from other releases.
  • Make the builders run it & upload the artefacts

edunham pushed a commit to edunham/servo that referenced this pull request May 31, 2016
@edunham edunham force-pushed the mach-package branch 4 times, most recently from 63d4672 to 79b983e Compare May 31, 2016 23:37
@highfive
Copy link

New code was committed to pull request.

@edunham
Copy link
Contributor Author

edunham commented May 31, 2016

@larsbergstrom It's all squashed up and ready for final review :)

@CommandProvider
class PackageCommands(CommandBase):
@Command('package',
description='Package Servo (currently, Android APK only)',
Copy link
Contributor

Choose a reason for hiding this comment

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

This comment is now incorrect :-)

@larsbergstrom
Copy link
Contributor

After fixing the one total nit, please squash and r=me!

@jdm jdm added the S-needs-code-changes Changes have not yet been made that were requested by a reviewer. label Jun 1, 2016
@highfive highfive added the S-tests-failed The changes caused existing tests to fail. label Jun 2, 2016
@jdm
Copy link
Member

jdm commented Jun 2, 2016

Checking files for tidiness...

./python/servo/package_commands.py:30: E302 expected 2 blank lines, found 1

./python/servo/package_commands.py:34: E261 at least two spaces before inline comment

./python/servo/package_commands.py:36: E302 expected 2 blank lines, found 1

@jdm jdm removed the S-tests-failed The changes caused existing tests to fail. label Jun 2, 2016
@larsbergstrom
Copy link
Contributor

@edunham Please fix tidy and r=me.

description='Install Servo (currently, Android only)',
category='package')
@CommandArgument('--release', '-r', action='store_true',
help='Package the release build')
Copy link
Contributor

Choose a reason for hiding this comment

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

'Package' -> 'Install'

* Split package commands into their own file
* Delete spurious files from build dir
* Create runservo.sh to invoke servo with the right browserhtml incantation
* Tar it all up with the date and time in the filename
@highfive
Copy link

highfive commented Jun 3, 2016

New code was committed to pull request.

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Jun 3, 2016
@edunham
Copy link
Contributor Author

edunham commented Jun 3, 2016

Latest changes fix tidy errors and switch to using ISO datetime format.

@aneeshusa
Copy link
Contributor

I don't think the tarfile Python module has the right options to support reproducible tarball builds, for example I don't see any way to enforce file ordering. I'd really like to see us have reproducible builds in general, but now that it's June I understand the tech demo is right around the corner; if this is something we have time for now I can dig into it more, otherwise this can be changed after the demo.

@edunham
Copy link
Contributor Author

edunham commented Jun 6, 2016

@aneeshusa I'd like to get a basic package functionality landed so we can add it to the build system -- in the long run there are a lot of areas for improvement.

r? @larsbergstrom

@larsbergstrom
Copy link
Contributor

@bors-servo r+

@bors-servo
Copy link
Contributor

📌 Commit a1a8e08 has been approved by larsbergstrom

@highfive highfive removed the S-awaiting-review There is new code that needs to be reviewed. label Jun 6, 2016
@bors-servo
Copy link
Contributor

⌛ Testing commit a1a8e08 with merge bc52617...

@highfive highfive added the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Jun 6, 2016
bors-servo pushed a commit that referenced this pull request Jun 6, 2016
Start on Mach package

Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data:
- [ ] `./mach build -d` does not report any errors
  - these changes don't touch anything that mach build touches>
- [ ] `./mach test-tidy --faster` does not report any errors
  - Tidy errors on some dependencies that I think we'll need for real `package` but aren't using for android
- [X] These changes address #9918 (github issue number if applicable).

Either:
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because I don't think Mach has tests yet?

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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11210)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel, mac-dev-unit, mac-rel-css, mac-rel-wpt, windows

@bors-servo bors-servo merged commit a1a8e08 into servo:master Jun 6, 2016
@highfive highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Jun 6, 2016
aneeshusa added a commit to aneeshusa/servo-saltfs that referenced this pull request Jun 22, 2016
servo/servo#11210 recently updated `./mach
package` to make it a first-class Mach command and add support for
simple Linux packaging as well (in the form of tarballs). Android used
to be the only packaging target supported, so a naked `./mach package`
sufficed, but now we need to explicitly build the Android packaging.
bors-servo pushed a commit to servo/saltfs that referenced this pull request Jun 23, 2016
…larsbergstrom

Add --android option to ./mach package

servo/servo#11210 recently updated `./mach
package` to make it a first-class Mach command and add support for
simple Linux packaging as well (in the form of tarballs). Android used
to be the only packaging target supported, so a naked `./mach package`
sufficed, but now we need to explicitly build the Android packaging.

Another step for servo/servo#10339.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/saltfs/401)
<!-- Reviewable:end -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-fails-tidy `./mach test-tidy` reported errors.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants