Skip to content

Remove SyntaxFactory #607

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

Closed
wants to merge 1 commit into from

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Aug 19, 2022

Depends on swiftlang/swift-stress-tester#186


Initializers on types should be used in place of SyntaxFactory.

rdar://98835746

@ahoppen ahoppen requested a review from rintaro August 19, 2022 06:49
Initializers on types should be used in place of `SyntaxFactory`.
@ahoppen ahoppen force-pushed the pr/remove-syntax-factory branch from 212c176 to 1f48c2d Compare August 19, 2022 10:57
@ahoppen ahoppen marked this pull request as ready for review August 19, 2022 10:59
@ahoppen
Copy link
Member Author

ahoppen commented Aug 19, 2022

@swift-ci Please test

@rintaro
Copy link
Member

rintaro commented Aug 19, 2022

Can we keep these around for a while as unavailable decls?

  @available(*, unavailable, message: "Use initializer on FunctionDeclSyntax")
  public static func makeFunctionDecl(_: UnexpectedNodesSyntax? = nil, attributes: AttributeListSyntax?, _: UnexpectedNodesSyntax? = nil, modifiers: ModifierListSyntax?, _: UnexpectedNodesSyntax? = nil, funcKeyword: TokenSyntax, _: UnexpectedNodesSyntax? = nil, identifier: TokenSyntax, _: UnexpectedNodesSyntax? = nil, genericParameterClause: GenericParameterClauseSyntax?, _: UnexpectedNodesSyntax? = nil, signature: FunctionSignatureSyntax, _: UnexpectedNodesSyntax? = nil, genericWhereClause: GenericWhereClauseSyntax?, _: UnexpectedNodesSyntax? = nil, body: CodeBlockSyntax?) -> FunctionDeclSyntax {
    preconditionFailure()
  }

It seems many projects are using them

@ahoppen
Copy link
Member Author

ahoppen commented Aug 19, 2022

Thanks for checking. Let’s keep it around as deprecated for now.

@ahoppen ahoppen closed this Aug 19, 2022
@ahoppen ahoppen deleted the pr/remove-syntax-factory branch January 14, 2023 08:27
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