-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor: Move DataStore Model schema to Internal directory #563
Conversation
@@ -9,6 +9,7 @@ import Foundation | |||
|
|||
// MARK: - Embeddable | |||
|
|||
/// Note that although this is public, it is intended for internal use and not consumed directly by host applications. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's have something a little more noticeable and dire:
/// <rest of comment>
/// - Warning: Although this has `public` access, it is intended for internal use and should not be used directly
/// by host applications. The behavior of this may change without warning.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, taking this comment and applying it below the existing comment for classes. removing from extensions
Amplify/Categories/DataStore/Model/Internal/Schema/Model+Schema.swift
Outdated
Show resolved
Hide resolved
Amplify/Categories/DataStore/Model/Internal/Model+Subscript.swift
Outdated
Show resolved
Hide resolved
Amplify/Categories/DataStore/Model/Internal/Model+ModelName.swift
Outdated
Show resolved
Hide resolved
@@ -7,6 +7,7 @@ | |||
|
|||
import Foundation | |||
|
|||
/// Note that although this is public, it is intended for internal use and not consumed directly by host applications. | |||
/// Protocol that represents a `Codable` Enum that can be persisted and easily | |||
/// integrate with remote APIs since it must have a raw `String` value. | |||
/// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
below: change "simple enums (i.e. the ones that don't have arguments)" to "enums without associated values"
Amplify/Categories/DataStore/Model/Internal/Model+Codable.swift
Outdated
Show resolved
Hide resolved
Amplify/Categories/DataStore/Model/Internal/ModelRegistry+Syncable.swift
Outdated
Show resolved
Hide resolved
Amplify/Categories/DataStore/Model/Internal/Schema/ModelSchema+Attributes.swift
Outdated
Show resolved
Hide resolved
@@ -5,6 +5,9 @@ | |||
// SPDX-License-Identifier: Apache-2.0 | |||
// | |||
|
|||
import Amplify | |||
|
|||
/// Note that although this is public, it is intended for internal use and not consumed directly by host applications. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be on the public symbol, not the extension wrapper
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think this can be removed, since this was moved to AWSPluginsCore
@@ -8,6 +8,7 @@ | |||
import Amplify | |||
import Foundation | |||
import SQLite | |||
import AWSPluginsCore | |||
|
|||
typealias ModelValues = [String: Any?] | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Below: a public
func (from(dictionary:)
) on a non-public type doesn't make sense. Remove public
from the func
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updating
4ac2795
to
3223fed
Compare
@@ -7,7 +7,10 @@ | |||
|
|||
import Foundation | |||
|
|||
/// Note that although this is public, it is intended for internal use and not consumed directly by host applications. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
woops, removed, checked if there was another instance left
ec71667
to
9258d11
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed, I don't thiknk we can make Model
internal
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed, let's try this in a sample app to ensure that moving files & types between modules don't result in any code changes required for a customer project. Assuming everything is transparent, ship it.
looks like things check out in the sample app. Following these instructions from the discord message helped set up the local podspec repo. Using In sample app's Podfile, i explicitly referenced |
Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.