Last 12 weeks · 0 commits
6 of 6 standards met
uses to test types: https://github.com/facebook/litho/blob/55e28e58930a53133620fd32406ec8c3a9116c0c/litho-processor/src/main/java/com/facebook/litho/specmodels/processor/SpecElementTypeDeterminator.java#L75 This is fragile because will return any type annotations that are present on the type, which breaks the comparison. I think this isn't currently causing problems because that logic is used to test fields in Kotlin classes, and when using kapt it creates stubs with fully qualified class names, and there's a javac bug that causes the type annotations to not be correctly handled in that case (JDK-8381925). For example with The type should be printed as . The tests for SpecElementTypeDeterminator don't cover this because they use instead of , and the javax annotation isn't a type annotation. https://github.com/facebook/litho/blob/55e28e58930a53133620fd32406ec8c3a9116c0c/litho-it/src/test/com/facebook/litho/specmodels/processor/SpecElementTypeDeterminatorTest.java#L41
✨ Code Quality Problem is a mutable global ( field) that can be changed at runtime, but it is not or atomic. Reads/writes from different threads are a data race on JVM memory visibility, so one thread may not observe updates made by another. This can produce inconsistent thread-utils behavior during runtime toggles. Severity: File: Solution Make visibility guarantees explicit using (or if compare/set is needed): object RenderCoreThreadUtilsConfig { @JvmField @Volatile var isEndToEndTestRun: Boolean = System.getProperty("IS_TESTING") != null } Alternative: private val isEndToEndTestRun = AtomicBoolean(System.getProperty("IS_TESTING") != null) Changes (modified) Summary Changelog Test Plan 🤖 About this PR This pull request was generated by ContribAI, an AI agent that helps improve open source projects. The change was: 1. Discovered by automated code analysis 2. Generated by AI with context-aware code generation 3. Self-reviewed by AI quality checks If you have questions or feedback about this PR, please comment below. We appreciate your time reviewing this contribution! Closes #1081
Repository: facebook/litho. Description: A declarative framework for building efficient UIs on Android. Stars: 7770, Forks: 763. Primary language: Kotlin. Languages: Kotlin (57.6%), Java (35.2%), C++ (5%), Starlark (1.6%), JavaScript (0.2%). License: Apache-2.0. Homepage: https://fblitho.com Latest release: v0.49.1 (2y ago). Open PRs: 55, open issues: 60. Last activity: 4d ago. Community health: 87%. Top contributors: passy, astreet, mihaelao, IanChilds, pasqualeanatriello, marco-cova, zielinskimz, adityasharat, pentiumao, lucasr and others.