-
-
Notifications
You must be signed in to change notification settings - Fork 227
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into stable
- Loading branch information
Showing
26 changed files
with
184 additions
and
29 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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
Hidden directories are now ignored. | ||
|
||
A hidden directory on most Posix file systems starts with a period. e.g. | ||
`.dub`. By default, dub ignored hidden files (e.g. `.swap.file.d`), but not | ||
hidden directories. Some operating systems create hidden directories that dub | ||
would try to include for compilation. This release now will properly ignore | ||
hidden directories, unless those directories are specifically named in the dub | ||
recipe file. | ||
|
||
Note that this uses the directory name exclusively and does not check file | ||
attributes. |
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,5 @@ | ||
Dub lint now supports --report-file argument. | ||
|
||
Dub lint can now be called with --report-file argument: | ||
dub lint --report-file report.json | ||
|
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
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
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 +1 @@ | ||
2.076 | ||
2.077 |
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 +1 @@ | ||
2.076 | ||
2.077 |
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,37 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
. $(dirname "${BASH_SOURCE[0]}")/common.sh | ||
|
||
|
||
BASEDIR=${CURR_DIR}/issue1372-ignore-files-in-hidden-dirs | ||
rm -rf ${BASEDIR}/.dub | ||
rm -rf ${BASEDIR}/issue1372 | ||
|
||
echo "Compile and ignore hidden directories" | ||
${DUB} build --root ${BASEDIR} --config=normal --force | ||
OUTPUT=`${BASEDIR}/issue1372` | ||
if [[ "$OUTPUT" != "no hidden file compiled" ]]; then die "Normal compilation failed"; fi | ||
|
||
rm -rf ${BASEDIR}/.dub | ||
rm -rf ${BASEDIR}/issue1372 | ||
|
||
|
||
echo "Compile and explcitly include file in hidden directories" | ||
${DUB} build --root ${BASEDIR} --config=hiddenfile --force | ||
OUTPUT=`${BASEDIR}/issue1372` | ||
|
||
if [[ "$OUTPUT" != "hidden file compiled" ]]; then die "Hidden file compilation failed"; fi | ||
|
||
rm -rf ${BASEDIR}/.dub | ||
rm -rf ${BASEDIR}/issue1372 | ||
|
||
echo "Compile and explcitly include extra hidden directories" | ||
${DUB} build --root ${BASEDIR} --config=hiddendir --force | ||
OUTPUT=`${BASEDIR}/issue1372` | ||
|
||
if [[ "$OUTPUT" != "hidden dir compiled" ]]; then die "Hidden directory compilation failed"; fi | ||
|
||
rm -rf ${BASEDIR}/.dub | ||
rm -rf ${BASEDIR}/issue1372 |
7 changes: 7 additions & 0 deletions
7
test/issue1372-ignore-files-in-hidden-dirs/.hiddensource/hello.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,7 @@ | ||
module hello; | ||
import std.stdio; | ||
|
||
void helloFun() | ||
{ | ||
writeln("hidden dir compiled"); | ||
} |
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,22 @@ | ||
{ | ||
"name": "issue1372", | ||
"mainSourceFile": "source/app.d", | ||
"configurations": [ | ||
{ | ||
"name": "normal", | ||
"targetType": "executable" | ||
}, | ||
{ | ||
"name": "hiddenfile", | ||
"targetType": "executable", | ||
"versions" : ["UseHiddenFile"], | ||
"sourceFiles":["source/.compileMe/hello.d"] | ||
}, | ||
{ | ||
"name": "hiddendir", | ||
"targetType": "executable", | ||
"versions" : ["UseHiddenFile"], | ||
"sourcePaths":["source", ".hiddensource"], | ||
"importPaths":["source", ".hiddensource"] | ||
}] | ||
} |
2 changes: 2 additions & 0 deletions
2
test/issue1372-ignore-files-in-hidden-dirs/source/.AppleDouble/app.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,2 @@ | ||
This file needs to contain something to show the issue up. | ||
If it's empty, it'll get ignored. |
7 changes: 7 additions & 0 deletions
7
test/issue1372-ignore-files-in-hidden-dirs/source/.compileMe/hello.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,7 @@ | ||
module hello; | ||
import std.stdio; | ||
|
||
void helloFun() | ||
{ | ||
writeln("hidden file compiled"); | ||
} |
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 @@ | ||
import std.stdio; | ||
|
||
void main() | ||
{ | ||
version(UseHiddenFile) | ||
{ | ||
import hello; | ||
helloFun(); | ||
} | ||
else | ||
{ | ||
static assert(!__traits(compiles, { | ||
import hello; | ||
helloFun(); | ||
})); | ||
writeln("no hidden file compiled"); | ||
} | ||
} |
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 +1 @@ | ||
2.076 | ||
2.077 |
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 +1 @@ | ||
2.076 | ||
2.077 |
Empty file.
Binary file not shown.
Binary file not shown.
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,15 @@ | ||
#!/usr/bin/env bash | ||
DIR=$(dirname "${BASH_SOURCE[0]}") | ||
|
||
. "$DIR"/common.sh | ||
|
||
dub remove main-package --non-interactive --version=* 2>/dev/null || true | ||
dub remove dependency-package --non-interactive --version=* 2>/dev/null || true | ||
|
||
|
||
echo "Trying to fetch fs-sdl-dubpackage" | ||
"$DUB" --cache=local fetch main-package --skip-registry=all --registry=file://"$DIR"/issue1556-fetch-and-build-pkgs | ||
|
||
echo "Trying to build it (should fetch dependency-package)" | ||
"$DUB" --cache=local build main-package --skip-registry=all --registry=file://"$DIR"/issue1556-fetch-and-build-pkgs | ||
|
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 +1 @@ | ||
2.076 | ||
2.077 |
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,8 +1,13 @@ | ||
#!/usr/bin/env bash | ||
. $(dirname "${BASH_SOURCE[0]}")/common.sh | ||
DIR=$(dirname "${BASH_SOURCE[0]}") | ||
cd ${CURR_DIR}/issue1773-lint | ||
rm -rf report.json | ||
|
||
if ! { ${DUB} lint --root ${DIR}/issue1773-lint || true; } | grep -cF "Parameter args is never used."; then | ||
if ! { ${DUB} lint || true; } | grep -cF "Parameter args is never used."; then | ||
die $LINENO 'DUB lint did not find expected warning.' | ||
fi | ||
|
||
${DUB} lint --report-file report.json | ||
if ! grep -c -e "Parameter args is never used." report.json; then | ||
die $LINENO 'Linter report did not contain expected warning.' | ||
fi |