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

if a module is unavailable, do not silently treat a #include of one of its headers as a textual include #20881

Open
zygoloid mannequin opened this issue Aug 1, 2014 · 6 comments
Labels
bugzilla Issues migrated from bugzilla clang:modules C++20 modules and Clang Header Modules

Comments

@zygoloid
Copy link
Mannequin

zygoloid mannequin commented Aug 1, 2014

Bugzilla Link 20507
Version trunk
OS Linux
CC @DougGregor,@steveire,@vgvassilev

Extended Description

If a module is unavailable, and we see a #include of one of its headers, we silently textually include that header, which will lead to very difficult to diagnose compilation performance problems, weird errors while compiling, and so on.

We should error on this case.

@vgvassilev
Copy link
Contributor

Could you spell out what unavailable means here? Is it module.map available/read but for some reason falling back to textual header?

@zygoloid
Copy link
Mannequin Author

zygoloid mannequin commented Sep 16, 2014

Could you spell out what unavailable means here? Is it module.map
available/read but for some reason falling back to textual header?

"unavailable" means that we can't build the module for some reason. That can be because it names a header that does not exist, or because it says "requires blah" and we don't have feature 'blah', or possibly other reasons I forgot =)

@zygoloid
Copy link
Mannequin Author

zygoloid mannequin commented Oct 17, 2014

*** Bug llvm/llvm-bugzilla-archive#21216 has been marked as a duplicate of this bug. ***

@vgvassilev
Copy link
Contributor

I have a patch diagnosing missing headers. It does while parsing the module map, at the end of parsing a module definition. Is this the right place or it should be somewhere else?

@llvmbot
Copy link
Collaborator

llvmbot commented Nov 5, 2015

This keeps hitting me as well while modularizing. I somehow muck up something in the module map, the module disappears silently and everything reverts to textual inclusion and it takes me awhile to notice and backtrack. Did you post a patch somewhere Vassil? I'm very a much newb as well but having some kind of diagnostic for this would be great.

@zygoloid
Copy link
Mannequin Author

zygoloid mannequin commented Nov 26, 2021

mentioned in issue llvm/llvm-bugzilla-archive#21216

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla clang:modules C++20 modules and Clang Header Modules
Projects
None yet
Development

No branches or pull requests

2 participants