From b458c6a38097d6165edf52f84176a5178d053ac9 Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Tue, 5 Mar 2019 20:25:26 +0100 Subject: [PATCH] Make subpackages of os, sys and encoding --- .travis.yml | 13 ++++++++++--- appveyor.yml | 3 +++ dub.json | 10 ++++++++-- encoding/dub.json | 9 +++++++++ {source => encoding/source}/tanya/encoding/ascii.d | 2 +- .../source}/tanya/encoding/package.d | 2 +- os/dub.json | 9 +++++++++ {source => os/source}/tanya/os/error.d | 2 +- {source => os/source}/tanya/os/package.d | 2 +- sys/dub.json | 5 +++++ {source => sys/source}/tanya/sys/linux/syscall.d | 2 +- {source => sys/source}/tanya/sys/posix/ioctl.d | 2 +- {source => sys/source}/tanya/sys/posix/mman.d | 2 +- {source => sys/source}/tanya/sys/posix/net/if_.d | 2 +- {source => sys/source}/tanya/sys/posix/socket.d | 2 +- {source => sys/source}/tanya/sys/windows/def.d | 2 +- {source => sys/source}/tanya/sys/windows/ifdef.d | 2 +- {source => sys/source}/tanya/sys/windows/iphlpapi.d | 2 +- {source => sys/source}/tanya/sys/windows/package.d | 2 +- {source => sys/source}/tanya/sys/windows/winbase.d | 2 +- {source => sys/source}/tanya/sys/windows/winsock2.d | 2 +- 21 files changed, 59 insertions(+), 20 deletions(-) create mode 100644 encoding/dub.json rename {source => encoding/source}/tanya/encoding/ascii.d (99%) rename {source => encoding/source}/tanya/encoding/package.d (94%) create mode 100644 os/dub.json rename {source => os/source}/tanya/os/error.d (99%) rename {source => os/source}/tanya/os/package.d (94%) create mode 100644 sys/dub.json rename {source => sys/source}/tanya/sys/linux/syscall.d (98%) rename {source => sys/source}/tanya/sys/posix/ioctl.d (98%) rename {source => sys/source}/tanya/sys/posix/mman.d (96%) rename {source => sys/source}/tanya/sys/posix/net/if_.d (94%) rename {source => sys/source}/tanya/sys/posix/socket.d (99%) rename {source => sys/source}/tanya/sys/windows/def.d (98%) rename {source => sys/source}/tanya/sys/windows/ifdef.d (91%) rename {source => sys/source}/tanya/sys/windows/iphlpapi.d (94%) rename {source => sys/source}/tanya/sys/windows/package.d (95%) rename {source => sys/source}/tanya/sys/windows/winbase.d (97%) rename {source => sys/source}/tanya/sys/windows/winsock2.d (99%) diff --git a/.travis.yml b/.travis.yml index 62343f6..3cb4f7a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -47,18 +47,25 @@ before_script: fi script: -- if [ -n "$DDOC" ]; then +- set -e; + if [ -n "$DDOC" ]; then dub build :meta -b ddox --compiler=$DC; + dub build :sys -b ddox --compiler=$DC; + dub build :os -b ddox --compiler=$DC; + dub build :encoding -b ddox --compiler=$DC; dub build -b ddox --compiler=$DC; elif [ -z "$DSCANNER" ]; then dub test :meta -b ${UNITTEST:-unittest} --arch=$ARCH --compiler=$DC; + dub test :sys -b ${UNITTEST:-unittest} --arch=$ARCH --compiler=$DC; + dub test :os -b ${UNITTEST:-unittest} --arch=$ARCH --compiler=$DC; + dub test :encoding -b ${UNITTEST:-unittest} --arch=$ARCH --compiler=$DC; dub test -b ${UNITTEST:-unittest} --arch=$ARCH --compiler=$DC; else dub fetch dscanner --version=$DSCANNER; - FILES=$(find source -type f); + FILES=$(find source */source -type f); dub run dscanner -- --styleCheck $FILES; fi after_success: -- test "$UNITTEST" && bash <(curl -s https://codecov.io/bash) +- test "$UNITTEST" && bash <(curl -s https://codecov.io/bash) || true diff --git a/appveyor.yml b/appveyor.yml index 61eea5c..fd4db00 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -58,4 +58,7 @@ test_script: - 'dub --version' - '%DC% --version' - dub test :meta -b unittest --arch=%Darch% --compiler=%DC% + - dub test :sys -b unittest --arch=%Darch% --compiler=%DC% + - dub test :os -b unittest --arch=%Darch% --compiler=%DC% + - dub test :encoding -b unittest --arch=%Darch% --compiler=%DC% - dub test -b unittest --arch=%Darch% --compiler=%DC% diff --git a/dub.json b/dub.json index 736c5ba..823f97f 100644 --- a/dub.json +++ b/dub.json @@ -10,7 +10,10 @@ "targetType": "library", "dependencies": { - "tanya:meta": "*" + "tanya:meta": "*", + "tanya:sys": "*", + "tanya:os": "*", + "tanya:encoding": "*" }, "dependencies-linux": { @@ -18,7 +21,10 @@ }, "subPackages": [ - "./meta" + "./meta", + "./sys", + "./os", + "./encoding" ], "configurations": [ diff --git a/encoding/dub.json b/encoding/dub.json new file mode 100644 index 0000000..9c50acd --- /dev/null +++ b/encoding/dub.json @@ -0,0 +1,9 @@ +{ + "name": "encoding", + "description": "This package provides tools to work with text encodings", + "targetType": "library", + + "dependencies": { + "tanya:meta": "*" + } +} diff --git a/source/tanya/encoding/ascii.d b/encoding/source/tanya/encoding/ascii.d similarity index 99% rename from source/tanya/encoding/ascii.d rename to encoding/source/tanya/encoding/ascii.d index c30d931..c664861 100644 --- a/source/tanya/encoding/ascii.d +++ b/encoding/source/tanya/encoding/ascii.d @@ -8,7 +8,7 @@ * ASCII is $(B A)merican $(B S)tandard $(B C)ode for $(B I)nformation * $(B I)nterchange. * - * Copyright: Eugene Wissner 2017-2018. + * Copyright: Eugene Wissner 2017-2019. * License: $(LINK2 https://www.mozilla.org/en-US/MPL/2.0/, * Mozilla Public License, v. 2.0). * Authors: $(LINK2 mailto:info@caraus.de, Eugene Wissner) diff --git a/source/tanya/encoding/package.d b/encoding/source/tanya/encoding/package.d similarity index 94% rename from source/tanya/encoding/package.d rename to encoding/source/tanya/encoding/package.d index 49f5ca5..e9912ee 100644 --- a/source/tanya/encoding/package.d +++ b/encoding/source/tanya/encoding/package.d @@ -5,7 +5,7 @@ /** * This package provides tools to work with text encodings. * - * Copyright: Eugene Wissner 2017-2018. + * Copyright: Eugene Wissner 2017-2019. * License: $(LINK2 https://www.mozilla.org/en-US/MPL/2.0/, * Mozilla Public License, v. 2.0). * Authors: $(LINK2 mailto:info@caraus.de, Eugene Wissner) diff --git a/os/dub.json b/os/dub.json new file mode 100644 index 0000000..87df29d --- /dev/null +++ b/os/dub.json @@ -0,0 +1,9 @@ +{ + "name": "os", + "description": "Platform-independent interfaces to operating system functionality", + "targetType": "library", + + "dependencies": { + "tanya:meta": "*" + } +} diff --git a/source/tanya/os/error.d b/os/source/tanya/os/error.d similarity index 99% rename from source/tanya/os/error.d rename to os/source/tanya/os/error.d index bc4a008..b80404a 100644 --- a/source/tanya/os/error.d +++ b/os/source/tanya/os/error.d @@ -5,7 +5,7 @@ /** * This module provides a portable way of using operating system error codes. * - * Copyright: Eugene Wissner 2017-2018. + * Copyright: Eugene Wissner 2017-2019. * License: $(LINK2 https://www.mozilla.org/en-US/MPL/2.0/, * Mozilla Public License, v. 2.0). * Authors: $(LINK2 mailto:info@caraus.de, Eugene Wissner) diff --git a/source/tanya/os/package.d b/os/source/tanya/os/package.d similarity index 94% rename from source/tanya/os/package.d rename to os/source/tanya/os/package.d index 5292a8a..c472c05 100644 --- a/source/tanya/os/package.d +++ b/os/source/tanya/os/package.d @@ -6,7 +6,7 @@ * This package provides platform-independent interfaces to operating system * functionality. * - * Copyright: Eugene Wissner 2017-2018. + * Copyright: Eugene Wissner 2017-2019. * License: $(LINK2 https://www.mozilla.org/en-US/MPL/2.0/, * Mozilla Public License, v. 2.0). * Authors: $(LINK2 mailto:info@caraus.de, Eugene Wissner) diff --git a/sys/dub.json b/sys/dub.json new file mode 100644 index 0000000..8fb6d71 --- /dev/null +++ b/sys/dub.json @@ -0,0 +1,5 @@ +{ + "name": "sys", + "description": "Low-level operating system bindings and definitions", + "targetType": "library" +} diff --git a/source/tanya/sys/linux/syscall.d b/sys/source/tanya/sys/linux/syscall.d similarity index 98% rename from source/tanya/sys/linux/syscall.d rename to sys/source/tanya/sys/linux/syscall.d index e70f75a..ccc3fee 100644 --- a/source/tanya/sys/linux/syscall.d +++ b/sys/source/tanya/sys/linux/syscall.d @@ -3,7 +3,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* - * Copyright: Eugene Wissner 2018. + * Copyright: Eugene Wissner 2018-2019. * License: $(LINK2 https://www.mozilla.org/en-US/MPL/2.0/, * Mozilla Public License, v. 2.0). * Authors: $(LINK2 mailto:info@caraus.de, Eugene Wissner) diff --git a/source/tanya/sys/posix/ioctl.d b/sys/source/tanya/sys/posix/ioctl.d similarity index 98% rename from source/tanya/sys/posix/ioctl.d rename to sys/source/tanya/sys/posix/ioctl.d index abd8f84..86d1465 100644 --- a/source/tanya/sys/posix/ioctl.d +++ b/sys/source/tanya/sys/posix/ioctl.d @@ -3,7 +3,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* - * Copyright: Eugene Wissner 2018. + * Copyright: Eugene Wissner 2018-2019. * License: $(LINK2 https://www.mozilla.org/en-US/MPL/2.0/, * Mozilla Public License, v. 2.0). * Authors: $(LINK2 mailto:info@caraus.de, Eugene Wissner) diff --git a/source/tanya/sys/posix/mman.d b/sys/source/tanya/sys/posix/mman.d similarity index 96% rename from source/tanya/sys/posix/mman.d rename to sys/source/tanya/sys/posix/mman.d index dbf78a9..24a4701 100644 --- a/source/tanya/sys/posix/mman.d +++ b/sys/source/tanya/sys/posix/mman.d @@ -3,7 +3,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* - * Copyright: Eugene Wissner 2018. + * Copyright: Eugene Wissner 2018-2019. * License: $(LINK2 https://www.mozilla.org/en-US/MPL/2.0/, * Mozilla Public License, v. 2.0). * Authors: $(LINK2 mailto:info@caraus.de, Eugene Wissner) diff --git a/source/tanya/sys/posix/net/if_.d b/sys/source/tanya/sys/posix/net/if_.d similarity index 94% rename from source/tanya/sys/posix/net/if_.d rename to sys/source/tanya/sys/posix/net/if_.d index e72cc04..1cb5b43 100644 --- a/source/tanya/sys/posix/net/if_.d +++ b/sys/source/tanya/sys/posix/net/if_.d @@ -3,7 +3,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* - * Copyright: Eugene Wissner 2018. + * Copyright: Eugene Wissner 2018-2019. * License: $(LINK2 https://www.mozilla.org/en-US/MPL/2.0/, * Mozilla Public License, v. 2.0). * Authors: $(LINK2 mailto:info@caraus.de, Eugene Wissner) diff --git a/source/tanya/sys/posix/socket.d b/sys/source/tanya/sys/posix/socket.d similarity index 99% rename from source/tanya/sys/posix/socket.d rename to sys/source/tanya/sys/posix/socket.d index 9708f04..8924a8d 100644 --- a/source/tanya/sys/posix/socket.d +++ b/sys/source/tanya/sys/posix/socket.d @@ -3,7 +3,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* - * Copyright: Eugene Wissner 2018. + * Copyright: Eugene Wissner 2018-2019. * License: $(LINK2 https://www.mozilla.org/en-US/MPL/2.0/, * Mozilla Public License, v. 2.0). * Authors: $(LINK2 mailto:info@caraus.de, Eugene Wissner) diff --git a/source/tanya/sys/windows/def.d b/sys/source/tanya/sys/windows/def.d similarity index 98% rename from source/tanya/sys/windows/def.d rename to sys/source/tanya/sys/windows/def.d index ea37266..84b4864 100644 --- a/source/tanya/sys/windows/def.d +++ b/sys/source/tanya/sys/windows/def.d @@ -16,7 +16,7 @@ * defined here. * Also aliases for specific types like $(D_PSYMBOL SOCKET) are defined here. * - * Copyright: Eugene Wissner 2017-2018. + * Copyright: Eugene Wissner 2017-2019. * License: $(LINK2 https://www.mozilla.org/en-US/MPL/2.0/, * Mozilla Public License, v. 2.0). * Authors: $(LINK2 mailto:info@caraus.de, Eugene Wissner) diff --git a/source/tanya/sys/windows/ifdef.d b/sys/source/tanya/sys/windows/ifdef.d similarity index 91% rename from source/tanya/sys/windows/ifdef.d rename to sys/source/tanya/sys/windows/ifdef.d index 89e1c3f..f091427 100644 --- a/source/tanya/sys/windows/ifdef.d +++ b/sys/source/tanya/sys/windows/ifdef.d @@ -3,7 +3,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /** - * Copyright: Eugene Wissner 2018. + * Copyright: Eugene Wissner 2018-2019. * License: $(LINK2 https://www.mozilla.org/en-US/MPL/2.0/, * Mozilla Public License, v. 2.0). * Authors: $(LINK2 mailto:info@caraus.de, Eugene Wissner) diff --git a/source/tanya/sys/windows/iphlpapi.d b/sys/source/tanya/sys/windows/iphlpapi.d similarity index 94% rename from source/tanya/sys/windows/iphlpapi.d rename to sys/source/tanya/sys/windows/iphlpapi.d index 002d2f5..37d0f16 100644 --- a/source/tanya/sys/windows/iphlpapi.d +++ b/sys/source/tanya/sys/windows/iphlpapi.d @@ -3,7 +3,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /** - * Copyright: Eugene Wissner 2018. + * Copyright: Eugene Wissner 2018-2019. * License: $(LINK2 https://www.mozilla.org/en-US/MPL/2.0/, * Mozilla Public License, v. 2.0). * Authors: $(LINK2 mailto:info@caraus.de, Eugene Wissner) diff --git a/source/tanya/sys/windows/package.d b/sys/source/tanya/sys/windows/package.d similarity index 95% rename from source/tanya/sys/windows/package.d rename to sys/source/tanya/sys/windows/package.d index 120013f..5e9b396 100644 --- a/source/tanya/sys/windows/package.d +++ b/sys/source/tanya/sys/windows/package.d @@ -3,7 +3,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /** - * Copyright: Eugene Wissner 2017-2018. + * Copyright: Eugene Wissner 2017-2019. * License: $(LINK2 https://www.mozilla.org/en-US/MPL/2.0/, * Mozilla Public License, v. 2.0). * Authors: $(LINK2 mailto:info@caraus.de, Eugene Wissner) diff --git a/source/tanya/sys/windows/winbase.d b/sys/source/tanya/sys/windows/winbase.d similarity index 97% rename from source/tanya/sys/windows/winbase.d rename to sys/source/tanya/sys/windows/winbase.d index 02978a3..407b6d2 100644 --- a/source/tanya/sys/windows/winbase.d +++ b/sys/source/tanya/sys/windows/winbase.d @@ -5,7 +5,7 @@ /** * Definitions from winbase.h. * - * Copyright: Eugene Wissner 2017-2018. + * Copyright: Eugene Wissner 2017-2019. * License: $(LINK2 https://www.mozilla.org/en-US/MPL/2.0/, * Mozilla Public License, v. 2.0). * Authors: $(LINK2 mailto:info@caraus.de, Eugene Wissner) diff --git a/source/tanya/sys/windows/winsock2.d b/sys/source/tanya/sys/windows/winsock2.d similarity index 99% rename from source/tanya/sys/windows/winsock2.d rename to sys/source/tanya/sys/windows/winsock2.d index 8a00ed9..931e76b 100644 --- a/source/tanya/sys/windows/winsock2.d +++ b/sys/source/tanya/sys/windows/winsock2.d @@ -5,7 +5,7 @@ /** * Definitions from winsock2.h, ws2def.h and MSWSock.h. * - * Copyright: Eugene Wissner 2017-2018. + * Copyright: Eugene Wissner 2017-2019. * License: $(LINK2 https://www.mozilla.org/en-US/MPL/2.0/, * Mozilla Public License, v. 2.0). * Authors: $(LINK2 mailto:info@caraus.de, Eugene Wissner)