Modules support
It would be nice if some of {C++20 modules, clang header modules} worked in clangd. Essentially no configurations of this work today: occasionally things may happen to work but there are many reported problems and crashes. These are not just bugs that can be fixed, a design and new infrastructure is needed. Because clang's module functionality can be enabled by setting driver flags, it is possible/easy for people to end up in this broken and unsupportable state, and wasting (their + our) time debugging it. We should consider failing early and explicitly instead. **AFAIK nobody has plans/availability to work on this soon.** Some issues that need to be addressed: - which subset of clang's many module features/flags are in scope? - explicit modules provided by build system: we can't assume these are compatible (may be a different compiler version). So may need to convert to implicitly building modules needed. - having AST workers/background threads spawning module builds independently and coordinating through the module cache is probably not good, we'll want some kind of worker pool and coordination - we presumably want to parse modules in the same lite mode as preambles (e.g. skip-function-bodies) - gcc modules flags are different than clang modules flags (and MSVC presumably different again), we need to parse them - how do modules fit into the dynamic index? what does a preamble with modules in it look like? - scattered places where we assume mainfile/preamble dicho
Posted by sam-mccall on Sep 15, 2022, 7:08 PM
Tags
Related issues
- [BUG] Cowork (Windows): all Plan9 shares fail with "Plan9 mount failed: invalid argument" after Windows update KB5124008 (26200.9445) — uninstalling the KB fixe
- Feature Request: Auto-resume CLI session when usage limit resets
- Please deobfuscate the Python
- [Bug] MLX version of Gemma 4 26B fails to load: "Model type gemma4 not supported" (macOS)
- # 233 Developers Discussed Abandoning the Office Add-in Platform — An Open Letter on the Office.js Stability, Security & Trust Crisis
- [FEATURE] Allow users to configure which shell the Bash tool uses or inherit initial shell
Raise real-world problems, find people facing the same issue, and discuss solutions.2,500 issues0 comments
reliability (Software)
[BUG] Cowork (Windows): all Plan9 shares fail with "Plan9 mount failed: invalid argument" after Windows update KB5124008 (26200.9445) — uninstalling the KB fixe
Feature Request: Auto-resume CLI session when usage limit resets
Please deobfuscate the Python
[Bug] MLX version of Gemma 4 26B fails to load: "Model type gemma4 not supported" (macOS)
# 233 Developers Discussed Abandoning the Office Add-in Platform — An Open Letter on the Office.js Stability, Security & Trust Crisis
[FEATURE] Allow users to configure which shell the Bash tool uses or inherit initial shell
Admin Materials and Surfaces
AMD Support
Modules support
It would be nice if some of {C++20 modules, clang header modules} worked in clangd. Essentially no configurations of this work today: occasionally things may happen to work but there are many reported problems and crashes. These are not just bugs that can be fixed, a design and new infrastructure is needed. Because clang's module functionality can be enabled by setting driver flags, it is possible/easy for people to end up in this broken and unsupportable state, and wasting (their + our) time debugging it. We should consider failing early and explicitly instead. **AFAIK nobody has plans/availability to work on this soon.** Some issues that need to be addressed: - which subset of clang's many module features/flags are in scope? - explicit modules provided by build system: we can't assume these are compatible (may be a different compiler version). So may need to convert to implicitly building modules needed. - having AST workers/background threads spawning module builds independently and coordinating through the module cache is probably not good, we'll want some kind of worker pool and coordination - we presumably want to parse modules in the same lite mode as preambles (e.g. skip-function-bodies) - gcc modules flags are different than clang modules flags (and MSVC presumably different again), we need to parse them - how do modules fit into the dynamic index? what does a preamble with modules in it look like? - scattered places where we assume mainfile/preamble dicho
Comments (0)
No comments yet. Start the discussion.