▲ | CyberDildonics 4 days ago | ||||||||||||||||||||||||||||||||||||||||
How would that be different if you have a source file split up into multiple files? Having a list of what version you're using of a single file library seems like an easy problem to solve. If nothing else you could put the version number in the file name and in a debug build print off the file name. | |||||||||||||||||||||||||||||||||||||||||
▲ | Bratmon 4 days ago | parent [-] | ||||||||||||||||||||||||||||||||||||||||
I'm not comparing single-file vs multiple files, I'm comparing single-file vs NPM/PIP/go get/Cargo Let's say you depend on foo, which depends on 10 other libraries including bar, all of which depend on a library called baz. Then one day someone discovers an exploit for baz. With npm, you only have one version of baz installed, and can easily check if it's a vulnerable version. With single-file libraries, baz was built into a single file. Then bar was built into a single file containing baz. Then foo was built into a single file containing bar and other libraries, all which included baz. Now your library contains baz 10 times, all of which might be at different versions, and none of which you can easily check. (You can check your version of foo easily enough, but baz is the library with the exploit) | |||||||||||||||||||||||||||||||||||||||||
|