-
-
Notifications
You must be signed in to change notification settings - Fork 226
Feat: native AOT debug info upload #2739
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
3be6fb9 to
90d4ff9
Compare
| <!-- If running in CI and auth token is not set, disable SentryCLI completely (to avoid logging warnings). --> | ||
| <PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true' And '$(SENTRY_AUTH_TOKEN)' == ''"> | ||
| <UseSentryCLI>false</UseSentryCLI> | ||
| </PropertyGroup> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI: This (and other similar cases below) is now handled by a condition in Sentry.targets property UseSentryCLI
samples/Sentry.Samples.Console.Basic/Sentry.Samples.Console.Basic.csproj
Show resolved
Hide resolved
| <!-- Native AOT publishing | ||
| While '_IsPublishing' looks a bit "private", it's also OK if it suddenly stops working and this step runs anyway. | ||
| See https://github.com/dotnet/sdk/issues/26324#issuecomment-1169236993 --> | ||
| <PropertyGroup Condition="'$(PublishDir)' != '' and '$(PublishAot)' == 'true' and '$(_IsPublishing)' == 'true'"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see we already have a CI_PUBLISHING_BUILD property... I take it this doesn't work because it's only ever set by by our github actions (and we want this to work even in the context of builds on local development machines)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a transitive build target, so one that gets triggered during lib-consumer builds.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aha... cunning. I had no idea we were doing that (or that it was even possible - never had a need before). Is that enabled simply by this?
sentry-dotnet/src/Sentry/Sentry.csproj
Lines 78 to 86 in d32f05b
| <!-- | |
| Include Sentry's custom targets file in the nuget package. | |
| This file contains targets that are invoked during the end-user's build. | |
| The same file is included twice, so it ends up being used for both direct and transitive package references to Sentry. | |
| --> | |
| <ItemGroup> | |
| <None Include="buildTransitive\Sentry.targets" Pack="true" PackagePath="buildTransitive\Sentry.targets" /> | |
| <None Include="buildTransitive\Sentry.targets" Pack="true" PackagePath="build\Sentry.targets" /> | |
| </ItemGroup> |
I think that's all we need to do right (reading the docs).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, that's it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and I've learned about this a couple of weeks ago myself, for the same reason :)
| <Target Name="UploadDebugInfoToSentry" AfterTargets="$(SentryCLIUploadAfterTargets)" DependsOnTargets="PrepareSentryCLI" | ||
| Condition="'$(SentryCLI)' != '' and ('$(SentryUploadSymbols)' == 'true' or '$(SentryUploadSources)' == 'true')"> | ||
|
|
||
| <!-- if (UploadSymbols && UploadSources) { --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for those!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah they're nice although at one point I've found myself just copying a piece of a code from one if branch to the other, forgetting to actually update the relevant condition 😅
bitsandfoxes
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
![]()
closes #2692
This is mostly done in
Sentry.targets- I've merged the two jobs (one uploading debug files, the second one uploading sources) because it was getting unwieldy when trying to handle both native AOT and managed symbols (and referenced sources) in both jobs.I've also had to rework the PrepareCLI workflow a bit so that we get consistent integration test runs. Ppreviously, the integration test build would also upload symbols for the Sentry project itself, which is not what would happen when building actual user projects, because that project would have come from a nuget package.
TODO:
#skip-changelog (This is part of a bigger task to support Native AOT)