Skip to content

Using the new build system causes the second build to fail with "unable to resolve module dependency" #1638

Description

@itingliu

I was trying to run swift-foundation benchmark with

USE_PACKAGE=1 BENCHMARK_DISABLE_JEMALLOC=1 swift package benchmark --target InternationalizationBenchmarks

It works the first time, but fails the second time with

error: unable to resolve module dependency: '_FoundationCShims'
error: SwiftDriver ArgumentParser normal arm64 com.apple.xcode.tools.swift.compiler failed with a nonzero exit code.

The same command works with the native build system, i.e.

USE_PACKAGE=1 BENCHMARK_DISABLE_JEMALLOC=1 swift package --build-system native benchmark --target InternationalizationBenchmarks

To Reproduce

Check out swift-foundaiton's main branch

cd Benchmark, and run

USE_PACKAGE=1 BENCHMARK_DISABLE_JEMALLOC=1 swift package benchmark --target InternationalizationBenchmarks

Observe that it succeeds. Then run the same command again. Observe that it fails.

Now try again with

USE_PACKAGE=1 BENCHMARK_DISABLE_JEMALLOC=1 swift package --build-system native benchmark --target InternationalizationBenchmarks

And observe that it succeeds.

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