Skip to content

Adding unsupported hot reload #12683

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

Merged
merged 3 commits into from
Feb 26, 2025
Merged

Adding unsupported hot reload #12683

merged 3 commits into from
Feb 26, 2025

Conversation

rodolfoBee
Copy link
Member

As concluded in getsentry/sentry-dotnet#3889 Hot Reload isn't supported with static libraries. Adding a note to the troubleshooting page.

Closes getsentry/sentry-dotnet#3959

Copy link

vercel bot commented Feb 12, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sentry-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 13, 2025 4:23am
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
changelog ⬜️ Ignored (Inspect) Visit Preview Feb 13, 2025 4:23am
develop-docs ⬜️ Ignored (Inspect) Visit Preview Feb 13, 2025 4:23am

@phunkeler
Copy link

I believe the correct terminology here is Hot Restart. Hot Reload, while somewhat related, refers to a different Visual Studio feature.

@rodolfoBee
Copy link
Member Author

@phunkeler thank you for the correction :D

Copy link

codecov bot commented Feb 12, 2025

Bundle Report

Changes will decrease total bundle size by 15 bytes (-0.0%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
sentry-docs-server-cjs 10.7MB -9 bytes (-0.0%) ⬇️
sentry-docs-client-array-push 9.37MB -6 bytes (-0.0%) ⬇️

Affected Assets, Files, and Routes:

view changes for bundle: sentry-docs-client-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
static/chunks/pages/_app-*.js -3 bytes 865.83kB -0.0%
static/chunks/7801-*.js -3 bytes 390.91kB -0.0%
server/middleware-*.js 5.55kB 6.55kB 555.3% ⚠️
server/middleware-*.js -5.55kB 1.0kB -84.74%
static/J4XrYODc4hCwGEo30X-*.js (New) 578 bytes 578 bytes 100.0% 🚀
static/J4XrYODc4hCwGEo30X-*.js (New) 77 bytes 77 bytes 100.0% 🚀
static/xsi8XB3m-*.js (Deleted) -578 bytes 0 bytes -100.0% 🗑️
static/xsi8XB3m-*.js (Deleted) -77 bytes 0 bytes -100.0% 🗑️
view changes for bundle: sentry-docs-server-cjs

Assets Changed:

Asset Name Size Change Total Size Change (%)
1729.js -3 bytes 1.64MB -0.0%
../instrumentation.js -3 bytes 968.36kB -0.0%
9523.js -3 bytes 944.56kB -0.0%

@@ -50,3 +50,11 @@ using SentrySession = Sentry.Session;
```

Then `SentrySession` can be used instead of `Sentry.Session`.

### VS Hot Restart isn't compatible with static assemblies

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

- ### VS Hot Restart isn't compatible with static assemblies
+ ### Visual Studio Hot Restart Limitation
- ### VS Hot Restart isn't compatible with static assemblies
+ ### Visual Studio Hot Restart Incompatibility

A bit more concise.


> The xcframework sentry.bindings.cocoa\5.0.1\lib\net8.0-ios17.0\Sentry.Bindings.Cocoa.resources.zip has an incorrect or unknown format and cannot be processed.

This happens because Hot Restart does not support static iOS libraries or frameworks containing static libraries, as detailed in the [Microsoft documentation](https://learn.microsoft.com/en-us/dotnet/maui/ios/hot-restart?view=net-maui-9.0#limitations).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aritchie curious, nothing we can do about this?

People need to uninstall Sentry to use Hot Restart?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bruno-garcia We may be able to detect hotrestart in a prebuild step, but I'm not sure. I'll look into it. I wish the tooling gave better error messages in these cases

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just seems like we at least need to say then: "To use Hot Restart you'll need to remove the Sentry SDK" if that's the solution. But that's quite sub optimal obviously

Copy link
Collaborator

@aritchie aritchie Feb 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is likely some form of condition that can be applied to the package reference and if/def constant you can use in code to remove UseSentry. I'll ask around.

Thoughts

<PackageReference Include="Sentry.Maui" Condition="$(HOT_RESTART) == 'false'" />
#if !HOTRESTART
.UseSentry(...)
#endif

@rodolfoBee rodolfoBee merged commit 49365e6 into master Feb 26, 2025
11 checks passed
@rodolfoBee rodolfoBee deleted the add-hot-reload-unsupported branch February 26, 2025 08:53
codyde added a commit that referenced this pull request Feb 27, 2025
* master: (45 commits)
  feat: Mention that the cookie-sync extension works for previews (#12858)
  ref(flags): update unleashIntegration param (#12795)
  ref(sveltekit): Adjust Cloudflare setup to only use SvelteKit SDK (#12801)
  docs(python): Clarify how to init SDK in `async` app (#12854)
  move content about error capturing to "Capturing Errors and Events" from "Manual Setup" (Next.js) (#12786)
  docs(span-links): Add develop docs for span links (#12829)
  feat(java): add Reactor integration docs (#12686)
  Add Quarkus to community maintained SDKs (#12834)
  Adding unsupported hot reload (#12683)
  Fix broken links (#12844)
  feat(python): Clarification regarding start_transaction (#12835)
  docs(flutter): Fix event serverName reset in samples (#12832)
  ref(insights): move performance docs under insights (#12720)
  Bump API schema to 2e61347a (#12836)
  fix(apple): Usages of sendDefaultPii (#12833)
  Add `sendDefaultPii: true` to React Native init code snippets (#12812)
  Only show Browser vs React Native source maps alert for browser sdks (#12816)
  Add Data Collected page for React Native (#12811)
  Fix React Native Onboarding Option Buttons (#12813)
  Add Hono guide (#12710)
  ...
@github-actions github-actions bot locked and limited conversation to collaborators Mar 14, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document xcframework errors when using Hot Reload with a remote Mac
5 participants