News for hackers. Stuff that matters.
Re:How to Structure C Projects: These Best Practices Worked ... by PH95VuimJjqBqy on Friday March 08, 2024 @01:43PM (#39644451)
that's only true if you believe dependency resolution is free.
Re:How to Structure C Projects: These Best Practices Worked ... by alpaca128 on Friday March 08, 2024 @03:42PM (#39646194)
I have never witnessed cargo being delayed from that by a noteworthy amount of time.

I just tried it, on my PC it takes cargo 0.3 seconds to start compiling the first of 309 dependencies in a clean Bevy repo. The entire compilation takes 31 seconds, and that's the best case with lots of multithreading and all packages already downloaded. That's close enough to "free" for me.

Re:How to Structure C Projects: These Best Practices Worked ... by PH95VuimJjqBqy on Friday March 08, 2024 @04:02PM (#39646446)
doesn't really matter. You said "nothing to do with" and I said "is not free".

1/3 of a second for a build that has already cached all dependencies means I was correct that it's not free and you were being dismissive when you said it had nothing to do with build times.

If you want to argue that it's a minimal amount of time then argue that instead of what you've been arguing.

Re:How to Structure C Projects: These Best Practices Worked ... by alpaca128 on Saturday March 09, 2024 @04:22AM (#39650513)
I was of course talking about usage in the real world, which is the thing that matters in the end. Harping on the precise meaning of words like that is pointless.
Re:How to Structure C Projects: These Best Practices Worked ... by PH95VuimJjqBqy on Saturday March 09, 2024 @11:13AM (#39652610)
the real world, where nothing means something.
Re:How to Structure C Projects: These Best Practices Worked ... by steveklabnik on Friday March 08, 2024 @04:52PM (#39646959)
Cargo does not do dependency resolution on every build.
Re:How to Structure C Projects: These Best Practices Worked ... by PH95VuimJjqBqy on Friday March 08, 2024 @05:00PM (#39647039)
how does a dependency management system ensure the dependencies are there without doing dependency resolution?
Re:How to Structure C Projects: These Best Practices Worked ... by steveklabnik on Friday March 08, 2024 @06:16PM (#39647706)
By separating the two. If there’s no Cargo.lock, resolution needs to be done, and the result is written out to the lock file. If the lock file is there, then you don’t need to re-run resolution, you just read out the result from the file.

The latency you’re arguing over is probably more to do with rustup selecting the right cargo and exec-ing that than dependency resolution. It’s heavier weight than it should be due to history reasons.

Re:How to Structure C Projects: These Best Practices Worked ... by PH95VuimJjqBqy on Saturday March 09, 2024 @04:32AM (#39650543)
dealing with the Cargo.lock is a part of the dependency resolution.