-
-
Notifications
You must be signed in to change notification settings - Fork 606
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
Fix Bugzilla issue 24111 - [ImportC] fatal error C1034: stdio.h: no include path set #16248
Conversation
Thanks for your pull request and interest in making D better, @shoo! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla references
Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "master + dmd#16248" |
This seems quite a bit more complex than is required. I suggest setting the environment variable into the process state instead and then resetting it to the old value afterward. |
Fix it. |
Okay, that looks a lot cleaner. The failures for OSX are currently known and are unrelated to you. |
are you able to add a test case for this issue? |
I would like to be able to add a test case similar to or minimized from the dub test case and run it on Windows with the INCLUDE environment variable forced to be empty. @REM In the Windows *.bat file:
cd .\test\use-c-sources\
set INCLUDE=
dub build However, I could not understand how to properly add the test case. |
run |
@thewilsonator How about this? |
Can anyone review this PR? |
… an MSVC env anymore After dlang#16248.
…d an MSVC env anymore After dlang#16248.
…d an MSVC env anymore After #16248.
I have attempted a fix for this problem: https://issues.dlang.org/show_bug.cgi?id=24111
#15780 is the predecessor's approach to this problem.
My implementation is based on how it is used in LDC ( https://github.com/ldc-developers/ldc/blob/8399e47ceb4dfbbcf1ca0b7cf934c04a864387b7/driver/tool.cpp#L297-L312 )
Also, I refer to a part of std.process to pass environment variables to CreateProcess. ( https://github.com/dlang/phobos/blob/dcbfbd43ac321e81af60afd795bd0f3c3f47cfa0/std/process.d#L412-L440 , https://github.com/dlang/phobos/blob/dcbfbd43ac321e81af60afd795bd0f3c3f47cfa0/std/process.d#L1450-L1482 )
I have very little experience with dmd code, so my coding style may be incorrect or inefficiently implemented. Please point out any problems.