Re: Editing vendored crates take #2

2017-05-02 Thread Boris Zbarsky
On 5/2/17 2:54 PM, Josh Matthews wrote: My cargo from April 19 claims that "cargo vendor" isn't a real command. Did you mean `./mach vendor rust` Er, yes, I did. -Boris ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozill

Re: Editing vendored crates take #2

2017-05-02 Thread Ted Mielczarek
On Tue, May 2, 2017, at 02:54 PM, Josh Matthews wrote: > On 2017-04-28 3:07 PM, Boris Zbarsky wrote: > > On 4/28/17 1:05 PM, Josh Matthews wrote: > > 2) Run "cargo vendor" and watch it fail because of something I never > > figured out. > > My cargo from April 19 claims that "cargo vendor" isn't a

Re: Editing vendored crates take #2

2017-05-02 Thread Josh Matthews
On 2017-04-28 3:07 PM, Boris Zbarsky wrote: On 4/28/17 1:05 PM, Josh Matthews wrote: 2) Run "cargo vendor" and watch it fail because of something I never figured out. My cargo from April 19 claims that "cargo vendor" isn't a real command. Did you mean `./mach vendor rust` (which did end up de

Re: Editing vendored crates

2017-04-29 Thread Bobby Holley
On Sun, Feb 26, 2017 at 2:10 PM, Bobby Holley wrote: > On Sun, Feb 26, 2017 at 9:51 AM, Henri Sivonen > wrote: > >> I tried to add some panics to a vendored to create (rust-encoding) to >> see if the code in question runs. However, I didn't get to the running >> part, because the edited code fai

Re: Editing vendored crates take #2

2017-04-28 Thread Kartikaya Gupta
At one point the steps at https://wiki.mozilla.org/Platform/GFX/Quantum_Render#Testing_third-party_rust_library_changes were known to work. I don't know if they have since been broken. On Fri, Apr 28, 2017 at 3:07 PM, Boris Zbarsky wrote: > On 4/28/17 1:05 PM, Josh Matthews wrote: >> >> Has anybo

Re: Editing vendored crates take #2

2017-04-28 Thread Boris Zbarsky
On 4/28/17 1:05 PM, Josh Matthews wrote: Has anybody been able to make this work? I _think_ I made it work recently-ish, like so: 1) Modify toolkit/library/rust/Cargo.toml with the relevant [replace] bit. 2) Run "cargo vendor" and watch it fail because of something I never figured out. 3

Re: Editing vendored crates take #2

2017-04-28 Thread Josh Matthews
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

Re: Editing vendored crates take #2

2017-04-28 Thread Jack Moffitt
There is this bug which the Cargo team is planning to work on to help with these problems, but it hasn't been implemented yet that I know of. https://github.com/rust-lang/cargo/issues/2649#issuecomment-279615299 jack. On Fri, Apr 28, 2017 at 11:28 AM, Bobby Holley wrote: > I definitely made thi

Re: Editing vendored crates take #2

2017-04-28 Thread Bobby Holley
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 wrote: > Back i

Editing vendored crates take #2

2017-04-28 Thread Josh Matthews
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 y

Re: Editing vendored crates

2017-03-16 Thread Simon Sapin
On 27/02/17 19:47, Simon Sapin wrote: On 27/02/17 19:30, Henri Sivonen wrote: On Mon, Feb 27, 2017 at 8:00 PM, Bobby Holley wrote: FWIW, |cargo tree| is a very helpful tool to figure out who's pulling in a crate. Thanks, but what I'm trying to figure out isn't whose pulling it in (the style

Re: Editing vendored crates

2017-02-27 Thread Henri Sivonen
On Mon, Feb 27, 2017 at 8:47 PM, Simon Sapin wrote: > As an aside, I have a plan to remove rust-encoding entirely from Servo > (including Stylo) and use encoding_rs instead. But doing this the way I want > to has a number of prerequisites, and I’d prefer to switch everything at > once to avoid hav

Re: Editing vendored crates

2017-02-27 Thread Simon Sapin
On 27/02/17 19:30, Henri Sivonen wrote: On Mon, Feb 27, 2017 at 8:00 PM, Bobby Holley wrote: FWIW, |cargo tree| is a very helpful tool to figure out who's pulling in a crate. Thanks, but what I'm trying to figure out isn't whose pulling it in (the style crate is) but whether it is actually us

Re: Editing vendored crates

2017-02-27 Thread Henri Sivonen
On Mon, Feb 27, 2017 at 8:00 PM, Bobby Holley wrote: > FWIW, |cargo tree| is a very helpful tool to figure out who's pulling in a > crate. Thanks, but what I'm trying to figure out isn't whose pulling it in (the style crate is) but whether it is actually used beyond an always-None Option in a way

Re: Editing vendored crates

2017-02-27 Thread Bobby Holley
On Mon, Feb 27, 2017 at 9:56 AM, Henri Sivonen wrote: > On Mon, Feb 27, 2017 at 7:47 PM, Ted Mielczarek > wrote: > > On Mon, Feb 27, 2017, at 12:32 PM, Henri Sivonen wrote: > >> We don't seem to need such change control beyond hg logs for e.g. the > >> in-tree ICU or Skia, though. > > > > As som

Re: Editing vendored crates

2017-02-27 Thread Henri Sivonen
On Mon, Feb 27, 2017 at 7:47 PM, Ted Mielczarek wrote: > On Mon, Feb 27, 2017, at 12:32 PM, Henri Sivonen wrote: >> We don't seem to need such change control beyond hg logs for e.g. the >> in-tree ICU or Skia, though. > > As someone who has maintained a vendored upstream C++ project (Breakpad) > f

Re: Editing vendored crates

2017-02-27 Thread Ted Mielczarek
On Mon, Feb 27, 2017, at 12:32 PM, Henri Sivonen wrote: > On Mon, Feb 27, 2017 at 7:04 PM, Ralph Giles wrote: > > On Mon, Feb 27, 2017 at 4:03 AM, Henri Sivonen wrote: > > > >> I find this level of difficulty (self-inflicted quasi-Tivoization > >> practically) an unreasonable impediment to practi

Re: Editing vendored crates

2017-02-27 Thread Henri Sivonen
On Mon, Feb 27, 2017 at 7:04 PM, Ralph Giles wrote: > On Mon, Feb 27, 2017 at 4:03 AM, Henri Sivonen wrote: > >> I find this level of difficulty (self-inflicted quasi-Tivoization >> practically) an unreasonable impediment to practicing trivial Software >> Freedom with respect to the vendored crat

Re: Editing vendored crates

2017-02-27 Thread Ralph Giles
On Mon, Feb 27, 2017 at 4:03 AM, Henri Sivonen wrote: > I find this level of difficulty (self-inflicted quasi-Tivoization > practically) an unreasonable impediment to practicing trivial Software > Freedom with respect to the vendored crates. I agree we need to fix the ergonomics here, but I don'

Re: Editing vendored crates

2017-02-27 Thread Henri Sivonen
On Mon, Feb 27, 2017 at 12:10 AM, Bobby Holley wrote: > Can you elaborate on what goes wrong here? This worked for ted's experiment > mentioned upthread, and for me on at least one occasion in > https://hg.mozilla.org/try/rev/18dc070e0308 (permalink: > https://pastebin.mozilla.org/8980438 ) > > Yo

Re: Editing vendored crates

2017-02-26 Thread Xidorn Quan
On Mon, Feb 27, 2017, at 09:10 AM, Bobby Holley wrote: > On Sun, Feb 26, 2017 at 9:51 AM, Henri Sivonen > wrote: > > > I tried to add some panics to a vendored to create (rust-encoding) to > > see if the code in question runs. However, I didn't get to the running > > part, because the edited code

Re: Editing vendored crates

2017-02-26 Thread Bobby Holley
On Sun, Feb 26, 2017 at 9:51 AM, Henri Sivonen wrote: > I tried to add some panics to a vendored to create (rust-encoding) to > see if the code in question runs. However, I didn't get to the running > part, because the edited code failed to build. > > It turns out that each vendored crate has a .

Re: Editing vendored crates

2017-02-26 Thread Bobby Holley
On Sun, Feb 26, 2017 at 2:02 PM, Manish Goregaokar wrote: > > [replace] section to Cargo.toml of libgkrust pointing to the edited > > crate under third-party/rust or adding paths = [ "third-party/rust" ] > > to .cargo/config.in don't make Cargo happy. > > [replace] is the way to do it, but it ha

Re: Editing vendored crates

2017-02-26 Thread Manish Goregaokar
> [replace] section to Cargo.toml of libgkrust pointing to the edited > crate under third-party/rust or adding paths = [ "third-party/rust" ] > to .cargo/config.in don't make Cargo happy. [replace] is the way to do it, but it has to point to a crate outside of the vendoring directory. The vendor

Editing vendored crates

2017-02-26 Thread Henri Sivonen
I tried to add some panics to a vendored to create (rust-encoding) to see if the code in question runs. However, I didn't get to the running part, because the edited code failed to build. It turns out that each vendored crate has a .cargo-checksum.json file that contains hashes of all the files in