Skip to content

Conversation

@ra1028
Copy link
Owner

@ra1028 ra1028 commented May 26, 2025

Pull Request Type

  • Bug fix
  • New feature
  • Refactoring
  • Documentation update
  • Chore

Description

With the introduction of AsyncPhaseAtom, there is not so much demand to make it possible to define atoms that wrap other atoms. Now that the cost of maintaining the stability and code maintainability of the Refreshable and Resettable behavior is no longer worth their convenience, they're being deprecated in this version and removed in the next version.

@ra1028 ra1028 force-pushed the deprecate-refreshable-resettable branch from 7fbd2b2 to 27775aa Compare May 26, 2025 10:12
@ra1028 ra1028 marked this pull request as ready for review May 26, 2025 10:13
Copilot AI review requested due to automatic review settings May 26, 2025 10:13
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR deprecates the Refreshable and Resettable functionality by adding @available deprecation attributes throughout the codebase. The key changes include:

  • Adding deprecation annotations to test atoms and production APIs.
  • Removing Refreshable and Resettable conformance from certain test types.
  • Updating API documentation and error messages to reflect the removal of these behaviors.

Reviewed Changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
Tests/AtomsTests/Utilities/TestAtom.swift Added deprecation annotations for test atoms using Refreshable/Resettable.
Tests/AtomsTests/Core/StoreContextTests.swift Removed Refreshable and Resettable conformance in test Atom and updated tests accordingly.
Tests/AtomsTests/Context/AtomViewContextTests.swift Marked custom refresh/reset tests as deprecated.
Tests/AtomsTests/Context/AtomTransactionContextTests.swift Marked custom refresh/reset tests as deprecated.
Tests/AtomsTests/Context/AtomTestContextTests.swift Marked custom refresh/reset tests as deprecated.
Tests/AtomsTests/Context/AtomCurrentContextTests.swift Marked custom refresh/reset tests as deprecated.
Sources/Atoms/Core/StoreContext.swift Added deprecation annotations for refresh and reset methods.
Sources/Atoms/Context/AtomViewContext.swift Added deprecation annotations for refresh and reset methods with a custom deprecation message.
Sources/Atoms/Context/AtomTransactionContext.swift Added deprecation annotations for refresh and reset methods with a custom deprecation message.
Sources/Atoms/Context/AtomTestContext.swift Added deprecation annotations for refresh and reset methods with a custom deprecation message.
Sources/Atoms/Context/AtomCurrentContext.swift Added deprecation annotations for refresh and reset methods with a custom deprecation message.
Sources/Atoms/Context/AtomContext.swift Added deprecation annotations for refresh and reset methods with a custom deprecation message.
Sources/Atoms/Attribute/Resettable.swift Deprecated the Resettable protocol with a message advising a custom reset function alternative.
Sources/Atoms/Attribute/Refreshable.swift Deprecated the Refreshable protocol with a message advising a custom refresh function alternative.

@ra1028 ra1028 force-pushed the deprecate-refreshable-resettable branch from 27775aa to 3f09f37 Compare May 26, 2025 10:18
@ra1028 ra1028 merged commit b35f145 into main May 26, 2025
6 checks passed
@ra1028 ra1028 deleted the deprecate-refreshable-resettable branch May 26, 2025 10:24
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