diff --git a/changelog/add-dest.dd b/changelog/add-dest.dd deleted file mode 100644 index bd77bac705..0000000000 --- a/changelog/add-dest.dd +++ /dev/null @@ -1,5 +0,0 @@ -Added `--dest` command line build option. - -Adds support for specifying a root directory for staging, essentially -acts as a prefix to the `targetPath` and `workingDirectory` dubfile -entries. diff --git a/changelog/add-frameworks.dd b/changelog/add-frameworks.dd deleted file mode 100644 index 4d40e65f4e..0000000000 --- a/changelog/add-frameworks.dd +++ /dev/null @@ -1,14 +0,0 @@ -Add `frameworks` dubfile key. - -Adds support for specifying macOS frameworks to link against, -this replaces the need to manually specify frameworks via lflags or dflags. - -Before: -------- -lflags "-framework" "Cocoa" -------- - -After: -------- -frameworks "Cocoa" "OpenGL" -------- diff --git a/changelog/fix-cimport-paths.dd b/changelog/fix-cimport-paths.dd deleted file mode 100644 index 7bab23dc4c..0000000000 --- a/changelog/fix-cimport-paths.dd +++ /dev/null @@ -1,3 +0,0 @@ -Fix issue where cImportPaths wasn't working with dmd and ldc - -dub was passing -I instead of -P-I as is required by those compilers diff --git a/changelog/selections_from_parent_dir.dd b/changelog/selections_from_parent_dir.dd deleted file mode 100644 index 923d8e49d1..0000000000 --- a/changelog/selections_from_parent_dir.dd +++ /dev/null @@ -1,16 +0,0 @@ -`dub.selections.json` files are now looked up in parent directories too - -In case the root package directory doesn't contain a `dub.selections.json` -file, dub now looks in parent directories too and potentially uses the -first (deepest) one it finds - if and only if that JSON file contains an -optional new `"inheritable": true` flag. - -This allows using a 'central' `dub.selections.json` file for a repository -containing multiple dub projects, making it automatically apply to all -builds in that source tree if located in the repository root directory -(unless a local `dub.selections.json` overrides it). - -Such an inherited selections file is never mutated when running dub for a -nested project, i.e., changes are always saved to a *local* -`dub.selections.json` file. E.g., when running `dub upgrade` for a nested -project. diff --git a/source/dub/compilers/ldc.d b/source/dub/compilers/ldc.d index 9c30ebe756..6d5cf2cfa3 100644 --- a/source/dub/compilers/ldc.d +++ b/source/dub/compilers/ldc.d @@ -50,7 +50,7 @@ class LDCCompiler : Compiler { tuple(BuildOption.color, ["-enable-color"]), tuple(BuildOption._docs, ["-Dd=docs"]), - tuple(BuildOption._ddox, ["-Xf=docs.json", "-Dd=__dummy_docs"]), + tuple(BuildOption._ddox, ["-Xf=docs.json", "-Dd=__dummy_docs", "-oq"]), ]; @property string name() const { return "ldc"; } diff --git a/source/dub/dub.d b/source/dub/dub.d index ed233bb273..9b133eb095 100644 --- a/source/dub/dub.d +++ b/source/dub/dub.d @@ -621,7 +621,7 @@ class Dub { enforce(recipe.buildSettings.cSourcePaths.length == 0, "Single-file packages are not allowed to specify C source paths."); enforce(recipe.buildSettings.importPaths.length == 0, "Single-file packages are not allowed to specify import paths."); enforce(recipe.buildSettings.cImportPaths.length == 0, "Single-file packages are not allowed to specify C import paths."); - recipe.buildSettings.sourceFiles[""] = [path.toNativeString()]; + recipe.buildSettings.sourceFiles[""] = []; recipe.buildSettings.sourcePaths[""] = []; recipe.buildSettings.cSourcePaths[""] = []; recipe.buildSettings.importPaths[""] = []; diff --git a/source/dub/project.d b/source/dub/project.d index 31d20c8da1..cb61a84138 100644 --- a/source/dub/project.d +++ b/source/dub/project.d @@ -744,7 +744,13 @@ class Project { } else { auto subconf = pack.package_.getSubConfiguration(c, packages[dp].package_, platform); if (!subconf.empty) setConfigs(only(subconf)); - else setConfigs(packages[dp].package_.getPlatformConfigurations(platform)); + else { + setConfigs(packages[dp].package_.getPlatformConfigurations(platform)); + if (depconfigs[dp].length == 0) { + // Try with the executables too + setConfigs(packages[dp].package_.getPlatformConfigurations(platform, true)); + } + } } // if no valid configuration was found for a dependency, don't include the @@ -786,7 +792,7 @@ class Project { if (auto pc = pack.name in m_overriddenConfigs) determineDependencyConfigs(pack_idx, *pc); else - foreach (c; pack.package_.getPlatformConfigurations(platform, pack.package_ is m_rootPackage && allow_non_library)) + foreach (c; pack.package_.getPlatformConfigurations(platform, allow_non_library)) determineDependencyConfigs(pack_idx, c); } diff --git a/source/dub/version_.d b/source/dub/version_.d index 456ebcb987..171fb6c3d2 100644 --- a/source/dub/version_.d +++ b/source/dub/version_.d @@ -1,2 +1,2 @@ module dub.version_; -enum dubVersion = "v1.39.0-rc.1"; +enum dubVersion = "v1.41.0"; diff --git a/test/issue3029_subpack_exe_default_conf/.no_run b/test/issue3029_subpack_exe_default_conf/.no_run new file mode 100644 index 0000000000..e69de29bb2 diff --git a/test/issue3029_subpack_exe_default_conf/.no_test b/test/issue3029_subpack_exe_default_conf/.no_test new file mode 100644 index 0000000000..e69de29bb2 diff --git a/test/issue3029_subpack_exe_default_conf/dub.json b/test/issue3029_subpack_exe_default_conf/dub.json new file mode 100644 index 0000000000..28c1957fcd --- /dev/null +++ b/test/issue3029_subpack_exe_default_conf/dub.json @@ -0,0 +1,10 @@ +{ + "name": "issue3029_subpack_exe_default_conf", + "targetType": "none", + "subPackages": [ + "sub" + ], + "dependencies": { + ":sub": "*" + } +} diff --git a/test/issue3029_subpack_exe_default_conf/sub/dub.json b/test/issue3029_subpack_exe_default_conf/sub/dub.json new file mode 100644 index 0000000000..9ad1d54790 --- /dev/null +++ b/test/issue3029_subpack_exe_default_conf/sub/dub.json @@ -0,0 +1,18 @@ +{ + "name": "sub", + "targetType": "executable", + "configurations": [ + { + "name": "default", + "versions": [ + "special" + ] + } + ], + "postBuildCommands-windows": [ + "$DUB_TARGET_NAME" + ], + "postBuildCommands-posix": [ + "./$DUB_TARGET_NAME" + ] +} diff --git a/test/issue3029_subpack_exe_default_conf/sub/source/app.d b/test/issue3029_subpack_exe_default_conf/sub/source/app.d new file mode 100644 index 0000000000..df1ff59b8d --- /dev/null +++ b/test/issue3029_subpack_exe_default_conf/sub/source/app.d @@ -0,0 +1,15 @@ +module app; + +int main() +{ + version (special) + { + // Expected. + return 0; + } + else + { + // Failure. + return 1; + } +} diff --git a/test/issue595-subpack-exe-subconfig/.no_run b/test/issue595-subpack-exe-subconfig/.no_run new file mode 100644 index 0000000000..e69de29bb2 diff --git a/test/issue595-subpack-exe-subconfig/.no_test b/test/issue595-subpack-exe-subconfig/.no_test new file mode 100644 index 0000000000..e69de29bb2 diff --git a/test/issue595-subpack-exe-subconfig/dub.json b/test/issue595-subpack-exe-subconfig/dub.json new file mode 100644 index 0000000000..10c6e18694 --- /dev/null +++ b/test/issue595-subpack-exe-subconfig/dub.json @@ -0,0 +1,13 @@ +{ + "name": "issue595-subpack-exe-subconfig", + "targetType": "none", + "subPackages": [ + "sub" + ], + "dependencies": { + ":sub": "*" + }, + "subConfigurations": { + "issue595-subpack-exe-subconfig:sub": "special" + } +} diff --git a/test/issue595-subpack-exe-subconfig/sub/dub.json b/test/issue595-subpack-exe-subconfig/sub/dub.json new file mode 100644 index 0000000000..43e7686e41 --- /dev/null +++ b/test/issue595-subpack-exe-subconfig/sub/dub.json @@ -0,0 +1,15 @@ +{ + "name": "sub", + "targetType": "executable", + "configurations": [ + { + "name": "default" + }, + { + "name": "special", + "versions": [ + "special" + ] + } + ] +} diff --git a/test/issue595-subpack-exe-subconfig/sub/source/app.d b/test/issue595-subpack-exe-subconfig/sub/source/app.d new file mode 100644 index 0000000000..a70f12436d --- /dev/null +++ b/test/issue595-subpack-exe-subconfig/sub/source/app.d @@ -0,0 +1,13 @@ +import std.stdio; + +void main() +{ + version (special) + { + writeln("Special version"); + } + else + { + writeln("Standard version"); + } +}