perf(compose): add stability configuration for non-Compose model types#855
Merged
Conversation
Adds compose_compiler_config.conf and wires it into both the library Compose convention plugin and the app module. This tells the Compose compiler to treat key model types from non-Compose modules as stable, enabling skipping optimizations for composables that accept them. Covered types: - Solana key hierarchy (Key32, PublicKey, Mint) - Financial models (Fiat, Rate, LocalFiat, MintMetadata, TokenWithBalance, TokenWithLocalizedBalance, etc.) - Social links (sealed interface + subtypes) - Bill customizations (contains ByteArray with custom equals) - JDK/Kotlin time types (java.time.Instant, kotlin.time.Instant)
Delete com.getcode.model.Fiat, GenericAmount, SocialUser, TwitterUser from libs/models and KinAmount + KinAmountExt from libs/currency. Stub chat Exchange/MessageTip/payment code with TODO(chat-v2) comments for reimplementation with OCP Fiat. Remove KinAmount overloads from PriceWithFlag and Currency.format. Clean up stability config.
0f7b509 to
1924479
Compare
These Solana program instruction files in libs/crypto are superseded by services/opencode equivalents and have zero external consumers.
Delete 37 files (25 main + 12 tests) from libs/crypto/solana that are fully superseded by services/opencode equivalents with zero external consumers. Retains only the RPC layer (Calls, Requests, RpcConfig) and SolanaModule used by PhantomWalletController.
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.
Summary
compose_compiler_config.confat the project root to mark model types from non-Compose modules as stablebuild.gradle.ktsTypes stabilized
Key32,PublicKey,MintFiat,Rate,LocalFiat,MintMetadata,TokenWithBalance,TokenWithLocalizedBalance,VmMetadata,LaunchpadMetadata,HolderMetricsSocialLinksealed interface +Website,X,Telegram,DiscordTokenBillCustomizations(ByteArray with custom equals)java.time.Instant,kotlin.time.Instantcom.getcode.model.FiatWhy stability config vs annotations
These types live in modules (
services/opencode,libs/encryption/keys,libs/models) that have no Compose runtime dependency. Adding@Stable/@Immutablewould require pulling in the Compose runtime — wrong dependency direction. The stability config file is the recommended approach for this case.Note
LocalFiatcurrently hasjavax.annotation.concurrent.@Immutablewhich is invisible to the Compose compiler. The stability config now handles it correctly.