Skip to content

diagnose-api-breaking-changes does not understand submodules #8073

Closed
@PeterAdams-A

Description

@PeterAdams-A

Is it reproducible with SwiftPM command-line tools: swift build, swift test, swift package etc?

  • Confirmed reproduction steps with SwiftPM CLI. The description text must include reproduction steps with either of command-line SwiftPM commands, swift build, swift test, swift package etc.

Description

When running diagnose-api-breaking-changes against a package which contains git submodules the tool does not appear to understand that it needs to get the submodules.

The project in question can be found here - https://github.com/apple/swift-async-dns-resolver

Expected behavior

API breakage tool should checkout submodules as required.

Actual behavior

It appears not too...

swift package diagnose-api-breaking-changes main
Building for debugging...
[71/71] Compiling AsyncDNSResolver DNSResolver_c-ares.swift
Build complete! (2.01s)
warning: '92ae16ff641eec3a6bb49bec723870ce5a02594a-checkout': found 1 file(s) which are unhandled; explicitly declare them as resources or exclude from the target
/Users/petera/XCode/swift-async-dns-resolver/.build/arm64-apple-macosx/apidiff/92ae16ff641eec3a6bb49bec723870ce5a02594a-checkout/Sources/AsyncDNSResolver/Docs.docc
Building for debugging...
[73/73] Compiling AsyncDNSResolver AsyncDNSResolver.swift
Build complete! (16.02s)
error: baseline for AsyncDNSResolver contains no symbols, swift-api-digester output: :1:9: note: in file included from :1:
#import "/Users/petera/XCode/swift-async-dns-resolver/.build/arm64-apple-macosx/apidiff/92ae16ff641eec3a6bb49bec723870ce5a02594a-checkout/Sources/CAsyncDNSResolver/include/CAsyncDNSResolver.h"
^
/Users/petera/XCode/swift-async-dns-resolver/.build/arm64-apple-macosx/apidiff/92ae16ff641eec3a6bb49bec723870ce5a02594a-checkout/Sources/CAsyncDNSResolver/include/CAsyncDNSResolver.h:23:10: note: in file included from /Users/petera/XCode/swift-async-dns-resolver/.build/arm64-apple-macosx/apidiff/92ae16ff641eec3a6bb49bec723870ce5a02594a-checkout/Sources/CAsyncDNSResolver/include/CAsyncDNSResolver.h:23:
#include "../c-ares/include/ares.h"
^
/Users/petera/XCode/swift-async-dns-resolver/.build/arm64-apple-macosx/apidiff/92ae16ff641eec3a6bb49bec723870ce5a02594a-checkout/Sources/CAsyncDNSResolver/include/../c-ares/include/ares.h:22:10: error: 'ares_build.h' file not found
#include "ares_build.h" /* c-ares build definitions */
^
:0: error: could not build Objective-C module 'CAsyncDNSResolver'
Failed to load module: AsyncDNSResolver
error: fatalError

Steps to reproduce

  1. Check out https://github.com/apple/swift-async-dns-resolver (and submodules)
  2. Make a change.
  3. Try and see if you've changed the API - swift package diagnose-api-breaking-changes main

Swift Package Manager version/commit hash

6.0

Swift & OS version (output of swift --version ; uname -a)

Swift 6.0 - darwin and linux both seem to not work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions