-
-
Notifications
You must be signed in to change notification settings - Fork 610
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(dub): Make config.d executable to incremental compilation #13712
Conversation
|
Thanks for your pull request, @ljmf00! 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#13712" |
| @@ -1,3 +1,4 @@ | |||
| #!/usr/bin/env dub | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make this executable, in case someone wants to run it as a script on POSIX systems.
51eed7d to
e79f481
Compare
dub.sdl
Outdated
| --arch=$${DUB_ARCH} \ | ||
| --compiler=$${DC} \ | ||
| --single "$${DUB_PACKAGE_DIR}config.d" \ | ||
| "$${DUB_PACKAGE_DIR}config.d" \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some reason, this dub call doesn't incrementally compile, but calling it directly does. This shouldn't be needed if dub works correctly and does make the library itself incrementally compile, but for the binary itself, this is preferred for now as it is more performant on subsequent runs
|
@CyberShadow Is this infrastructure open? It should provide the full absolute compiler path in order to work, instead of relying on paths relative to cwd. |
|
This can't possibly work on Windows, right? It has no notion of shebangs or executable files.
Yes: https://github.com/cybershadow/ae/blob/master/sys/d/manager.d
Not sure if it would be fair to impose such a requirement on everyone. |
It works as the compiler safely ignores the shebang. Also, for Windows, a dub call is used. I'm only changing the way is called for POSIX platforms, but see bellow. Anyway,
Right, that is a problem, and probably |
Ah yes, I see the |
e79f481 to
a94fbc1
Compare
a94fbc1 to
c637ef7
Compare
Fix issue 22821. Signed-off-by: Luís Ferreira <contact@lsferreira.net>
c637ef7 to
f309925
Compare
|
How does this make config.d do incremental compilation? |
The generated folder for config binary should be in a different folder, other than the import paths. If it is the same, dub detect changes and recompile it. |
Signed-off-by: Luís Ferreira contact@lsferreira.net
Before:
After: