Opened 8 months ago

Closed 4 months ago

#22906 closed defect (fixed)

We might not want to commit Cargo.lock files

Reported by: isis Owned by:
Priority: Medium Milestone: Tor: unspecified
Component: Core Tor/Tor Version:
Severity: Normal Keywords: rust, tor-build
Cc: acrichton@…, chelseakomlo, manishearth@… Actual Points:
Parent ID: Points: 1
Reviewer: Sponsor: SponsorZ


In #22905, I discussed a problem that is partially the result of committing src/rust/Cargo.lock.

[Including Cargo.lock files] is possibly a good idea, because we're specifying the hash we expect. It might be a bad idea, because it specifies the registry for packages, which I'm pretty sure will mean "offline" builds would never work. In addition, it also conflicts with the dependency specification in src/rust/tor_util/Cargo.toml […]

That is, I'm pretty sure that no matter what we do on #22830, "offline" builds are going to be broken because of including this lockfile. We should figure out what the benefits of having it are, and if we can live without them.

Child Tickets

Change History (9)

comment:2 Changed 8 months ago by alexcrichton

Oh I think my comment on #22905 may actually be more relevant for this issue! I'm not 100% familiar with the layout of projects here, but the response to that comment may help guide this issue!

comment:3 Changed 8 months ago by Sebastian

Same for my comment, maybe this is a duplicate we should close?

comment:4 Changed 8 months ago by dgoulet

Milestone: Tor: unspecified

comment:5 Changed 8 months ago by alexcrichton

Cc: acrichton@… added

comment:6 Changed 8 months ago by chelseakomlo

Cc: chelseakomlo added

comment:7 Changed 5 months ago by

Cc: manishearth@… added

The recommendation is to commit them for binaries and not libraries, but the actual recommendation is closer to "commit them for things which won't be used as dependencies of other rust crates". Which is true for binaries, but also for static libraries that you link to from C. So for the staticlib you compile you probably want to check in the lockfile.

(You'll need to check in a lockfile if you intend to cargo vendor crates anyway)

comment:8 Changed 4 months ago by chelseakomlo

Closing as this appears to be resolved- feel free to re-open if there are other pending questions. Agree with committing a lockfile for the tor binary.

comment:9 Changed 4 months ago by chelseakomlo

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.