Skip to content

Migrate var usage in data classes#70

Merged
Goooler merged 4 commits intotrunkfrom
copilot/migrate-var-to-val-data-classes
Apr 17, 2026
Merged

Migrate var usage in data classes#70
Goooler merged 4 commits intotrunkfrom
copilot/migrate-var-to-val-data-classes

Conversation

Copy link
Copy Markdown

Copilot AI commented Apr 17, 2026

Summary

  • Migrated mutable data-class properties to immutable patterns where safe:
    • ProxyState.now, Profile.download, TunDevice.stack, and NetworkInfo fields are now immutable.
  • Updated mutation call sites to use immutable updates:
    • ProxyActivity now replaces list entries via copy(...).
    • NetworkObserveModule now updates map entries via computeIfPresent(..., copy(...)).
  • For ConfigurationOverride and nested models that rely on mutable property references in settings UIs, removed the data modifier to preserve existing behavior while eliminating var usage in data class declarations.

Validation

  • ./gradlew --no-daemon spotlessCheck test assemble (before and after changes): fails in this environment due inability to resolve Android Gradle plugin com.android.application:9.1.1 from configured repositories (network/repository access issue).
  • parallel_validation:
    • Code Review: completed; one naming-style suggestion remains (subjective conflict).
    • CodeQL Security Scan: no analyzable language changes detected.

@Goooler Goooler marked this pull request as ready for review April 17, 2026 12:43
@Goooler Goooler enabled auto-merge (squash) April 17, 2026 12:43
@Goooler Goooler merged commit d9eba66 into trunk Apr 17, 2026
1 of 2 checks passed
@Goooler Goooler deleted the copilot/migrate-var-to-val-data-classes branch April 17, 2026 12:49
Goooler added a commit that referenced this pull request Apr 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants