Fix for mutable config#179
Merged
Merged
Conversation
This was just casting to a RollbarMutableConfig, but it wasn’t actually mutable. This makes the config actually mutable
| RollbarMutableConfig *config = ((RollbarMutableConfig *)[Rollbar configuration]); | ||
| RollbarMutableConfig *config = [[Rollbar configuration] mutableCopy]; | ||
| if (config) { | ||
| updateConfiguration(config, options); |
There was a problem hiding this comment.
I've run into the same issue following the Rollbar setup docs. Thank you for tackling this!
If I'm following the code path correctly here, is it possible that you need to add a call to
[Rollbar updateWithConfiguration:config];after this? It seems like updateConfiguration(...) here is updating the mutable copy of the configuration, but not actually applying the changes in that copy to Rollbar.
Member
|
Thank you @jbennett and @jgregory-apogee! We'll get this reviewed. |
waltjones
approved these changes
Sep 26, 2023
waltjones
left a comment
Contributor
There was a problem hiding this comment.
@jbennett , @jgregory-apogee thank you for the fix!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When making changes to the configuration (setting access token, changing user etc), a non-mutable config is used.
This change calls
mutableCopyon the RollbarConfig instead of just casting it to a RollbarMutableConfig.Type of change
Related issues
Checklists
Development
Code review