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

Revert "Revert "Deprecate FileSystemProvider and RenderNodeProvider"" #1117

Merged

Conversation

d-ronnqvist
Copy link
Contributor

@d-ronnqvist d-ronnqvist commented Dec 5, 2024

Reverts #1116


First I locally verified that the unmodified code in 4250efe fails with this SIL Validation compiler error in release builds using swift-DEVELOPMENT-SNAPSHOT-2024-11-09-a which is tracked by swiftlang/swift#77955:

SIL verification failed: Should not have an operand for the opened existential: AMI->getTypeDependentOperands().empty()
Verifying instruction:
     %5 = open_existential_addr immutable_access %4 : $*any FileManagerProtocol to $*@opened("0C866184-B2ED-11EF-9D62-7287C2F98703", any FileManagerProtocol) Self // users: %19, %15, %15, %14
->   %19 = witness_method $@_opaqueReturnTypeOf("$s9SwiftDocC19FileManagerProtocolPAAE14recursiveFiles13startingPoint7optionsQr20FoundationEssentials3URLV_AG0cD0C27DirectoryEnumerationOptionsVtF", 0) __<@opened("0C866184-B2ED-11EF-9D62-7287C2F98703", any FileManagerProtocol) Self>, #Sequence.makeIterator : <Self where Self : Sequence> (__owned Self) -> () -> Self.Iterator, %5 : $*@opened("0C866184-B2ED-11EF-9D62-7287C2F98703", any FileManagerProtocol) Self : $@convention(witness_method: Sequence) <τ_0_0 where τ_0_0 : Sequence> (@in τ_0_0) -> @out τ_0_0.Iterator // type-defs: %5; user: %21
     %21 = apply %19<@opened("0C86668E-B2ED-11EF-9D62-7287C2F98703", any Sequence<URL>) Self>(%20, %17) : $@convention(witness_method: Sequence) <τ_0_0 where τ_0_0 : Sequence> (@in τ_0_0) -> @out τ_0_0.Iterator // type-defs: %16
In function:
// StaticHostableTransformer.transform()
// Isolation: unspecified
sil @$s18SwiftDocCUtilities25StaticHostableTransformerV9transformyyKF : $@convention(method) (@in_guaranteed StaticHostableTransformer) -> @error any Error {
[%0: read v**, write s3.x.v**, copy v**, destroy s3.x.v**]
[global: read,write,copy,destroy,allocate,deinit_barrier]
...

Then I modified the declaration of (extension in SwiftDocC):SwiftDocC.FileManagerProtocol.recursiveFiles(startingPoint: FoundationEssentials.URL, options: FoundationEssentials.FileManager.DirectoryEnumerationOptions) -> some in fbda331 to remove the existential type (using an explicit IteratorSequence<_FilesIterator> return value instead) and verified that the same compiler no longer fails with the same release build invocation as before (swift test -c release).

@d-ronnqvist d-ronnqvist marked this pull request as ready for review December 5, 2024 10:18
@d-ronnqvist d-ronnqvist requested a review from compnerd December 5, 2024 10:18
@d-ronnqvist
Copy link
Contributor Author

@swift-ci please test

@d-ronnqvist d-ronnqvist requested a review from atrick December 5, 2024 10:19
Copy link
Member

@compnerd compnerd left a comment

Choose a reason for hiding this comment

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

Please do a cross-repository test in swiftlang/swift to verify that this should be safe to merge now.

@d-ronnqvist
Copy link
Contributor Author

Toolchain builds for all platforms passed in swiftlang/swift#77984

@d-ronnqvist d-ronnqvist merged commit 389d1f8 into main Dec 6, 2024
2 checks passed
@d-ronnqvist d-ronnqvist deleted the revert-1116-revert-1108-deprecate-file-system-provider branch December 6, 2024 07:52
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