Add ImportC support via dmd -H.#789
Open
jnms-me wants to merge 2 commits intodlang-community:masterfrom
Open
Conversation
|
Thanks for your Pull Request and making D better! This comment will automatically be updated to summarize some statistics in a few minutes. |
Author
|
See Pure-D/serve-d#328. |
WebFreak001
reviewed
Oct 27, 2025
| import std.process : environment; | ||
|
|
||
| if ("DMD" in environment) | ||
| return environment["DMD"]; |
Member
There was a problem hiding this comment.
this needs to be documented in the README or other places where this might be relevant
Author
|
Module auto-complete in serve-d doesn't seem to work yet. Any idea where that would be implemented? |
Member
|
you mean auto complete for this: ? |
Author
|
Yes, that doesn't show ImportC modules yet. |
|
Damn i didn't see this PR, i think mine is better because it doesn't generate any file thus is faster |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds
.c,.hand.ifiles (see https://dlang.org/spec/importc.html) as 'alternative' (lower priority) importable files.$DMDordmdis called on the source file with-Hto produce a.difile, which we can parse as normal.Note that
.hfiles are only supported by current dmd master, since the merge of dlang/dmd#21692.