I just tried moving my changes into third_part/rust/rust-cssparser. I also needed to modify the Cargo.toml there to update the paths to cssparser-macros and procedural-masquerade because they are vendored as separate crates, rather than in-library dependencies. At this point I was still hitting the problem with `cargo update -p cssparser` always updating to the newest version on crates.io, so I tried changing the version in rust-cssparser/Cargo.toml to 0.12.4 to match. At this point I'm stuck at this error:

 0:05.90 error: checksum for `cssparser v0.12.4` changed between lock files
 0:05.90
 0:05.90 this could be indicative of a few possible errors:
 0:05.90
 0:05.90     * the lock file is corrupt
0:05.90 * a replacement source in use (e.g. a mirror) returned a different checksum
 0:05.90     * the source itself may be corrupt in one way or another
 0:05.90
0:05.90 unable to verify that `cssparser v0.12.4` is the same as when the lockfile was generated

On 2017-04-28 1:28 PM, Bobby Holley wrote:
I definitely made this work at some point:
https://hg.mozilla.org/try/rev/18dc070e0308

The main difference with what you seem to be doing is that my version
points directly into third-party/rust, which I think is preferable anyway.

On Fri, Apr 28, 2017 at 10:05 AM, Josh Matthews <j...@joshmatthews.net>
wrote:

Back in February there was a discussion about how hard it is to modify
vendored Rust crates for Stylo. I can't actually find any solution to that
problem - the general idea appears to be "add a [replace] section to a
Cargo.toml and run cargo update", but I have not been able to make that
work yet. Given that the version of mozilla-central that I'm using contains
a vendored copy of rust-cssparser 0.12.2, here's what I have tried:

* added the following to servo/Cargo.toml and toolkit/library/rust:
[replace]
"rust-cssparser:0.12.2" = { path = "/Users/jdm/src/rust-cssparser" }

* run `cd servo/Cargo.toml && cargo update -p cssparser`
* run `cd toolkit/library/rust && cargo update -p cssparser`

This ends up modifying the Cargo.lock files to use the most recent version
from crates.io (0.12.4) instead of my local copy. Has anybody been able
to make this work? Can we please document the exact steps to follow? There
have been multiple people asking in #servo how to do this recently and
nobody seems to have done it successfully.

Cheers,
Josh
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to