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

[SR-15876] Unhelpful error: Could not build Objective-C module ‘ModuleName’ #503

Open
ahoppen opened this issue Feb 17, 2022 · 8 comments
Labels
bug Something isn't working

Comments

@ahoppen
Copy link
Collaborator

ahoppen commented Feb 17, 2022

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.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 5, 2022
@Steven0351
Copy link

Steven0351 commented May 27, 2022

Getting the same issue here from Neovim using it's built-in lsp client

@MaxDesiatov
Copy link
Collaborator

MaxDesiatov commented Aug 18, 2022

Still experiencing this issue in VSCode with multiple different packages.

@ahoppen
Copy link
Collaborator Author

ahoppen commented Aug 18, 2022

Do you have a package that deterministically reproduces the issue? If yes, that would really help us to track down the the problem.

@MaxDesiatov
Copy link
Collaborator

MaxDesiatov commented Aug 18, 2022

Not deterministically, but I wonder if there's a way to force SourceKit-LSP to output more detailed logging messages? If that was possible, next time this happens, we could check what caused the build error.

@adam-fowler
Copy link
Contributor

adam-fowler commented Aug 19, 2022

Do you have a package that deterministically reproduces the issue? If yes, that would really help us to track down the the problem.

This tends to happen where you have a package with a dependency and the dependency hasn't been built.

@MaxDesiatov
Copy link
Collaborator

MaxDesiatov commented Aug 19, 2022

My package I reproduced this with did have a dependency, but the error showed up for a module within the package I was editing, not within the dependency.

@EricRabil
Copy link

EricRabil commented Aug 25, 2022

I am running into this with https://github.com/open-imcore/barcelona-mautrix/tree/889f5bf53ce08da97110720f369938b39ba8131c, maybe it'll repro for you?

@EricRabil
Copy link

EricRabil commented Aug 25, 2022

Do you have a package that deterministically reproduces the issue? If yes, that would really help us to track down the the problem.

This tends to happen where you have a package with a dependency and the dependency hasn't been built.

I can confirm that this issue goes away for me after a successful build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants