• mlg@lemmy.world
    link
    fedilink
    English
    arrow-up
    8
    ·
    19 hours ago

    The most junk hack I ever did (that somehow worked) was replacing a Tensorflow 1.x library set with the Tensorflow 2.x library set and keeping the original 1.x symlink so that the software using it would think it’s still the 1.x. .so file lol.

    I presume the API had some deprecated fallback for poorly migrated software, which is why it worked without complaints.

    Also bazel is by far the worst build system I have ever used.

    • dan@upvote.au
      link
      fedilink
      arrow-up
      8
      ·
      edit-2
      18 hours ago

      COM solved all this stuff over 30 years ago. When you’re making breaking changes to an interface, you create a new one while still keeping the old one around (at least for a while). Both interfaces are shipped with the same DLL. Software written for the old interface continues to work, while newer software can take advantage of the extra features in the new interface.

      You can do something kinda similar in Linux with sonames, like libfoo.so.1, libfoo.so.2, etc. but there’s still a bunch of use cases where you need to use LD_LIBRARY_PATH, and they’re entirely separate libraries vs the COM approach where both interfaces are in a single library.

      Modern software keeps poorly reinventing the same concept. Software like Home Assistant has breaking changes between releases because they don’t have a consistent interface.