{"payload":{"feedbackUrl":"https://github.com/orgs/community/discussions/53140","repo":{"id":55717457,"defaultBranch":"main","name":"FBRetainCycleDetector","ownerLogin":"facebook","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2016-04-07T18:17:16.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/69631?v=4","public":true,"private":false,"isOrgOwned":true},"refInfo":{"name":"","listCacheKey":"v0:1631652985.346432","currentOid":""},"activityList":{"items":[{"before":"3d53bfe535e70963cba3fa4049305023c0dfc3b9","after":"d47cba6db773b97757f85ebd7dbe1f188150b50f","ref":"refs/heads/main","pushedAt":"2024-08-20T02:15:18.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"facebook-github-bot","name":"Facebook Community Bot","path":"/facebook-github-bot","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6422482?s=80&v=4"},"commit":{"message":"Fix Swift introspection when reading inherited properties (#135)\n\nSummary:\nFix a bug preventing object references from being detected when the reference is from a property inherited from a parent class.\n\nExample:\n\n```swift\n\nclass SomeClass {\n var someReference: AnyObject? = nil\n}\n\nclass Child: SomeClass {\n init() {}\n}\n\nlet object = Child()\n// This reference will not be inspected successfully\nobject.someReference = object\n```\n\nThe logic [here](https://github.com/facebook/FBRetainCycleDetector/blob/3d53bfe535e70963cba3fa4049305023c0dfc3b9/FBRetainCycleDetector/Graph/FBObjectiveCObject.m#L32-L34) would receive a `nil` value for `referencedObject` if the object's `Mirror` did not have a direct child for the associated `Ivar`.\n\nNote: I have tested this manually but the existing project is not in a buildable state in order to be able to write a test.\n\nPull Request resolved: https://github.com/facebook/FBRetainCycleDetector/pull/135\n\nReviewed By: thegreatwallfb\n\nDifferential Revision: D61506837\n\nPulled By: simpleton\n\nfbshipit-source-id: 6994489be78ef2ff0d6b7debe00112c9740bfeb8","shortMessageHtmlLink":"Fix Swift introspection when reading inherited properties (#135)"}},{"before":"d01173a7283bb8d0cba4cd8fc60e673f430a8cf9","after":"3d53bfe535e70963cba3fa4049305023c0dfc3b9","ref":"refs/heads/main","pushedAt":"2024-06-18T18:33:55.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"facebook-github-bot","name":"Facebook Community Bot","path":"/facebook-github-bot","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6422482?s=80&v=4"},"commit":{"message":"Improve the conditionals\n\nSummary:\nMinor update to check:\n- `currentClass` is not `nil` at the start of the loop.\n- Stop checking if `layoutCache` is `nil`. Is not needed.\n\nDifferential Revision: D58732818\n\nfbshipit-source-id: e6de71cfd2b6d5632c706baecc18706856a40f4e","shortMessageHtmlLink":"Improve the conditionals"}},{"before":"a8969d47879d8e6c71e8f37bc462fe506e20c38b","after":"d01173a7283bb8d0cba4cd8fc60e673f430a8cf9","ref":"refs/heads/main","pushedAt":"2024-06-10T17:46:30.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"facebook-github-bot","name":"Facebook Community Bot","path":"/facebook-github-bot","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6422482?s=80&v=4"},"commit":{"message":"Fix Crash for KVO classes\n\nSummary:\nThere is a difference in the types supported by Objc and Swift. When a class implements Key-Value Observing ([KVO](https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/KeyValueObserving/KeyValueObserving.html)) there is a dynamically-generated subclass created. This classes are not supported by Swift type:link(https://forums.swift.org/t/type-of-vs-object-getclass-difference/59404/2)]\nand made Swift Introspection crash.\n\nTo fix this we need to get the class in swift calling:\n let typeObj = type(of: object)\nAnd avoid using in swift the class we got in Objc using:\n object_getClass()\n\nReviewed By: thegreatwallfb\n\nDifferential Revision: D58285366\n\nfbshipit-source-id: 8c453eb2d681843d532d473efc9e96443581fb52","shortMessageHtmlLink":"Fix Crash for KVO classes"}},{"before":"45c5de457d4c860b96a00f34ca6428d7f3527e13","after":"a8969d47879d8e6c71e8f37bc462fe506e20c38b","ref":"refs/heads/main","pushedAt":"2024-05-16T13:02:47.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"facebook-github-bot","name":"Facebook Community Bot","path":"/facebook-github-bot","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6422482?s=80&v=4"},"commit":{"message":"Using AnyBidirectionalCollection to fix crash.\n\nSummary:\nThere is a crash when looping for the children:\n {F1638807711}\n\nIn apple docs they advice to use AnyBidirectionalCollection:\n>When working with a mirror that reflects a bidirectional or random access collection, you may find it useful to “upgrade” instances of this type to AnyBidirectionalCollection or AnyRandomAccessCollection.\nhttps://developer.apple.com/documentation/swift/mirror/children-swift.typealias\n\nI implemented it, and fix the crash\n\nReviewed By: hash3r\n\nDifferential Revision: D57384249\n\nfbshipit-source-id: dc66c1d0ec26b731f6db496e5837d145b554cd4a","shortMessageHtmlLink":"Using AnyBidirectionalCollection to fix crash."}},{"before":"dc92bb41a972d7cccf4b18661d0f73ae424587a5","after":"45c5de457d4c860b96a00f34ca6428d7f3527e13","ref":"refs/heads/main","pushedAt":"2024-05-14T08:04:37.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"facebook-github-bot","name":"Facebook Community Bot","path":"/facebook-github-bot","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6422482?s=80&v=4"},"commit":{"message":"Including number of elements and number of swift objects in RCD logs.\n\nSummary:\nTo Include the number of elements and number of swift objects in RCD logs we need to:\n\n- Server side:\n - Add the fields to logger config: `RetainCycleDetectorBatchReportLoggerConfig`\n - Add the fields to the Falco Event `RetainCycleDetectorBatchReportFalcoEvent`\n - Add the files to logger config `TReliabilityCoreIOSRetainCycleFields`\n - Update processor to include the new files in the tables:\n\n**This diff**:\n- Client side:\n - Update the structure logger.\n - Report each leak in its own event rather than batch them.\n\nFollowed:\nhttps://www.internalfb.com/intern/wiki/Users/contactamit/Quick_Guide_to_Structured_logging/\n ./eventschema_sync.sh retain_cycle_detector_batch_report --host www.90222.od.facebook.com\n\nReviewed By: thegreatwallfb\n\nDifferential Revision: D57161188\n\nfbshipit-source-id: 602ad3028b899155b68d9287f097a6053b0c9eef","shortMessageHtmlLink":"Including number of elements and number of swift objects in RCD logs."}},{"before":"d1951bf3fb5c6f63b877f9abfdc18600521e6cbe","after":"dc92bb41a972d7cccf4b18661d0f73ae424587a5","ref":"refs/heads/main","pushedAt":"2024-05-08T11:33:37.000Z","pushType":"push","commitsCount":2,"pusher":{"login":"facebook-github-bot","name":"Facebook Community Bot","path":"/facebook-github-bot","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6422482?s=80&v=4"},"commit":{"message":"Adding FBSwiftReference to detect swift objects.\n\nSummary:\nTo detect cycles with swift object we need to check if and object is a SwiftClass or not. If is a SwiftClass we use `FBGetStrongReferencesForSwiftClass` to get all the references. The reference of a SwiftClass are retrieved using SwiftIntrospector.swift, this code is [Unlicense license](https://github.com/gor-gyolchanyan-swift/introspection-kit?tab=Unlicense-1-ov-file) and we can change it and include in our codebase without concerns.\n\nThis detect cycles that include:\n- Objc-backed Swift classes\n- Pure Swift classes\n\nTo enable detection of SwiftClass we need to set `shouldIncludeSwiftObjects` to true in the configuration.\n\nReviewed By: thegreatwallfb\n\nDifferential Revision: D56762443\n\nfbshipit-source-id: 345f6c6e730e8b451803a74b77bd4fd4612227b4","shortMessageHtmlLink":"Adding FBSwiftReference to detect swift objects."}},{"before":"06bf5e69d151f625c0ccedcf7dede39c27371eaa","after":"d1951bf3fb5c6f63b877f9abfdc18600521e6cbe","ref":"refs/heads/main","pushedAt":"2024-05-01T08:24:48.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"facebook-github-bot","name":"Facebook Community Bot","path":"/facebook-github-bot","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6422482?s=80&v=4"},"commit":{"message":"String class name in the cache to avoid crash with swift clases.\n\nSummary:\nThere is a crash when calling `copyWithZone` on a pure swift class. This classes does not conform to NSCoping.\n>Unrecognized selector +[FBRetainCycleDetectorTests.RCDSwiftObjectWrapperTestClass copyWithZone:]\n{F1500209108}\n\nTo fix that I'm, using the the class name as a key in the cash. Class name include the package name:\n>FBRetainCycleDetectorTests.PureSwift\n\nReviewed By: thegreatwallfb\n\nDifferential Revision: D56569853\n\nfbshipit-source-id: c30b6e1a61f625b1ce0663730ed9f9c97fc03a83","shortMessageHtmlLink":"String class name in the cache to avoid crash with swift clases."}},{"before":"741c73cc5493290530d560e830e2f57cb712e477","after":"06bf5e69d151f625c0ccedcf7dede39c27371eaa","ref":"refs/heads/main","pushedAt":"2024-04-30T14:50:06.000Z","pushType":"push","commitsCount":2,"pusher":{"login":"facebook-github-bot","name":"Facebook Community Bot","path":"/facebook-github-bot","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6422482?s=80&v=4"},"commit":{"message":"Adding test in swift to confirm that RCD does not detect cycles with Swift Objects.\n\nSummary:\nTo include Swift objects in the test, the test needs to be written in Swift.\nOne of these tests confirms that RCD can't detect cycles containing Swift objects. Once we implement this, I will change the test to assert that it finds the cycle.\n\nReviewed By: thegreatwallfb\n\nDifferential Revision: D56569592\n\nfbshipit-source-id: 29f13042459c784f4aa824f85ea53f6caae802d8","shortMessageHtmlLink":"Adding test in swift to confirm that RCD does not detect cycles with …"}},{"before":"f4178df12681de58372e9a77ffaaba430b97d3d0","after":"741c73cc5493290530d560e830e2f57cb712e477","ref":"refs/heads/main","pushedAt":"2024-03-21T15:40:27.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"facebook-github-bot","name":"Facebook Community Bot","path":"/facebook-github-bot","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6422482?s=80&v=4"},"commit":{"message":"Fix warning on test\n\nSummary:\n**Fixing a waning about _Nullable pointer**:\n\n FBStructEncodingParserTests.mm:76:11:\n\n warning: implicit conversion from nullable pointer\n 'const char * _Nullable' to non-nullable pointer type 'const char * _Nonnull' [-Wnullable-to-nonnull-conversion]\n if ([@(ivar_getName(ivar)) isEqualToString:ivarName]) {\n ^\n\n**Remnove unused header:**\n #import \"FBRetainCycleDetector.h\"\n\nReviewed By: thegreatwallfb\n\nDifferential Revision: D55125323\n\nfbshipit-source-id: c00d4f89cfe80fc7224e9f4d73439abfa8bb1c1e","shortMessageHtmlLink":"Fix warning on test"}},{"before":"c50e35e2dcc367dac784b8cde85cbffff38ec9f0","after":"f4178df12681de58372e9a77ffaaba430b97d3d0","ref":"refs/heads/main","pushedAt":"2024-01-24T20:23:19.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"facebook-github-bot","name":"Facebook Community Bot","path":"/facebook-github-bot","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6422482?s=80&v=4"},"commit":{"message":"Suppress -Wnullable-to-nonnull-conversion violations (#65)\n\nReviewed By: ingridwang\n\nDifferential Revision: D52996338\n\nfbshipit-source-id: 5ad11b848df18058fd735b9cd9f12322ae07c3fb","shortMessageHtmlLink":"Suppress -Wnullable-to-nonnull-conversion violations (#65)"}},{"before":"11d898602fc7335b847a6b8a6d4bf9c7250927d1","after":"c50e35e2dcc367dac784b8cde85cbffff38ec9f0","ref":"refs/heads/main","pushedAt":"2023-12-15T21:32:46.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"facebook-github-bot","name":"Facebook Community Bot","path":"/facebook-github-bot","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6422482?s=80&v=4"},"commit":{"message":"Remove deprecated usesWeakReadAndWriteBarriers in FBRetainCycleDetector\n\nSummary:\nThese lines were added back in 2015 with D2456541, but `usesWeakReadAndWriteBarriers` has since been deprecated by Apple:\n\n> warning: 'usesWeakReadAndWriteBarriers' is deprecated: first deprecated in iOS 10.0 - Garbage collection no longer supported\n\nGiven the deprecation message, seems like these checks are no longer relevant and can be removed?\n\nReviewed By: caodoan\n\nDifferential Revision: D52089838\n\nfbshipit-source-id: 88f436113fc65a8e58557de87ce0e0ddad3e65a0","shortMessageHtmlLink":"Remove deprecated usesWeakReadAndWriteBarriers in FBRetainCycleDetector"}},{"before":"00025bb0e2143f515c2f07b3ed64427ead652ca4","after":"11d898602fc7335b847a6b8a6d4bf9c7250927d1","ref":"refs/heads/main","pushedAt":"2023-03-29T22:07:42.325Z","pushType":"push","commitsCount":1,"pusher":{"login":"facebook-github-bot","name":"Facebook Community Bot","path":"/facebook-github-bot","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6422482?s=80&v=4"},"commit":{"message":"Fix -Wstrict-prototypes for fbobjc/VendorLib\n\nSummary: this fixes a \"-Wstrict-prototypes\"\n\nReviewed By: rmaz\n\nDifferential Revision: D44510229\n\nfbshipit-source-id: 0418e5a1ff233615b1978bb9d24fb13fa011bf91","shortMessageHtmlLink":"Fix -Wstrict-prototypes for fbobjc/VendorLib"}},{"before":"82375c1316f14568756e7a92827a5fe13b9d6d66","after":"00025bb0e2143f515c2f07b3ed64427ead652ca4","ref":"refs/heads/main","pushedAt":"2023-03-27T17:38:59.151Z","pushType":"push","commitsCount":1,"pusher":{"login":"facebook-github-bot","name":"Facebook Community Bot","path":"/facebook-github-bot","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6422482?s=80&v=4"},"commit":{"message":"add missing function prototypes\n\nSummary: Add missing function prototypes to unblock `-Wstrict-prototypes`\n\nReviewed By: NuriAmari\n\nDifferential Revision: D44420741\n\nfbshipit-source-id: f320d135d91a5d7ad0568b404b6f9ea190cbe738","shortMessageHtmlLink":"add missing function prototypes"}}],"hasNextPage":false,"hasPreviousPage":false,"activityType":"all","actor":null,"timePeriod":"all","sort":"DESC","perPage":30,"startCursor":"Y3Vyc29yOnYyOpK7MjAyNC0wOC0yMFQwMjoxNToxOC4wMDAwMDBazwAAAASenEYl","endCursor":"Y3Vyc29yOnYyOpK7MjAyMy0wMy0yN1QxNzozODo1OS4xNTE3NjNazwAAAAMMQ2XF"}},"title":"Activity · facebook/FBRetainCycleDetector"}