Closed HexDecimal closed 3 years ago
I'm thinking of working on the @loader_path
issue in another PR. Would it be okay if I setup GitHub Actions for Flake8 and MyPy? I'll need MyPy so that I can more easily work on larger refactors.
Yes, please go ahead ... thanks.
But - isn't that what try : catch is for?
@matthew-brett
That's a fair question. ...Maybe?
Problem with raising is, it breaks you out of the current operation. That's fine if the current operation is "report the status of this individual dependency", but certainly nobody'd want delocate-listdeps
to give up at the first sign of an unresolved dep.
And the other side of that coin is, if a dependency resolution failure is going to raise an exception, then it needs to be raised immediately, each time there's a failure, but without preventing the rest of the lookups from completing.
I had issues with raising errors in practice and had to stop. PR #94 continues this branch, but with the topic of @loader_path
support instead.
This only affects libraries with
@rpath
dependencies. It's also me fixing my own bad code when I wrote resolve_rpath. At least I knew this could be a problem back then and added a warning for it.Previously this issue was warned about using Python's warning module, but these errors are more often critical and will affect the compatibility of the wheel. A failure here means that either the library actually is missing, delocate is not being correct, or the library was built incorrectly.
The more I considered it the less I was able to justify the ability to ignore these errors as an option since it's too implicit and could easily ignore unintended dependencies. I did add a parameter to tree_libs which can be enabled to ignore these errors, but there's no new command line options yet.
This is what the new error looks like in practice, compared to the example in #90:
This error reveals what happened. SDL2 now has a Frameworks directory embedded in its own framework and delocate doesn't support
@loader_path
yet. This will need to be fixed so I can update SDL to the latest version, but I'm not a hurry. Anyone else might be able to useDYLD_LIBRARY_PATH
as a workaround.As mentioned before this could possibly be a breaking change. I've given my reasons for why this is acceptable but tree_libs can be told to ignore errors if you can pass the option down to it.
Resolves #90