Skip to content

Commit

Permalink
Merge pull request dlang#561 from Abscissa/fix-560
Browse files Browse the repository at this point in the history
Fix dlang#560: --import-paths error when "configurations" section exists
  • Loading branch information
MartinNowak committed May 3, 2015
2 parents e61a104 + f788a2b commit e3bf00c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
2 changes: 1 addition & 1 deletion source/dub/project.d
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ class Project {
auto fullPackagePaths(Package pack) {
// Return full paths for the import paths, making sure a
// directory separator is on the end of each path.
return __traits(getMember, pack.getBuildSettings(platform, config), attributeName)
return __traits(getMember, pack.getBuildSettings(platform, configs[pack.name]), attributeName)
.map!(importPath => buildPath(pack.path.toString(), importPath))
.map!(path => path.endsWith(dirSeparator) ? path : path ~ dirSeparator);
}
Expand Down
7 changes: 6 additions & 1 deletion test/describe-dependency-1/dub.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,10 @@
"authors": ["nobody"],
"homepage": "fake.com",
"license": "BSD 2-clause",
"copyright": "Copyright © 2015, nobody"
"copyright": "Copyright © 2015, nobody",
"configurations": [
{
"name": "my-dependency-1-config"
}
],
}
10 changes: 9 additions & 1 deletion test/describe-project/dub.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,13 @@
"version": "1.0",
"path": "../describe-dependency-2"
}
}
},
"configurations": [
{
"name": "my-project-config"
}
],
"subConfigurations": {
"describe-dependency-1": "my-dependency-1-config"
},
}

0 comments on commit e3bf00c

Please sign in to comment.