From fe54fa84cba361ecd97d26ddaca692a7ceee9d32 Mon Sep 17 00:00:00 2001 From: Hackerpilot Date: Sat, 25 Jul 2020 00:09:42 -0700 Subject: [PATCH 1/6] Test cases for #620 --- tests/imports/scope_mess.d | 3 +++ tests/imports/tc620_import.d | 12 ++++++++++++ tests/tc620/expected.txt | 2 ++ tests/tc620/file.d | 1 + tests/tc620/run.sh | 5 +++++ tests/tc_scope_mess/expected1.txt | 3 +++ 6 files changed, 26 insertions(+) create mode 100644 tests/imports/tc620_import.d create mode 100644 tests/tc620/expected.txt create mode 100644 tests/tc620/file.d create mode 100755 tests/tc620/run.sh diff --git a/tests/imports/scope_mess.d b/tests/imports/scope_mess.d index 56a885e..4776876 100644 --- a/tests/imports/scope_mess.d +++ b/tests/imports/scope_mess.d @@ -4,4 +4,7 @@ class FooTest { void member1() { int b; } void member2() in {} do {} + void member3() in(true) out(a; true) do {} + void member4() out(; things) do {} + void member5() do {} } diff --git a/tests/imports/tc620_import.d b/tests/imports/tc620_import.d new file mode 100644 index 0000000..45a3d7c --- /dev/null +++ b/tests/imports/tc620_import.d @@ -0,0 +1,12 @@ +struct UselessStruct +{ + static if (true) + { + unittest {} + } + +private: + +} + +int someNumber; diff --git a/tests/tc620/expected.txt b/tests/tc620/expected.txt new file mode 100644 index 0000000..73a40ab --- /dev/null +++ b/tests/tc620/expected.txt @@ -0,0 +1,2 @@ +identifiers +someNumber v diff --git a/tests/tc620/file.d b/tests/tc620/file.d new file mode 100644 index 0000000..166e016 --- /dev/null +++ b/tests/tc620/file.d @@ -0,0 +1 @@ +import tc620_import; some diff --git a/tests/tc620/run.sh b/tests/tc620/run.sh new file mode 100755 index 0000000..ea7d14c --- /dev/null +++ b/tests/tc620/run.sh @@ -0,0 +1,5 @@ +set -e +set -u + +../../bin/dcd-client $1 file.d -c25 > actual.txt +diff actual.txt expected.txt diff --git a/tests/tc_scope_mess/expected1.txt b/tests/tc_scope_mess/expected1.txt index 1cb5cf9..9f16d3d 100644 --- a/tests/tc_scope_mess/expected1.txt +++ b/tests/tc_scope_mess/expected1.txt @@ -7,6 +7,9 @@ init k mangleof k member1 f member2 f +member3 f +member4 f +member5 f sizeof k stringof k tupleof k From dbc9d82f708f18354d5ba26e5efbcf2997c6ba11 Mon Sep 17 00:00:00 2001 From: Hackerpilot Date: Wed, 29 Jul 2020 23:04:19 -0700 Subject: [PATCH 2/6] Update several dependencies. libdparse: Get support for 'throw' as a function attribute dsymbol: A bug fix that will fix issue 620 msgpack-d: Fix some deprecations and some build issues on Windows containers: Some bug fixes. --- common/dub.sdl | 2 +- containers | 2 +- dsymbol | 2 +- dub.json | 8 ++++---- libdparse | 2 +- msgpack-d | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/common/dub.sdl b/common/dub.sdl index c1f1f6b..95f0ef9 100644 --- a/common/dub.sdl +++ b/common/dub.sdl @@ -4,5 +4,5 @@ preGenerateCommands "rdmd \"$PACKAGE_DIR/dubhash.d\"" sourcePaths "src" importPaths "src" -dependency "msgpack-d" version="~>1.0.0-beta.7" +dependency "msgpack-d" version="~>1.0.3" versions "built_with_dub" diff --git a/containers b/containers index a978c3c..f4e7937 160000 --- a/containers +++ b/containers @@ -1 +1 @@ -Subproject commit a978c3cda3f6ec3ba7449ec5c08dd5cd4dd79c6e +Subproject commit f4e79375539554b3793adf1c557361a64a073524 diff --git a/dsymbol b/dsymbol index 71168a8..f9a3d30 160000 --- a/dsymbol +++ b/dsymbol @@ -1 +1 @@ -Subproject commit 71168a8449958e1807a8ba22c8a4df15456bae83 +Subproject commit f9a3d302527a9e50140991562648a147b6f5a78e diff --git a/dub.json b/dub.json index d88424a..4109af7 100644 --- a/dub.json +++ b/dub.json @@ -1,17 +1,17 @@ { "name": "dcd", "description": "The D Completion Daemon is an auto-complete program for the D programming language", - "copyright": "Copyright © 2015-2017, Brian Schott", + "copyright": "Copyright © 2015-2020, Brian Schott", "authors": [ "Brian Schott" ], "license": "GPL-3.0", "dependencies": { - "dsymbol": ">=0.11.0 <0.12.0", - "libdparse": ">=0.15.0 <0.16.0", + "dsymbol": ">=0.11.2 <0.12.0", + "libdparse": ">=0.15.4 <0.16.0", ":common": "*", "stdx-allocator": "~>2.77.5", - "emsi_containers": "~>0.8.0-alpha.15" + "emsi_containers": "~>0.8.0-alpha.19" }, "subPackages": ["common"], "versions": ["built_with_dub"], diff --git a/libdparse b/libdparse index f9a8284..1393ee4 160000 --- a/libdparse +++ b/libdparse @@ -1 +1 @@ -Subproject commit f9a82848fe98a84f38a66df950514c3556e7fb2d +Subproject commit 1393ee4d0c8e50011e641e06d64c429841fb3c2b diff --git a/msgpack-d b/msgpack-d index 19d9245..7c64af4 160000 --- a/msgpack-d +++ b/msgpack-d @@ -1 +1 @@ -Subproject commit 19d9245e315a85763754ded6912c2375c9226e04 +Subproject commit 7c64af4b212d782e2cc84fc071575f1ddb2852eb From 6ab9b3a644ae4976dd6e089f6fc9aae52fed2f6a Mon Sep 17 00:00:00 2001 From: Hackerpilot Date: Thu, 30 Jul 2020 02:00:45 -0700 Subject: [PATCH 3/6] Try building with a newer LDC --- setup-ldc-windows.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/setup-ldc-windows.sh b/setup-ldc-windows.sh index 0656b5a..c854e7f 100644 --- a/setup-ldc-windows.sh +++ b/setup-ldc-windows.sh @@ -2,7 +2,7 @@ # sets up LDC for cross-compilation. Source this script, s.t. the new LDC is in PATH -LDC_VERSION="1.13.0" +LDC_VERSION="1.15.0" ARCH=${ARCH:-32} VERSION=$(git describe --abbrev=0 --tags) OS=windows @@ -18,11 +18,11 @@ LDC_PATH="$(dirname $(dirname $(which ldc2)))" # Step 1a: download the LDC x64 windows binaries if [ "${ARCH}" == 64 ] && [ ! -d "ldc2-${LDC_VERSION}-windows-x64" ] ; then - wget "https://github.com/ldc-developers/ldc/releases/download/v1.13.0/ldc2-${LDC_VERSION}-windows-x64.7z" + wget "https://github.com/ldc-developers/ldc/releases/download/v1.15.0/ldc2-${LDC_VERSION}-windows-x64.7z" 7z x "ldc2-${LDC_VERSION}-windows-x64.7z" > /dev/null # Step 2a: Add LDC windows binaries to LDC Linux if [ ! -d "${LDC_PATH}/lib-win64" ] ; then - cp -r ldc2-1.13.0-windows-x64/lib "${LDC_PATH}/lib-win64" + cp -r ldc2-1.15.0-windows-x64/lib "${LDC_PATH}/lib-win64" cat >> "$LDC_PATH"/etc/ldc2.conf < /dev/null # Step 2b: Add LDC windows binaries to LDC Linux if [ ! -d "${LDC_PATH}/lib-win32" ] ; then - cp -r ldc2-1.13.0-windows-x86/lib "${LDC_PATH}/lib-win32" + cp -r ldc2-1.15.0-windows-x86/lib "${LDC_PATH}/lib-win32" cat >> "$LDC_PATH"/etc/ldc2.conf < Date: Thu, 30 Jul 2020 02:41:17 -0700 Subject: [PATCH 4/6] Revert "Try building with a newer LDC" This reverts commit 6ab9b3a644ae4976dd6e089f6fc9aae52fed2f6a. --- setup-ldc-windows.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/setup-ldc-windows.sh b/setup-ldc-windows.sh index c854e7f..0656b5a 100644 --- a/setup-ldc-windows.sh +++ b/setup-ldc-windows.sh @@ -2,7 +2,7 @@ # sets up LDC for cross-compilation. Source this script, s.t. the new LDC is in PATH -LDC_VERSION="1.15.0" +LDC_VERSION="1.13.0" ARCH=${ARCH:-32} VERSION=$(git describe --abbrev=0 --tags) OS=windows @@ -18,11 +18,11 @@ LDC_PATH="$(dirname $(dirname $(which ldc2)))" # Step 1a: download the LDC x64 windows binaries if [ "${ARCH}" == 64 ] && [ ! -d "ldc2-${LDC_VERSION}-windows-x64" ] ; then - wget "https://github.com/ldc-developers/ldc/releases/download/v1.15.0/ldc2-${LDC_VERSION}-windows-x64.7z" + wget "https://github.com/ldc-developers/ldc/releases/download/v1.13.0/ldc2-${LDC_VERSION}-windows-x64.7z" 7z x "ldc2-${LDC_VERSION}-windows-x64.7z" > /dev/null # Step 2a: Add LDC windows binaries to LDC Linux if [ ! -d "${LDC_PATH}/lib-win64" ] ; then - cp -r ldc2-1.15.0-windows-x64/lib "${LDC_PATH}/lib-win64" + cp -r ldc2-1.13.0-windows-x64/lib "${LDC_PATH}/lib-win64" cat >> "$LDC_PATH"/etc/ldc2.conf < /dev/null # Step 2b: Add LDC windows binaries to LDC Linux if [ ! -d "${LDC_PATH}/lib-win32" ] ; then - cp -r ldc2-1.15.0-windows-x86/lib "${LDC_PATH}/lib-win32" + cp -r ldc2-1.13.0-windows-x86/lib "${LDC_PATH}/lib-win32" cat >> "$LDC_PATH"/etc/ldc2.conf < Date: Thu, 30 Jul 2020 02:51:20 -0700 Subject: [PATCH 5/6] Use a newer, but not the newest, msgpack-d --- common/dub.sdl | 2 +- msgpack-d | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/dub.sdl b/common/dub.sdl index 95f0ef9..ae5f9a3 100644 --- a/common/dub.sdl +++ b/common/dub.sdl @@ -4,5 +4,5 @@ preGenerateCommands "rdmd \"$PACKAGE_DIR/dubhash.d\"" sourcePaths "src" importPaths "src" -dependency "msgpack-d" version="~>1.0.3" +dependency "msgpack-d" version="~>1.0.1" versions "built_with_dub" diff --git a/msgpack-d b/msgpack-d index 7c64af4..480f3bf 160000 --- a/msgpack-d +++ b/msgpack-d @@ -1 +1 @@ -Subproject commit 7c64af4b212d782e2cc84fc071575f1ddb2852eb +Subproject commit 480f3bf9ee80ccf6695ed900cfcc1850ba8da991 From f4607c642141bf4febd794bc6e4edeccdb8f27a9 Mon Sep 17 00:00:00 2001 From: Hackerpilot Date: Thu, 30 Jul 2020 03:11:51 -0700 Subject: [PATCH 6/6] Specify the version of msgpack-d correctly --- common/dub.sdl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/dub.sdl b/common/dub.sdl index ae5f9a3..908877a 100644 --- a/common/dub.sdl +++ b/common/dub.sdl @@ -4,5 +4,5 @@ preGenerateCommands "rdmd \"$PACKAGE_DIR/dubhash.d\"" sourcePaths "src" importPaths "src" -dependency "msgpack-d" version="~>1.0.1" +dependency "msgpack-d" version="1.0.1" versions "built_with_dub"