Skip to content
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

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

Open
1 task done
PeterAdams-A opened this issue Oct 24, 2024 · 0 comments
Open
1 task done

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

PeterAdams-A opened this issue Oct 24, 2024 · 0 comments
Labels
bug good first issue Good for newcomers Edit

Comments

@PeterAdams-A
Copy link
Contributor

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.

@dschaefer2 dschaefer2 added the good first issue Good for newcomers Edit label Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug good first issue Good for newcomers Edit
Projects
None yet
Development

No branches or pull requests

2 participants