Skip to content

Plugin build fails with error: buildFailed when benchmarking with a recent main-snapshot toolchain #332

@clackary

Description

@clackary

We've working on mainlining some optimizations to Swift. I'm trying to run benchmarks on an internal project using a toolchain with the optimizations and without to measure the performance impact.

The plan was to establish a baseline by running benchmarks using a main-snapshot toolchain, and then building a custom toolchain with our optimizations cherrypicked onto that tag. With the main-snapshot, I ran into a pretty vague build failure when building the plugin.

$ swift package --disable-sandbox --package-path Benchmarks benchmark                      
Building for debugging...
[5/5] Applying BenchmarkTool-tool
Build of product 'BenchmarkTool' complete! (7.76s)
Build complete!
Building BenchmarkTool in release mode...
error: buildFailed

This also reproduces in the package-benchmarks Benchmarks sub-package.

Steps to reproduce:

  1. Install a main-snapshot toolchain: swiftly install main-snapshot
  2. Set that toolchain (may require overriding the 5.10 value in .swift-version: swiftly use main-snapshot
  3. Attempt to benchmark in the Benchmarks sub-package: swift package --disable-sandbox --package-path Benchmarks benchmark

Initial triage:
It looks like this check is the source of the error. This seems to be happening when the plugin build is successful, and no artifacts are registered builtArtifacts, as some additional logging shows that builtArtifacts is indeed empty.

It does not reproduce against a recent 6.2 snapshot.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions