-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request dlang#552 from w0rp/list-import-paths
Add a command to DUB to list all of the import paths for a project.
- Loading branch information
Showing
20 changed files
with
241 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,22 @@ | ||
*.o | ||
*.obj | ||
|
||
.dub/ | ||
.dub | ||
.directory | ||
dub.selections.json | ||
bin/dub | ||
|
||
docs.json | ||
__dummy.html | ||
|
||
# Ignore build files. | ||
/bin/dub | ||
/bin/__test__library-nonet__ | ||
/bin/__test__library__ | ||
|
||
# Ignore files or directories created by the test suite. | ||
/test/custom-source-main-bug487/custom-source-main-bug487 | ||
/test/3-copyFiles/bin/ | ||
/test/ignore-hidden-1/ignore-hidden-1 | ||
/test/ignore-hidden-2/ignore-hidden-2 | ||
/test/expected-import-path-output | ||
/test/expected-string-import-path-output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/bash | ||
|
||
set -e -o pipefail | ||
|
||
cd "$CURR_DIR"/describe-project | ||
|
||
temp_file=`mktemp` | ||
|
||
function cleanup { | ||
rm $temp_file | ||
} | ||
|
||
trap cleanup EXIT | ||
|
||
if ! $DUB describe --compiler=$COMPILER --import-paths > "$temp_file"; then | ||
die 'Printing import paths failed!' | ||
fi | ||
|
||
# Create the expected output path file to compare against. | ||
echo "$CURR_DIR/describe-project/src/" > "$CURR_DIR/expected-import-path-output" | ||
echo "$CURR_DIR/describe-dependency-1/source/" >> "$CURR_DIR/expected-import-path-output" | ||
echo "$CURR_DIR/describe-dependency-2/some-path/" >> "$CURR_DIR/expected-import-path-output" | ||
|
||
if ! diff "$CURR_DIR"/expected-import-path-output "$temp_file"; then | ||
die 'The import paths did not match the expected output!' | ||
fi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/bash | ||
|
||
set -e -o pipefail | ||
|
||
cd "$CURR_DIR"/describe-project | ||
|
||
temp_file=`mktemp` | ||
|
||
function cleanup { | ||
rm $temp_file | ||
} | ||
|
||
trap cleanup EXIT | ||
|
||
if ! $DUB describe --compiler=$COMPILER > "$temp_file"; then | ||
die 'Printing describe JSON failed!' | ||
fi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
|
||
set -e -o pipefail | ||
|
||
cd "$CURR_DIR"/describe-project | ||
|
||
temp_file=`mktemp` | ||
|
||
function cleanup { | ||
rm $temp_file | ||
} | ||
|
||
trap cleanup EXIT | ||
|
||
if ! $DUB describe --compiler=$COMPILER --string-import-paths > "$temp_file"; then | ||
die 'Printing string import paths failed!' | ||
fi | ||
|
||
# Create the expected output path file to compare against. | ||
echo "$CURR_DIR/describe-project/views/" > "$CURR_DIR/expected-string-import-path-output" | ||
echo "$CURR_DIR/describe-dependency-2/some-extra-string-import-path/" >> "$CURR_DIR/expected-string-import-path-output" | ||
|
||
if ! diff "$CURR_DIR"/expected-string-import-path-output "$temp_file"; then | ||
die 'The string import paths did not match the expected output!' | ||
fi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"name": "describe-dependency-1", | ||
"targetType": "sourceLibrary", | ||
"description": "A test describe project", | ||
"authors": ["nobody"], | ||
"homepage": "fake.com", | ||
"license": "BSD 2-clause", | ||
"copyright": "Copyright © 2015, nobody" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"name": "describe-dependency-2", | ||
"targetType": "sourceLibrary", | ||
"description": "A test describe project", | ||
"authors": ["nobody"], | ||
"homepage": "fake.com", | ||
"license": "BSD 2-clause", | ||
"copyright": "Copyright © 2015, nobody", | ||
"importPaths": ["some-path"], | ||
"stringImportPaths": ["some-extra-string-import-path"], | ||
} |
1 change: 1 addition & 0 deletions
1
test/describe-dependency-2/some-extra-string-import-path/dummy.d
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"name": "describe-project", | ||
"targetType": "sourceLibrary", | ||
"description": "A test describe project", | ||
"authors": ["nobody"], | ||
"homepage": "fake.com", | ||
"license": "BSD 2-clause", | ||
"copyright": "Copyright © 2015, nobody", | ||
"dependencies": { | ||
"describe-dependency-1": { | ||
"version": "1.0", | ||
"path": "../describe-dependency-1" | ||
}, | ||
"describe-dependency-2": { | ||
"version": "1.0", | ||
"path": "../describe-dependency-2" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters