-
Notifications
You must be signed in to change notification settings - Fork 197
Add support for building Swift-DocC-Render in Swift CI #251
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
Add support for building Swift-DocC-Render in Swift CI #251
Conversation
- Adds Node 14 as a dependency in the Docker containers used for Swift CI in order to support building Swift-DocC-Render. - Resolves rdar://81634420.
@swift-ci test |
this is pretty substantial dependency to add to the toolchain build. how hard is this dependency and what alternatives have been considered? additionally, how is this handled on other platforms? |
Updates the test runner to support accessing helper scripts from the root directory of a collection of Dockerfiles while building a Dockerfile.
@swift-ci test |
1 similar comment
@swift-ci test |
I agree this is worth a bit more discussion to see if there are more options to explore before this is merged as is. |
Hi @tomerd! I agree this is a significant dependency introduction. We agree that requiring Node.js here is sub-optimal and we are working towards removing this dependency entirely. In the mean-time, we have done our best to mitigate the impact it will have on toolchain builders. You can see some detail about this in @d-ronnqvist's PR (swiftlang/swift#39723). The core of it though is that Node.js is a build-time (not run-time) dependency for Swift-DocC-Render (not Swift-DocC itself), so we are not proposing requiring it generally. General users of the Swift toolchains from Swift.org will never need Node.js as they will have access to a pre-built version of Swift-DocC-Render. Toolchain builders will only need Node.js if they pass the
This is a hard dependency for building Swift-DocC-Render from source as is required for Swift-CI style toolchain builds from the As you suggested offline I think it would be great to also offer a tarball containing a prebuilt version of Swift-DocC-Render on Swift.org. This would allow other toolchain builders who don't want to add a dependency on Node to still fully support Swift-DocC-Render in their toolchains. I would defer to @shahmishal on the feasibility of this.
Since this is the first integration of Swift-DocC-Render (and Swift-DocC) with the toolchain we don't currently handle this on any platforms. With this PR and the one on the Swift toolchain build script (swiftlang/swift#39723) we aim to add support for all toolchains distributed by Swift.org with the notable exception of Windows. Swift-DocC itself does not yet support Windows but we would like to add support soon. At that time, we would expect to add Node as a dependency to the Windows toolchain builder. |
After considering this further, we’ve decided to close this pull request in favor of a solution where we’ll build Swift-DocC-Render in an isolated Docker container and make the build artifact available to Toolchain builders. Thank you for the great feedback here! |
Bug/issue #, if applicable: rdar://81634420
Summary
Adds Node 14 as a dependency in the Docker containers used by Swift CI in order to support building Swift-DocC-Render.
Note that this PR does not add Node as a dependency in the Docker containers distributed by Swift.org for general use. Node 14 is a build-time dependency for Swift-DocC-Render and not a run-time dependency so it is only required for the specialized Docker containers used by Swift CI for toolchain builds and PR testing.