Skip to content
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

Deprecate preview dependencies trait #323

Merged
merged 15 commits into from
Jan 8, 2025
Merged

Conversation

stephencelis
Copy link
Member

Due to a quirk or bug or Xcode previews, dependency traits are executed for every preview in a file, not just the one that's running. This can cause dependencies from other previews to trample over the preview you are viewing.

Because of this, let's deprecate this functionality in favor of good ole fashioned withDependencies, with the option of using prepareDependencies.

Due to a quirk or bug or Xcode previews, dependency traits are executed
for every preview in a file, not just the one that's running. This can
cause dependencies from other previews to trample over the preview you
are viewing.

Because of this, let's deprecate this functionality in favor of good ole
fashioned `withDependencies`, with the option of using
`prepareDependencies`.
Comment on lines +246 to +249
fileID: key.fileID,
filePath: key.filePath,
line: key.line,
column: key.column
Copy link
Member Author

Choose a reason for hiding this comment

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

Noticed the lack of labels when fixing docs. This is technically breaking but I don't think anyone should be invoking these arguments directly outside the library and there's a fix-it to add the labels, but if we're worried I can undo this.

@@ -1,7 +1,7 @@
import Foundation

extension Thread {
public static var isPreviewAppEntryPoint: Bool {
Copy link
Member Author

Choose a reason for hiding this comment

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

Accidentally made this public in the previous release.

@stephencelis stephencelis merged commit 43a19af into main Jan 8, 2025
6 checks passed
@stephencelis stephencelis deleted the deprecate-preview-trait branch January 8, 2025 06:30
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