Skip to content

Commit 8718928

Browse files
committed
Avoid running dub recursively in pre-generate command, call D compiler directly
As we see spurious failures (version_.di not generated/importable) when calling dub recursively. The generate_version executable is built each time this way, not cached by dub anymore, but it's built pretty quickly (0.5 secs with LDC on my Linux x64 box, 0.3 secs with DMD).
1 parent c6e18bc commit 8718928

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

dub.sdl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ libs "ssl" "crypto" platform="posix"
77
configuration "library-autodetect" {
88
targetType "sourceLibrary"
99
excludedSourceFiles "source/deimos/openssl/applink.d"
10-
preGenerateCommands `${DUB} scripts/generate_version.d` platform="posix"
10+
preGenerateCommands `$DC -run scripts/generate_version.d` platform="posix"
1111
versions `DeimosOpenSSLAutoDetect`
1212
}
1313

scripts/generate_version.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import std.string;
3030
import std.uni;
3131

3232
// file full path is: $SOME_PATH/openssl/scripts/generate_version.d
33-
// We want: $SOME_PATH/openssl/deimos/openssl/
33+
// We want: $SOME_PATH/openssl/source/deimos/openssl/
3434
immutable TARGET_DIR_PATH = __FILE_FULL_PATH__
3535
.dirName.dirName.buildPath("source", "deimos", "openssl");
3636

0 commit comments

Comments
 (0)