Skip to content

build: migrate playground support to post-build artifact #29443

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

Merged
merged 1 commit into from
Feb 12, 2020

Conversation

compnerd
Copy link
Member

This migrates the playground support out of the build-script-impl and
into the python based build system. This makes it build more similarly
to the Swift Package Manager and SourceKit-LSP. More importantly, it
reduces the dependency on build-script-impl.

Replace this paragraph with a description of your changes and rationale. Provide links to external references/discussions if appropriate.

Resolves SR-NNNN.

@compnerd
Copy link
Member Author

@swift-ci please clean test

@compnerd compnerd requested a review from Rostepher January 24, 2020 23:05
@compnerd
Copy link
Member Author

import os
import re
from . import product
from .. import shell
Copy link
Contributor

Choose a reason for hiding this comment

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

If possible I would like for us to use the new build_swift.shell module. It should have all the functionality you want and is Python 2/3 compatible.

Copy link
Contributor

Choose a reason for hiding this comment

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

Actually we can hold-off for now and do follow-up PRs to migrate to the new shell module.

"xcodebuild",
"-configuration", self.args.build_variant,
"-workspace", "swift-xcode-playground-support.xcworkspace",
"-scheme", "BuildScript-{}".format({
Copy link
Contributor

Choose a reason for hiding this comment

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

I feel like we should have a helper function of variable for this rather than compute it multiple times in-line.

Copy link
Member Author

Choose a reason for hiding this comment

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

It is only computed twice (once in build, once in install). It is a dictionary lookup, which is pretty fast. I think that trying to extract this and reduce the duplication would actually hurt the readability of the build process.

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 85351fefd3793dec44c2b41c8858e07b99181543

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 85351fefd3793dec44c2b41c8858e07b99181543

@Rostepher
Copy link
Contributor

Looks like the build_swift test suite failed. Likely you need to add defaults to utils/build_swift/tests/expected_options.py.

@compnerd compnerd force-pushed the unsupported-playground-support branch from 85351fe to ddc0f30 Compare January 26, 2020 18:03
@compnerd
Copy link
Member Author

@swift-ci please clean test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 85351fefd3793dec44c2b41c8858e07b99181543

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - ddc0f308c70cf3bd2f74b3fe06b029bf9db486d6

@compnerd compnerd force-pushed the unsupported-playground-support branch from ddc0f30 to d2be528 Compare January 26, 2020 19:49
@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - ddc0f308c70cf3bd2f74b3fe06b029bf9db486d6

@compnerd
Copy link
Member Author

@swift-ci please clean test

@shahmishal shahmishal requested a review from cwakamo January 26, 2020 20:42
@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - d2be5284a0c302a8adba1464d16603f27ff31b61

@compnerd compnerd force-pushed the unsupported-playground-support branch from d2be528 to 939a3a9 Compare January 27, 2020 00:25
@compnerd
Copy link
Member Author

@swift-ci please clean test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 939a3a9f143f3f6140108cc88ce359b7406011f1

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 939a3a9f143f3f6140108cc88ce359b7406011f1

@compnerd compnerd force-pushed the unsupported-playground-support branch from 939a3a9 to 5c01040 Compare February 3, 2020 23:22
@compnerd
Copy link
Member Author

compnerd commented Feb 3, 2020

@swift-ci please clean test

@swift-ci
Copy link
Contributor

swift-ci commented Feb 4, 2020

Build failed
Swift Test Linux Platform
Git Sha - 5c01040e07f7ac13c5fbfd334a3fd9d47062185a

@swift-ci
Copy link
Contributor

swift-ci commented Feb 4, 2020

Build failed
Swift Test OS X Platform
Git Sha - 5c01040e07f7ac13c5fbfd334a3fd9d47062185a

@compnerd compnerd force-pushed the unsupported-playground-support branch from 5c01040 to cd511ec Compare February 4, 2020 17:41
@compnerd
Copy link
Member Author

compnerd commented Feb 4, 2020

@swift-ci please test

@swift-ci
Copy link
Contributor

swift-ci commented Feb 4, 2020

Build failed
Swift Test OS X Platform
Git Sha - 5c01040e07f7ac13c5fbfd334a3fd9d47062185a

@swift-ci
Copy link
Contributor

swift-ci commented Feb 4, 2020

Build failed
Swift Test Linux Platform
Git Sha - 5c01040e07f7ac13c5fbfd334a3fd9d47062185a

@compnerd compnerd force-pushed the unsupported-playground-support branch from 6ea9c09 to 317cb11 Compare February 7, 2020 16:57
@compnerd
Copy link
Member Author

compnerd commented Feb 7, 2020

Thanks for the hints @Rostepher, that was extremely helpful.

@compnerd
Copy link
Member Author

compnerd commented Feb 7, 2020

@swift-ci please test

@swift-ci
Copy link
Contributor

swift-ci commented Feb 7, 2020

Build failed
Swift Test Linux Platform
Git Sha - 6ea9c09e05fa887f0a29f6136929513e3948b99c

@swift-ci
Copy link
Contributor

swift-ci commented Feb 7, 2020

Build failed
Swift Test OS X Platform
Git Sha - 6ea9c09e05fa887f0a29f6136929513e3948b99c

@compnerd compnerd force-pushed the unsupported-playground-support branch from 317cb11 to 1c1a8b2 Compare February 7, 2020 18:43
@compnerd
Copy link
Member Author

compnerd commented Feb 7, 2020

@swift-ci please test

@swift-ci
Copy link
Contributor

swift-ci commented Feb 7, 2020

Build failed
Swift Test OS X Platform
Git Sha - 317cb1116ed35cb94cbeb23aea05bfd6b0ffef37

@swift-ci
Copy link
Contributor

swift-ci commented Feb 7, 2020

Build failed
Swift Test Linux Platform
Git Sha - 317cb1116ed35cb94cbeb23aea05bfd6b0ffef37

@compnerd compnerd force-pushed the unsupported-playground-support branch from 1c1a8b2 to c13d2ef Compare February 7, 2020 21:05
@compnerd
Copy link
Member Author

compnerd commented Feb 7, 2020

@swift-ci please test

@swift-ci
Copy link
Contributor

swift-ci commented Feb 7, 2020

Build failed
Swift Test OS X Platform
Git Sha - 1c1a8b24fb76f7910c5b3eb6e876e319f2ac3cd3

@swift-ci
Copy link
Contributor

swift-ci commented Feb 7, 2020

Build failed
Swift Test Linux Platform
Git Sha - 1c1a8b24fb76f7910c5b3eb6e876e319f2ac3cd3

@compnerd
Copy link
Member Author

compnerd commented Feb 7, 2020

CC: @cwakamo

@cwakamo
Copy link
Contributor

cwakamo commented Feb 7, 2020

@swift-ci Please Build Toolchain macOS Platform

Copy link
Contributor

@cwakamo cwakamo left a comment

Choose a reason for hiding this comment

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

The change here generally looks good! Had one comment, but otherwise everything makes sense. I kicked off a toolchain build so I can double-check that all the right stuff ends up there with these changes; I'd like to see the result of that before approving.

@Rostepher
Copy link
Contributor

@swift-ci please test macOS platform

This migrates the playground support out of the build-script-impl and
into the python based build system.  This makes it build more similarly
to the Swift Package Manager and SourceKit-LSP.  More importantly, it
reduces the dependency on build-script-impl.
@compnerd compnerd force-pushed the unsupported-playground-support branch from c13d2ef to f4086d8 Compare February 8, 2020 22:00
@compnerd
Copy link
Member Author

compnerd commented Feb 8, 2020

@swift-ci please test

@swift-ci
Copy link
Contributor

swift-ci commented Feb 8, 2020

Build failed
Swift Test OS X Platform
Git Sha - c13d2efd41a91dfd59b783e82d5b2bd6676c2491

@compnerd
Copy link
Member Author

compnerd commented Feb 8, 2020

@swift-ci please build toolchain macOS platform

@swift-ci
Copy link
Contributor

swift-ci commented Feb 8, 2020

Build failed
Swift Test Linux Platform
Git Sha - c13d2efd41a91dfd59b783e82d5b2bd6676c2491

@compnerd
Copy link
Member Author

compnerd commented Feb 9, 2020

@compnerd
Copy link
Member Author

@cwakamo ping

Copy link
Contributor

@cwakamo cwakamo left a comment

Choose a reason for hiding this comment

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

Took a look at the generated toolchain and compared it with the latest master toolchain on swift.org; looks good to me! (After a long hiatus, the macOS PlaygroundLogger/PlaygroundSupport/XCPlayground have actually returned to the toolchain; I'll need to investigate at some point what needs to be done to get the iOS Simulator and tvOS Simulator versions of those frameworks back as well.)

@compnerd compnerd merged commit 8d32ee3 into swiftlang:master Feb 12, 2020
@compnerd compnerd deleted the unsupported-playground-support branch February 12, 2020 19:28
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.

4 participants