swift-package-manager: [SR-15876] Unhelpful error: Could not build Objective-C module ‘ModuleName’
Previous ID | SR-15876 |
Radar | rdar://89082987 |
Original Reporter | @ahoppen |
Type | Bug |
Additional Detail from JIRA
Votes | 2 |
Component/s | SourceKit-LSP |
Labels | Bug |
Assignee | None |
Priority | Medium |
md5: 9ddcee184f7c88e97c4a2a1e791ed8aa
Issue Description:
From https://forums.swift.org/t/unhelpful-error-could-not-build-objective-c-module-modulename/55381
Sometimes when loading a package into the VSCode extension the SourceKit-LSP server will return the error
Could not build Objective-C module 'ModuleName'
where ModuleName is the name of some module being imported. This error appears on modules regardless of whether they include any Objective-C or not. Unfortunately I haven’t found a consistent way to replicate this error. It appears to disappear if you build the project and restart VSCode. If it is related to the relevant module not being built it is not a very helpful message.
In what situations is this error message meant to appear.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 7
- Comments: 23 (11 by maintainers)
Getting the same issue here from Neovim using it’s built-in lsp client
How is that warning (at least a warning, please!) not on by default??
Thanks a lot. I was able to reproduce the problem now. Since this reproducer doesn’t involve SourceKit-LSP, I’m moving it over to SwiftPM.
This script reproduces the issue locally for me
Output