-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
fix(RCTImageLoader): Adds requiresMainQueueSetup
to fix v0.52
#17679
Conversation
@facebook-github-bot label Android Attention: @shergin Generated by 🚫 dangerJS |
Does this actually require main queue setup? All the init does is settings an ivar to nil. Might be a case where we can set requiresMainQueueSetup to NO as an optimisation. cc @shergin |
I agree with Janic @janicduplessis, but someone has to do the audit of this module. After one minute looking I think we should return |
@shergin Do you know what the |
Confirming still a warning in 0.53 |
@iRoachie I tried to find reviewers for this pull request and wanted to ping them to take another look. However, based on the blame information for the files in this pull request I couldn't find any reviewers. This sometimes happens when the files in the pull request are new or don't exist on master anymore. Is this pull request still relevant? If yes could you please rebase? In case you know who has context on this code feel free to mention them in a comment (one person is fine). Thanks for reading and hope you will continue contributing to the project. |
The assignment of the ivar should be able to run on any queue, whether or not the |
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 should be NO unless there's some reason this isn't queue-safe.
@ide Is that a confirmation to change it to NO? |
I think it should be NO but would appreciate another analysis. |
Looks like @janicduplessis @shergin and @ide are all on the same page -- this should return NO. |
In react-native v0.52 this warning shows - "RCTImageLoader requires main queue setup since it overrides `init` but doesn't implement `requiresMainQueueSetup`". This removes the warning by implementing requiresMainQueueSetup Closes #17504
@hramos Updated |
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.
@hramos has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Thanks for fixing this! Sorry for the delay in merging... |
Summary: <!-- Thank you for sending the PR! We appreciate you spending the time to work on these changes. Help us understand your motivation by explaining why you decided to make this change. You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html Happy contributing! --> In react-native v0.52 this warning shows: ``` "RCTImageLoader requires main queue setup since it overrides `init` but doesn't implement `requiresMainQueueSetup`". ``` This removes the warning by implementing `requiresMainQueueSetup` on RCTImageLoader * Create new react-native project * Enable Remote JS Debugging * Should see no warning regarding RCTImageLoader requiring main queue setup <!-- Help reviewers and the release process by writing your own release notes **INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.** CATEGORY [----------] TYPE [ CLI ] [-------------] LOCATION [ DOCS ] [ BREAKING ] [-------------] [ GENERAL ] [ BUGFIX ] [-{Component}-] [ INTERNAL ] [ ENHANCEMENT ] [ {File} ] [ IOS ] [ FEATURE ] [ {Directory} ] |-----------| [ ANDROID ] [ MINOR ] [ {Framework} ] - | {Message} | [----------] [-------------] [-------------] |-----------| [CATEGORY] [TYPE] [LOCATION] - MESSAGE EXAMPLES: [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see --> [IOS] [BUGFIX] [Libraries/Image/RCTImageLoader.m] - Implements `requiresMainQueueSetup` Closes facebook#17679 Reviewed By: shergin Differential Revision: D7159601 Pulled By: fkgozali fbshipit-source-id: e17bae67f4005d2c9ddd0d3701506521f3cac152
Summary: <!-- Thank you for sending the PR! We appreciate you spending the time to work on these changes. Help us understand your motivation by explaining why you decided to make this change. You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html Happy contributing! --> In react-native v0.52 this warning shows: ``` "RCTImageLoader requires main queue setup since it overrides `init` but doesn't implement `requiresMainQueueSetup`". ``` This removes the warning by implementing `requiresMainQueueSetup` on RCTImageLoader * Create new react-native project * Enable Remote JS Debugging * Should see no warning regarding RCTImageLoader requiring main queue setup <!-- Help reviewers and the release process by writing your own release notes **INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.** CATEGORY [----------] TYPE [ CLI ] [-------------] LOCATION [ DOCS ] [ BREAKING ] [-------------] [ GENERAL ] [ BUGFIX ] [-{Component}-] [ INTERNAL ] [ ENHANCEMENT ] [ {File} ] [ IOS ] [ FEATURE ] [ {Directory} ] |-----------| [ ANDROID ] [ MINOR ] [ {Framework} ] - | {Message} | [----------] [-------------] [-------------] |-----------| [CATEGORY] [TYPE] [LOCATION] - MESSAGE EXAMPLES: [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see --> [IOS] [BUGFIX] [Libraries/Image/RCTImageLoader.m] - Implements `requiresMainQueueSetup` Closes facebook#17679 Reviewed By: shergin Differential Revision: D7159601 Pulled By: fkgozali fbshipit-source-id: e17bae67f4005d2c9ddd0d3701506521f3cac152
Summary: <!-- Thank you for sending the PR! We appreciate you spending the time to work on these changes. Help us understand your motivation by explaining why you decided to make this change. You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html Happy contributing! --> In react-native v0.52 this warning shows: ``` "RCTImageLoader requires main queue setup since it overrides `init` but doesn't implement `requiresMainQueueSetup`". ``` This removes the warning by implementing `requiresMainQueueSetup` on RCTImageLoader * Create new react-native project * Enable Remote JS Debugging * Should see no warning regarding RCTImageLoader requiring main queue setup <!-- Help reviewers and the release process by writing your own release notes **INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.** CATEGORY [----------] TYPE [ CLI ] [-------------] LOCATION [ DOCS ] [ BREAKING ] [-------------] [ GENERAL ] [ BUGFIX ] [-{Component}-] [ INTERNAL ] [ ENHANCEMENT ] [ {File} ] [ IOS ] [ FEATURE ] [ {Directory} ] |-----------| [ ANDROID ] [ MINOR ] [ {Framework} ] - | {Message} | [----------] [-------------] [-------------] |-----------| [CATEGORY] [TYPE] [LOCATION] - MESSAGE EXAMPLES: [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see --> [IOS] [BUGFIX] [Libraries/Image/RCTImageLoader.m] - Implements `requiresMainQueueSetup` Closes facebook#17679 Reviewed By: shergin Differential Revision: D7159601 Pulled By: fkgozali fbshipit-source-id: e17bae67f4005d2c9ddd0d3701506521f3cac152
Summary: <!-- Thank you for sending the PR! We appreciate you spending the time to work on these changes. Help us understand your motivation by explaining why you decided to make this change. You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html Happy contributing! --> In react-native v0.52 this warning shows: ``` "RCTImageLoader requires main queue setup since it overrides `init` but doesn't implement `requiresMainQueueSetup`". ``` This removes the warning by implementing `requiresMainQueueSetup` on RCTImageLoader * Create new react-native project * Enable Remote JS Debugging * Should see no warning regarding RCTImageLoader requiring main queue setup <!-- Help reviewers and the release process by writing your own release notes **INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.** CATEGORY [----------] TYPE [ CLI ] [-------------] LOCATION [ DOCS ] [ BREAKING ] [-------------] [ GENERAL ] [ BUGFIX ] [-{Component}-] [ INTERNAL ] [ ENHANCEMENT ] [ {File} ] [ IOS ] [ FEATURE ] [ {Directory} ] |-----------| [ ANDROID ] [ MINOR ] [ {Framework} ] - | {Message} | [----------] [-------------] [-------------] |-----------| [CATEGORY] [TYPE] [LOCATION] - MESSAGE EXAMPLES: [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see --> [IOS] [BUGFIX] [Libraries/Image/RCTImageLoader.m] - Implements `requiresMainQueueSetup` Closes facebook#17679 Reviewed By: shergin Differential Revision: D7159601 Pulled By: fkgozali fbshipit-source-id: e17bae67f4005d2c9ddd0d3701506521f3cac152
Summary: <!-- Thank you for sending the PR! We appreciate you spending the time to work on these changes. Help us understand your motivation by explaining why you decided to make this change. You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html Happy contributing! --> In react-native v0.52 this warning shows: ``` "RCTImageLoader requires main queue setup since it overrides `init` but doesn't implement `requiresMainQueueSetup`". ``` This removes the warning by implementing `requiresMainQueueSetup` on RCTImageLoader * Create new react-native project * Enable Remote JS Debugging * Should see no warning regarding RCTImageLoader requiring main queue setup <!-- Help reviewers and the release process by writing your own release notes **INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.** CATEGORY [----------] TYPE [ CLI ] [-------------] LOCATION [ DOCS ] [ BREAKING ] [-------------] [ GENERAL ] [ BUGFIX ] [-{Component}-] [ INTERNAL ] [ ENHANCEMENT ] [ {File} ] [ IOS ] [ FEATURE ] [ {Directory} ] |-----------| [ ANDROID ] [ MINOR ] [ {Framework} ] - | {Message} | [----------] [-------------] [-------------] |-----------| [CATEGORY] [TYPE] [LOCATION] - MESSAGE EXAMPLES: [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see --> [IOS] [BUGFIX] [Libraries/Image/RCTImageLoader.m] - Implements `requiresMainQueueSetup` Closes facebook#17679 Reviewed By: shergin Differential Revision: D7159601 Pulled By: fkgozali fbshipit-source-id: e17bae67f4005d2c9ddd0d3701506521f3cac152
Still happening in |
This does not show in 0.56 for me |
@jose920405 None of your warnings refers to RCTImageLoader. They may come from other components within the react-native core or any native components you may be using in your project. You may want to create issues in the respective projects. |
…arnings This change mimics changes made in other RN modules like RCTImageLoader, react-native-share,etc react-native-share/react-native-share#331 facebook/react-native#17679 Starting this RN version, FB seems to default to NO main queue anyways, if not specified. But they raise these warnings anyway. Former-commit-id: 01a4cb4fed3760290f90d613e74ffa9a6b18c981
…arnings This change mimics changes made in other RN modules like RCTImageLoader, react-native-share,etc react-native-share/react-native-share#331 facebook/react-native#17679 Starting this RN version, FB seems to default to NO main queue anyways, if not specified. But they raise these warnings anyway. Former-commit-id: 01a4cb4fed3760290f90d613e74ffa9a6b18c981 Former-commit-id: 7f7b2f4 [formerly 81c55f2] Former-commit-id: 603678e10722369faebb9116903a9a96e809dfb6
…arnings This change mimics changes made in other RN modules like RCTImageLoader, react-native-share,etc react-native-share/react-native-share#331 facebook/react-native#17679 Starting this RN version, FB seems to default to NO main queue anyways, if not specified. But they raise these warnings anyway. Former-commit-id: 01a4cb4fed3760290f90d613e74ffa9a6b18c981 Former-commit-id: 81c55f2
Motivation
In react-native v0.52 this warning shows:
This removes the warning by implementing
requiresMainQueueSetup
on RCTImageLoaderTest Plan
Related Issues
#17504
Release Notes
[IOS] [BUGFIX] [Libraries/Image/RCTImageLoader.m] - Implements
requiresMainQueueSetup