sentry-cli
sentry-cli copied to clipboard
Source bundle creation fails on PE with embedded PPDB
Sentry CLI 2.13.0 added support for PPDB embedded in the PE assembly with #1463. That's working fine, and will also use the embedded debug info to derive sources when using sentry-cli dif upload --include-sources. However, I can't seem to use an embedded PPDB when trying to separately create a source bundle using sentry-cli dif bundle-sources.
In other words, this works:
dotnet new console -n ConsoleApp1
cd ConsoleApp1
dotnet build
sentry-cli dif bundle-sources obj/Debug/net7.0/ConsoleApp1.pdb
But this doesn't work, and it should:
dotnet new console -n ConsoleApp1
cd ConsoleApp1
dotnet build -p:DebugType=embedded
sentry-cli dif bundle-sources obj/Debug/net7.0/ConsoleApp1.dll
Even though this works:
dotnet new console -n ConsoleApp1
cd ConsoleApp1
dotnet build -p:DebugType=embedded
sentry-cli dif upload obj/Debug/net7.0/ConsoleApp1.dll --include-sources
The output when failed is simply:
skipped obj/Debug/net7.0/ConsoleApp1.dll (no files found)
The difference lies in debug-files upload executing search_difs()->collect_object_dif() which expands the given path to the actually useful file, i.e. ConsoleApp1.pdb. This is because upload-dif is normally used with a directory path, not individual file path.
bundle-sources doesn't do that, it just takes the single given file path and processes it.
Whether these two should behave like that - not sure. There are arguments both ways for each situation...
This issue has gone three weeks without activity. In another week, I will close it.
But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!
"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀