Re: Editing a vendored crate for a try push

2018-04-10 Thread acrichton
On Tuesday, April 10, 2018 at 8:45:57 AM UTC-5, Ted Mielczarek wrote:
> On Mon, Apr 9, 2018, at 7:18 AM, Henri Sivonen wrote:
> > What's the current status of tooling for editing vendored crates for
> > local testing and try pushes?
> > 
> > It looks like our toml setup is too complex for cargo edit-locally to
> > handle (or, alternatively, I'm holding it wrong). It also seems that
> > mach edit-crate never happened.
> > 
> > How do I waive .cargo-checksum.json checking for a crate?
> 
> I don't think we have any tooling around this currently. bug 1323557 is still 
> open but hasn't seen any real movement. I did test a potential workflow last 
> year[1] that worked at the time, but recent comments suggest that it no 
> longer works. I haven't tried it again with a newer cargo/rustc so I don't 
> know what the errors are, but if that no longer works we should figure out if 
> we can fix whatever broke it.
> 
> -Ted
> 
> 1. https://bugzilla.mozilla.org/show_bug.cgi?id=1323557#c3

FWIW we added suppot to Cargo awhile back to be able to directly edit the 
vendored crates where they live in third_party so long as `[patch.crates-io]` 
was provided at the workspace level indicating "yes, I'm editing this".

The main change required there was we had to tweak Cargo.toml as it was 
published to crates.io. That means that only newly published crates are 100% 
compatible, and there may still be some historical versions that have been 
published since this was changed in Cargo.

If something is required beyond [patch.crates-io], though, to modify 
third-party sources please feel free to file a bug on Cargo!
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Editing a vendored crate for a try push

2018-04-10 Thread Ted Mielczarek
On Mon, Apr 9, 2018, at 7:18 AM, Henri Sivonen wrote:
> What's the current status of tooling for editing vendored crates for
> local testing and try pushes?
> 
> It looks like our toml setup is too complex for cargo edit-locally to
> handle (or, alternatively, I'm holding it wrong). It also seems that
> mach edit-crate never happened.
> 
> How do I waive .cargo-checksum.json checking for a crate?

I don't think we have any tooling around this currently. bug 1323557 is still 
open but hasn't seen any real movement. I did test a potential workflow last 
year[1] that worked at the time, but recent comments suggest that it no longer 
works. I haven't tried it again with a newer cargo/rustc so I don't know what 
the errors are, but if that no longer works we should figure out if we can fix 
whatever broke it.

-Ted

1. https://bugzilla.mozilla.org/show_bug.cgi?id=1323557#c3
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Editing a vendored crate for a try push

2018-04-09 Thread Henri Sivonen
On Mon, Apr 9, 2018 at 10:32 PM,   wrote:
> On Monday, April 9, 2018 at 11:39:35 AM UTC-4, Henri Sivonen wrote:
>> How do I waive .cargo-checksum.json checking for a crate?
>
> In bug 1449613 (part 12) I just hand-edited the .cargo-checksum.json in 
> question, and updated the sha256 values for the modified files. That was 
> enough to get try runs going (though the debug builds do show related 
> failures, they still built and ran my tests).

This is what I've done, but it shouldn't have to be like this.

On Mon, Apr 9, 2018 at 8:48 PM, Andreas Tolfsen  wrote:
> I don’t know the exact answer to your question, but it might be
> possible to temporarily depend on the crate by a its path?
>
> There are a couple of examples of this in
> https://searchfox.org/mozilla-central/source/testing/geckodriver/Cargo.toml.
>
> Remember to run "cargo update -p ".

This seems more complicated than editing the crate in place and
manually editing the sha256 values.

What I'm looking for is a simple way to skip the sha256 editing.

-- 
Henri Sivonen
hsivo...@hsivonen.fi
https://hsivonen.fi/
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Editing a vendored crate for a try push

2018-04-09 Thread twisniewski
On Monday, April 9, 2018 at 11:39:35 AM UTC-4, Henri Sivonen wrote:
> How do I waive .cargo-checksum.json checking for a crate?

In bug 1449613 (part 12) I just hand-edited the .cargo-checksum.json in 
question, and updated the sha256 values for the modified files. That was enough 
to get try runs going (though the debug builds do show related failures, they 
still built and ran my tests).
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Editing a vendored crate for a try push

2018-04-09 Thread Andreas Tolfsen
Also sprach Henri Sivonen:

> What's the current status of tooling for editing vendored crates for
> local testing and try pushes?
> 
> It looks like our toml setup is too complex for cargo edit-locally to
> handle (or, alternatively, I'm holding it wrong). It also seems that
> mach edit-crate never happened.
> 
> How do I waive .cargo-checksum.json checking for a crate?

I don’t know the exact answer to your question, but it might be
possible to temporarily depend on the crate by a its path?

There are a couple of examples of this in
https://searchfox.org/mozilla-central/source/testing/geckodriver/Cargo.toml.

Remember to run "cargo update -p ".

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


Editing a vendored crate for a try push

2018-04-09 Thread Henri Sivonen
What's the current status of tooling for editing vendored crates for
local testing and try pushes?

It looks like our toml setup is too complex for cargo edit-locally to
handle (or, alternatively, I'm holding it wrong). It also seems that
mach edit-crate never happened.

How do I waive .cargo-checksum.json checking for a crate?

-- 
Henri Sivonen
hsivo...@hsivonen.fi
https://hsivonen.fi/
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform