GNU bug report logs -
#35155
[PATCH] build-system/cargo: refactor phases to successfully build
Previous Next
Reported by: Ivan Petkov <ivanppetkov <at> gmail.com>
Date: Fri, 5 Apr 2019 07:08:01 UTC
Severity: normal
Tags: patch
Done: Ivan Petkov <ivanppetkov <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Tue, 9 Apr 2019 09:01:20 -0700
with message-id <F65707E5-AE51-4DBF-B12E-8434D2E01FDF <at> gmail.com>
and subject line Re: [bug#35155] [PATCH] build-system/cargo: refactor phases to successfully build
has caused the debbugs.gnu.org bug report #35155,
regarding [PATCH] build-system/cargo: refactor phases to successfully build
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
35155: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=35155
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
[Message part 3 (text/plain, inline)]
This patch refactors the cargo-build-system builder code to correctly build
imported Rust crates. Specifically the changes:
* Do not rely on a Cargo.lock presence to determine installation. Cargo will
automatically create the file at its first invocation, so instead we check
the manifest for any executable targets before attempting an installation
* Do not attempt to modify the Cargo.toml file. There are many system specific
package in crates.io (e.g. for Windows, Redox, Fuschia, WASM, etc.) and
attempting to keep up with what crates must be patched out is futile.
* The build phases will honor a skip-build? flag which allows for
short-circuiting for optional packages which require nightly features or cannot
be built for the current platform.
Changes which still need to be done:
* Update the host-side code to expand transitive inputs: cargo requires that
all transitive crate dependencies are present in its (vendored) index, but
doing so by hand in the package definitions will become unwieldy.
* Update the host-side code to detect any "circular" dependencies which can
result from a naive import
Unfortunately there isn't a good way to test this patch at the moment.
Importing a non-trivial crate requires a lot of manual resolution, especially
with the points above remaining unimplemented.
If someone would really like to see the input package definitions I was using
to test, I'd be happy to share, though I'd advise that it's pretty hacked up
for my own convoluted testing at the moment.
—Ivan
[0001-build-system-cargo-refactor-phases-to-successfully-b.patch (application/octet-stream, attachment)]
[Message part 5 (message/rfc822, inline)]
Thank you Chris!
—Ivan
> On Apr 9, 2019, at 3:12 AM, Chris Marusich <cmmarusich <at> gmail.com> wrote:
>
> Hi Ivan,
>
> I've committed this as 1d3acde5087d50af6a4901fd7614f0940eb7b41d on
> master. Thank you!
>
> --
> Chris
This bug report was last modified 6 years and 43 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.