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

Ability to save a build and restore it for faster bisecting #14258

Open
shinglyu opened this issue Nov 17, 2016 · 9 comments
Open

Ability to save a build and restore it for faster bisecting #14258

shinglyu opened this issue Nov 17, 2016 · 9 comments

Comments

@shinglyu
Copy link
Member

@shinglyu shinglyu commented Nov 17, 2016

Rational:

When working on layout/css, I usually need to compare the reftest result before/after a patch, sometimes even comparing between multiple branches. Needing to rebuild before we run a test is not very efficient. We could workaround this by saving the test result, but you never know which test is required.

Proposal:

Let's build a mach command like this (just a rough idea)

  • ./mach cache save copies the target/debug folder and give it a unique identifier, could be the commit hash
  • ./mach cache restore <hash> overrides the current target/debug with the specified version previously saved
  • ./mach cache restore list the saved versions and let you select which one to restore
  • ./mach cache list only list but not restore
  • --release flag does the above with the target/release folder
  • ./mach cache clean deletes all the saved cache

Use case

  • We can ./mach cache save two versions before and after a patch, then we can run test on them and compare the results back and forth
  • We can save a known good version for demonstration or dogfooding while still coding on the bleeding edge.

Any feedback is welcome, especially on naming :)

@highfive
Copy link

@highfive highfive commented May 10, 2017

@nox
Copy link
Member

@nox nox commented Oct 7, 2017

Was any progress made on that?

@jdm
Copy link
Member

@jdm jdm commented Oct 7, 2017

No, but this sounds useful.

@tigercosmos
Copy link
Collaborator

@tigercosmos tigercosmos commented Nov 8, 2017

Looks interesting.

@jdm jdm added the L-python label Nov 8, 2017
@tigercosmos
Copy link
Collaborator

@tigercosmos tigercosmos commented Nov 8, 2017

I think we can add a command

# Use current branch to test previous build
./mach test --cache <hash>
@ysimonson
Copy link
Contributor

@ysimonson ysimonson commented Mar 28, 2018

This would be so useful for my rust projects as well! I wonder if it might make sense to implement this as a custom cargo command, rather than via mach? Would y'all be opposed to that?

@jdm
Copy link
Member

@jdm jdm commented Mar 28, 2018

A custom cargo command sounds useful, but it might be tricky to allow it to work with Servo due to our peculiarities. I don't think we would spend any time porting our solution to Rust and making it generic, as a result.

@ysimonson
Copy link
Contributor

@ysimonson ysimonson commented Mar 29, 2018

If it's not too much trouble, could you expound on what those peculiarities are? I'm assuming it'd be useful to know them regardless of how this might be implemented.

@jdm
Copy link
Member

@jdm jdm commented Mar 29, 2018

We have DMG and MSI nightlies for macOS and Windows, so there are special ways to unpack those so the binaries can actually be executed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
6 participants
You can’t perform that action at this time.