Skip to content

Add example failing test with canImport#1738

Draft
keith wants to merge 1 commit into
mainfrom
ks/add-example-failing-test-with-canimport
Draft

Add example failing test with canImport#1738
keith wants to merge 1 commit into
mainfrom
ks/add-example-failing-test-with-canimport

Conversation

@keith
Copy link
Copy Markdown
Member

@keith keith commented May 11, 2026

Currently canImport for modules that aren't in your deps returns
true, but then things fail because underlying clang modules aren't in
the dep tree.

Currently `canImport` for modules that aren't in your deps returns
`true`, but then things fail because underlying clang modules aren't in
the dep tree.
@keith
Copy link
Copy Markdown
Member Author

keith commented May 11, 2026

This seems like a lose lose to me we can either:

  1. leave this behavior, but the error message is very bad. for example in this case of missing SwiftUI the error that you see ends up being:
<unknown>:0: error: cannot load underlying module for 'CoreData'
<unknown>:0: error: cannot load underlying module for 'CoreData'
  1. we could make the canImport fail, but that could be worse if the user just forgot to add the dep

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant