Skip to content

Build snippets in the build script #531

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

fwcd
Copy link
Member

@fwcd fwcd commented Jul 29, 2022

As per the suggestion in #477 (comment), this small patch updates the build script's build command to build the snippets too.

@fwcd fwcd requested a review from ahoppen as a code owner July 29, 2022 03:29
@fwcd
Copy link
Member Author

fwcd commented Jul 29, 2022

@swift-ci please test

ahoppen
ahoppen previously approved these changes Jul 29, 2022
@ahoppen ahoppen dismissed their stale review July 29, 2022 13:26

Ah, I think we can’t do this because in CI SwiftSyntax is built in a unified workspace with some other SwiftPM projects (that’s the --multiroot-data-file option is for). Thus, requesting a build of all targets also builds swift-format, the stress tester etc.

@fwcd
Copy link
Member Author

fwcd commented Jul 29, 2022

Oh okay 🤔 Is there a way to build all products (or targets) of a package even in a multi-project workspace setting?

@ahoppen
Copy link
Member

ahoppen commented Jul 29, 2022

I’m not sure. I’ll come back to you once I know.

@fwcd fwcd marked this pull request as draft July 29, 2022 14:40
@ahoppen
Copy link
Member

ahoppen commented Aug 1, 2022

I just checked and there’s no way to explicitly build all snippets from a snippet. I think what we need to do is build each snippet explicitly. The corresponding product name is the snippet’s filename without the extension. I.e. I think we need to include the following in the build script.

# Build snippets
builder.build("AddOneToIntegerLiterals")
builder.build("CodeGenerationUsingSwiftSyntaxBuilder")

@fwcd fwcd force-pushed the build-all-products branch from 1c0084b to d94b62e Compare August 1, 2022 13:27
@fwcd fwcd force-pushed the build-all-products branch from d94b62e to 1879473 Compare August 1, 2022 13:28
@fwcd fwcd changed the title Build all products (instead of specifying them individually) in the build script Build snippets in the build script Aug 1, 2022
@fwcd fwcd marked this pull request as ready for review August 1, 2022 13:28
@fwcd
Copy link
Member Author

fwcd commented Aug 1, 2022

@swift-ci please test

@fwcd fwcd mentioned this pull request Oct 9, 2022
@fwcd
Copy link
Member Author

fwcd commented Nov 9, 2022

Moved to #1069

@fwcd fwcd closed this Nov 9, 2022
@fwcd fwcd deleted the build-all-products branch November 9, 2022 20:35
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