Hi all,
I'm one of several people trying to help out with espanso as the former maintainer can no longer invest as much time in the project.
One of the issues we're facing is that a dependency update is resulting in a link-time error on Windows (I unfortunately don't have a Windows system to debug, so depending on GitHub Actions):
= note: wxmsw31u_core.lib(corelib_gdiplus.obj) : error LNK2005: GdipAlloc already defined in windows.0.52.0.lib(gdiplus.dll)
wxmsw31u_core.lib(corelib_gdiplus.obj) : error LNK2005: GdipCloneImage already defined in windows.0.52.0.lib(gdiplus.dll)
wxmsw31u_core.lib(corelib_gdiplus.obj) : error LNK2005: GdipCreateBitmapFromFile already defined in windows.0.52.0.lib(gdiplus.dll)
wxmsw31u_core.lib(corelib_gdiplus.obj) : error LNK2005: GdipCreateBitmapFromFileICM already defined in windows.0.52.0.lib(gdiplus.dll)
wxmsw31u_core.lib(corelib_gdiplus.obj) : error LNK2005: GdipCreateHBITMAPFromBitmap already defined in windows.0.52.0.lib(gdiplus.dll)
wxmsw31u_core.lib(corelib_gdiplus.obj) : error LNK2005: GdipDisposeImage already defined in windows.0.52.0.lib(gdiplus.dll)
wxmsw31u_core.lib(corelib_gdiplus.obj) : error LNK2005: GdipFree already defined in windows.0.52.0.lib(gdiplus.dll)
wxmsw31u_core.lib(corelib_gdiplus.obj) : error LNK2005: GdiplusShutdown already defined in windows.0.52.0.lib(gdiplus.dll)
wxmsw31u_core.lib(corelib_gdiplus.obj) : error LNK2005: GdiplusStartup already defined in windows.0.52.0.lib(gdiplus.dll)
D:\a\espanso\espanso\target\debug\deps\espanso.exe : fatal error LNK1169: one or more multiply defined symbols found
Because it's a link-time error, it doesn't point me towards a specific crate as being the issue. There is a feature flag that should be (and seems to be) suppressing the build of a couple sub-crates with some duplicate symbols, so I'm trying to find out which dependency is being updated to add another duplicate symbol.
With a bunch of manual debugging, I think I'm getting closer to an answer (may be this update to tempfile which added windows-sys
, not yet confirmed).
Anyway, I've run into this issue a few times now, where I cargo update
a project and find that it will no longer build, and then I'm trying to narrow down exactly which versions of which dependency are the problem so that I can start helping find a solution.
Every time, I'm at a loss for how to run something like git bisect
but for all relevant versions of a Cargo dependency. I'm envisioning a tool that would search for all published / available versions of a dependency, sorted by release date, and optionally (usually) filtered with a "good" and "bad" version, and then run a best-effort[1] binary search to try to determine the specific version where the problem exists.
Does such a tool exist? In particular if it could semi-efficiently do some kind of cross-product with multiple dependencies[2]?
If not, has anyone found a recommended way to approach this problem? Seems like someone would have something more elegant than my bash script to "pin every available release and build them all."
Thanks for any input / ideas.
Obviously there will be many cases in which an issue might disappear and reappear, making a binary search the wrong way to go about this, but I still think it would be helpful in many cases. ↩︎
As in cases like my espanso example above, where I don't necessarily know which dependency update broke things ↩︎