Conversation
This ensures reproducible builds and no unintended updates even if a developer runs `cargo` on their own without one of the locking flags. We will explicitly manage them. Signed-off-by: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
|
We have a lockfile for the workspace, what does this pin? |
|
|
|
What do you mean with break? |
|
So the man page says:
Therefore, if a dependency gets updated and we haven't pinned them, Cargo will want to update it, which means an error, no? Then there is What we want is that code never changes, for any reason whatsoever, unless someone explicitly changes it. Regardless of Cargo's flags, it sounds like explicitly writing what we want is a good idea. Related: the different behavior of |
|
The lock file would only need to be updated if Cargo.toml changed, a new
release doesn't mean the lock file _needs_ to be updated, just that it
_could_ be updated.
…On Sat, Oct 10, 2020 at 7:09 PM Miguel Ojeda ***@***.***> wrote:
So the man page says:
If the lock file ... needs to be updated, Cargo will exit with an error.
Therefore, if a dependency gets updated and we haven't pinned them, Cargo
will want to update it, which means an error, no?
Then there is --frozen. From the man page, it looks like it avoids using
the network to see if new versions are available, but from the wording I'd
assume it can still check the local index and complain. Then there is
--offline, which it is not clear to me from the man page what is the
exact interaction with the other flags.
What we want is that code *never* changes, for any reason whatsoever,
unless someone explicitly changes it. Regardless of Cargo's flags, it
sounds like explicitly writing what we want is a good idea.
Related: the different behavior of cargo install vs. cargo build w.r.t.
the lockfile.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#14 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAAGBAGIEHQVQNI5EPIH7LSKDSRDANCNFSM4RTJWQNA>
.
--
All that is necessary for evil to succeed is for good people to do nothing.
|
Ah, so by "out of date" the manpage means w.r.t. to the |
|
Alright, then yeah, my main concern is gone. Since we don't use In that case, well, I don't mind one way or the other. I always prefer to be explicit on dependencies management, but I don't like repeated information either; and it is not how usual Rust projects handle dependencies with Cargo; so we can close this. |
|
I'm trying call bindgen as an executable and not from the build.rs. As this would us only let with bitflags as dependency, which does not have any dependencies. |
|
How about shelling out to it in `build.rs`?
…On Sun, Oct 11, 2020 at 11:27 AM Finn Behrens ***@***.***> wrote:
I'm trying call bindgen as an executable and not from the build.rs. As
this would us only let with bitflags as dependency, which does not have any
dependencies.
But currently, I'm not sure where in the makefile to call bindgen
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#14 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAAGBFYJC4UMKFWG7QOXEDSKHFFFANCNFSM4RTJWQNA>
.
--
All that is necessary for evil to succeed is for good people to do nothing.
|
As I would like to ditch cargo, the is no build.rs left |
|
FWIW, I'm opposed to dropping cargo, it's a useful build system, and if we
drop it we have to reimplement a bunch of it's behaviors ourselves.
…On Sun, Oct 11, 2020 at 11:49 AM Finn Behrens ***@***.***> wrote:
How about shelling out to it in build.rs?
As I would like to ditch cargo, the is no build.rs left
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#14 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAAGBC4SRNQQW5Z365JJLDSKHH2FANCNFSM4RTJWQNA>
.
--
All that is necessary for evil to succeed is for good people to do nothing.
|
|
We only have one dependency. This is quite easy to implement in plain rustc. Also without cargo, I would just save bitflags in tree, that avoids any network traffic. |
|
It's not just about external dependencies, it's also local deps, between
crates that are within tree.
…On Sun, Oct 11, 2020 at 12:04 PM Finn Behrens ***@***.***> wrote:
We only have one dependency. This is quite easy to implement in plain
rustc. Also without cargo, I would just save bitflags in tree, that avoids
any network traffic.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#14 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAAGBCLOIHX5W4MT7EE363SKHJQ7ANCNFSM4RTJWQNA>
.
--
All that is necessary for evil to succeed is for good people to do nothing.
|
|
Ok, I understand, but don't like that argument. What about vendoring bitflags in tree and only using bingen as executable, to make building easier? |
|
My personal opinion is that I'm skeptical, I think the developer-UX will be
worse. But if we can get that really all working, and folks think it'll
make this easier to upstream, then I'm open to it.
…On Sun, Oct 11, 2020 at 12:14 PM Finn Behrens ***@***.***> wrote:
Ok, I understand, but don't like that argument.
What about vendoring bitflags in tree and only using bingen as executable,
to make building easier?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#14 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAAGBEFUD5L7NQWXBEJX7LSKHKWNANCNFSM4RTJWQNA>
.
--
All that is necessary for evil to succeed is for good people to do nothing.
|
The Cargo-or-not discussion will be forever a hot topic until we get this merged one way or the other. @nickdesaulniers and I started testing the waters without it, and then in a couple of calls we had before Plumbers we (see #1 for the list of people) discussed testing Cargo. See also #4 for some points I wrote about Cargo when I did the initial integration. At the moment, the main reason/advantage for it is that it contains the knowledge of how to build
For communication purposes, we will have a mailing list as is usual for kernel stuff (request still pending). For real-time discussion I wanted to have an informal call from time to time like the ones we had for Plumbers. I think it is about a good time to have one since there is a fair amount of bits to discuss after this initial phase. I can send a poll for e.g. next weekend. |
|
Let's close this one. The bindgen discussion follows in #33, the rest perhaps in the ML! :-) |
See #12
This ensures reproducible builds and no unintended updates even if a developer runs
cargoon their own without one of the locking flags. We will explicitly manage them.It is likely that we will change how we manage the dependencies, but for the moment, it is good to have the semantics we will anyway want.