[dev-servo] Best way to work on multiple branches concurrently?
Hi, I often like to work on multiple branches concurrently, to work around the fact that Servo builds are slow. The obvious way to do this is to just have multiple clones. That's what I do with Firefox (using Mercurial). I've read that git 2.5 will have a `git checkout --to=path` command which will support multiple working branches from a single repo directly. (See http://stackoverflow.com/questions/6270193/multiple-working-directories-with-git/30185564#30185564.) So that's nice. But for Servo there's the added complication of having a rustc and a .cargo/ directory. It'd be nice to avoid having to download rustc twice if both clones require the same version. It'd also be nice to avoid building all the code in the .cargo/ directory twice, at least (again) when the versions match up. IIRC there is a way to specify that the .cargo/ directory should go somewhere else (and indeed it used to go in $HOME by default), though I don't know what it is. Anyway, I'm just wondering how other people deal with this. Thanks. Nick ___ dev-servo mailing list dev-servo@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-servo
Re: [dev-servo] Best way to work on multiple branches concurrently?
Copy servobuild.example to .servobuild Then just add the path of a central .cargo or .servo to the cache-dir and cargo-home-dir keys. Mine are ./../.servo and ./../.cargo -Manish Goregaokar On Thu, Jun 11, 2015 at 1:26 AM, Nicholas Nethercote wrote: > Hi, > > I often like to work on multiple branches concurrently, to work around > the fact that Servo builds are slow. The obvious way to do this is to > just have multiple clones. That's what I do with Firefox (using > Mercurial). > > I've read that git 2.5 will have a `git checkout --to=path` command > which will support multiple working branches from a single repo > directly. (See > http://stackoverflow.com/questions/6270193/multiple-working-directories-with-git/30185564#30185564 > .) > So that's nice. > > But for Servo there's the added complication of having a rustc and a > .cargo/ directory. It'd be nice to avoid having to download rustc > twice if both clones require the same version. It'd also be nice to > avoid building all the code in the .cargo/ directory twice, at least > (again) when the versions match up. IIRC there is a way to specify > that the .cargo/ directory should go somewhere else (and indeed it > used to go in $HOME by default), though I don't know what it is. > > Anyway, I'm just wondering how other people deal with this. Thanks. > > Nick > ___ > dev-servo mailing list > dev-servo@lists.mozilla.org > https://lists.mozilla.org/listinfo/dev-servo > ___ dev-servo mailing list dev-servo@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-servo
Re: [dev-servo] Best way to work on multiple branches concurrently?
Cargo target-dir sharing (soon to be enabled by https://github.com/servo/servo/pull/6306) will also not rebuild dependencies that haven't changed. We could add the ability to put the target directory outside of the servo tree (it's a trivial change, and cargo already supports this). It actually may work now with CARGO_TARGET_DIR=foo ./mach build jack. On Wed, Jun 10, 2015 at 2:02 PM, Manish Goregaokar wrote: > Copy servobuild.example to .servobuild > > Then just add the path of a central .cargo or .servo to the cache-dir and > cargo-home-dir keys. > > Mine are ./../.servo and ./../.cargo > > -Manish Goregaokar > > On Thu, Jun 11, 2015 at 1:26 AM, Nicholas Nethercote > wrote: > >> Hi, >> >> I often like to work on multiple branches concurrently, to work around >> the fact that Servo builds are slow. The obvious way to do this is to >> just have multiple clones. That's what I do with Firefox (using >> Mercurial). >> >> I've read that git 2.5 will have a `git checkout --to=path` command >> which will support multiple working branches from a single repo >> directly. (See >> http://stackoverflow.com/questions/6270193/multiple-working-directories-with-git/30185564#30185564 >> .) >> So that's nice. >> >> But for Servo there's the added complication of having a rustc and a >> .cargo/ directory. It'd be nice to avoid having to download rustc >> twice if both clones require the same version. It'd also be nice to >> avoid building all the code in the .cargo/ directory twice, at least >> (again) when the versions match up. IIRC there is a way to specify >> that the .cargo/ directory should go somewhere else (and indeed it >> used to go in $HOME by default), though I don't know what it is. >> >> Anyway, I'm just wondering how other people deal with this. Thanks. >> >> Nick >> ___ >> dev-servo mailing list >> dev-servo@lists.mozilla.org >> https://lists.mozilla.org/listinfo/dev-servo >> > ___ > dev-servo mailing list > dev-servo@lists.mozilla.org > https://lists.mozilla.org/listinfo/dev-servo ___ dev-servo mailing list dev-servo@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-servo
Re: [dev-servo] Best way to work on multiple branches concurrently?
I personally keep the cargo dirs separate because Cargo doesn’t deal well with two concurrent runs, and I’m frequently developing and building in the two different clones at the same time. You *should* be able to share the rust/cargo snapshot directory without major concerns, though. On Jun 10, 2015, at 3:02 PM, Manish Goregaokar wrote: Copy servobuild.example to .servobuild Then just add the path of a central .cargo or .servo to the cache-dir and cargo-home-dir keys. Mine are ./../.servo and ./../.cargo -Manish Goregaokar On Thu, Jun 11, 2015 at 1:26 AM, Nicholas Nethercote wrote: > Hi, > > I often like to work on multiple branches concurrently, to work around > the fact that Servo builds are slow. The obvious way to do this is to > just have multiple clones. That's what I do with Firefox (using > Mercurial). > > I've read that git 2.5 will have a `git checkout --to=path` command > which will support multiple working branches from a single repo > directly. (See > http://stackoverflow.com/questions/6270193/multiple-working-directories-with-git/30185564#30185564 > .) > So that's nice. > > But for Servo there's the added complication of having a rustc and a > .cargo/ directory. It'd be nice to avoid having to download rustc > twice if both clones require the same version. It'd also be nice to > avoid building all the code in the .cargo/ directory twice, at least > (again) when the versions match up. IIRC there is a way to specify > that the .cargo/ directory should go somewhere else (and indeed it > used to go in $HOME by default), though I don't know what it is. > > Anyway, I'm just wondering how other people deal with this. Thanks. > > Nick > ___ > dev-servo mailing list > dev-servo@lists.mozilla.org > https://lists.mozilla.org/listinfo/dev-servo > ___ dev-servo mailing list dev-servo@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-servo ___ dev-servo mailing list dev-servo@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-servo