News for hackers. Stuff that matters.
Re:The semver trick (2019) by mgaunard on Thursday December 26, 2024 @03:09PM (#42517410)
Using third-party libraries is usually a bad idea, and must be done so very carefully. If you do, onboard it onto your own build system, and pin it to a version you're going to provide support for and ensure compatibility with.

You should never have multiple versions of the same code in objects that end up linked together, that's a recipe for ODR.

Re:The semver trick (2019) by progval on Thursday December 26, 2024 @03:30PM (#42517549)
Concrete example: the Arrow Arrow format is designed to allow passing arrays across languages and libraries without conversion; so many public functions/methods (and FFIs) will have Arrow arrays in their signature.

However, the Rust Arrow library bumps its major version every few months because it changes methods and auxiliary types, without changing the memory layout of arrays. But this means you can't have two dependencies (eg. an ORC parser and a CSV serializer) that depend on different versions of Arrow if you want to pass arrays from one dependency's functions to the other's.

And vendoring like you mention won't help, because the Rust compiler wouldn't recognize both vendored Arrow crates as compatible.

Re:The semver trick (2019) by mgaunard on Thursday December 26, 2024 @05:48PM (#42518455)
Use a single version of the arrow library, and build everything against that one. I don't see where the problem is.

I don't use Rust or third-party build or packaging systems -- I usually recommend that people don't do so either, but I understand that cargo is part of the appeal of Rust.

I'd say just build whatever you need to do, this way you won't be limited by arbitrary restrictions others have decided.

Re:The semver trick (2019) by progval on Thursday December 26, 2024 @05:59PM (#42518523)
I can't always do that because dependency A depends dependency B that depends on arrow 52, and dependency C depends on arrow 53.

And sure, I can soft-fork dependency B to add support for arrow 53, and dependency A to depend on my soft-fork of dependency B, but it quickly becomes messy. Especially when in parallel I send unrelated patches to A and/or B.

Re:The semver trick (2019) by mgaunard on Friday December 27, 2024 @05:26AM (#42521195)
your problem is caring about what other people have decided. Surely metadata is irrelevant and can be changed/overridden.

You onboard a version and make sure everything you need can build against it, patching software as needed.

Re:The semver trick (2019) by hinkley on Friday December 27, 2024 @11:54AM (#42523755)
Security patches say no, doesn’t work that way.
Re:The semver trick (2019) by hinkley on Friday December 27, 2024 @11:55AM (#42523766)
Sounds like a team of misanthropes. How can you be that blind to DevEx?
Re:The semver trick (2019) by mgaunard on Saturday December 28, 2024 @07:46AM (#42530689)
For the best developer experience, you need to write custom tools.
Re:The semver trick (2019) by hinkley on Saturday December 28, 2024 @01:38PM (#42533300)
Eh. Software is full of cliches and idioms. I shouldn’t be writing my own logging library and I sure as fuck shouldn’t be writing my own security library.

Also don’t write your own billing system unless you’re a finance company.

Re:The semver trick (2019) by eastbound on Thursday December 26, 2024 @03:39PM (#42517621)
CVEs are detected on third party libraries. This is why you must upgrade.