Repository navigation
Refactor code to better align with Unreal's structure - #745
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
j0tt
left a comment
There was a problem hiding this comment.
I still want to better understand the macro magic here, but I'll leave that for tomorrow. This is a first pass review :) I don't feel strongly about ending a file with a newline if you're not keen on the busy work, it's just a habit of mine 😅
|
@nwhite-riot Thank you for all the effort you've put into this refactoring so far! Overall, things are looking good and we appreciate making the SDK more future-proof in terms of adding consoles support. This review might require a few iterations given the amount of changes however I'd like to share some of my early thoughts: One of my major concerns is that Sentry entities (e.g. event, user, breadcrumb) cannot be created directly with Previously we relied at constructors and/or initialize methods to ensure that the default native impl is set whenever possible making Unreal objects self-contained. This approach wasn't ideal but it seemed more error-proof for SDK users. Perhaps it would make sense to combine this with the object construction utilities introduced here? If so, there doesn't seem to be any other significant changes to the plugin's public API and therefore preserving its backward compatibility with older versions would be preferred. |
After adding the |
@tustanivsky, I thought this would be preferable to having users instantiate their own objects - either we have the library to do it for them, or we remove the library and allow them to construct the objects manually. Feels odd to have both? |
|
My last question about this is around object validity: if a user calls I will look into retaining the desired functionality (of allowing Thanks for the discussion! |
For most Sentry classes that wasn't an issue since their default constructor handled the native implementation initialization (except |
|
I've created a PR (nwhite-riot#3) that addresses some of the build issues on Apple/Android platforms. |
* Fix method names for Apple impl * Wrap sentry-native include * Add missing include for NewObject * Fix errors due to missing SentryTransactionContext implementations for Apple/Android * Fix platform define * Fix method name * Fix errors related to sampling context * Fix sampling context include * Add missing define for iOS * Add missing define for Android * Fix method name for Android * Update package snapshot
* Fix compilation errors on Linux * Add missing includes * Fix demo blueprint engine version
tustanivsky
left a comment
There was a problem hiding this comment.
Thank you @nwhite-riot!
This PR adds Unreal Engine SDK migration guide for the upcoming `1.0.0` plugin release. Related to: - getsentry/sentry-unreal#928 - getsentry/sentry-unreal#971 - getsentry/sentry-unreal#1051 - getsentry/sentry-unreal#1018 - getsentry/sentry-unreal#886 - getsentry/sentry-unreal#745 - getsentry/sentry-unreal#436 - getsentry/sentry-unreal#589 - getsentry/sentry-unreal#1057 - getsentry/sentry-unreal#669 --------- Co-authored-by: Bruno Garcia <[email protected]>
Addresses #733 and #754.
The intent of this change is to better align the structure/layout of code with Unreal by separating out platform-specific code in a more meaningful way.
SentrySubsystemDesktopintoGenericPlatform,Microsoft,Windows, andLinuxMicrosoftand notWindows)typedefoverrides for multiplatform implementations (e.g. Sentry subsystem)HALto house platform-specific includes, overrides, and macrosTSentryImplWrapper<>)