git: 7b1119cc4840 - main - devel/dcd-*: Update to 0.13.6
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 15 Nov 2022 02:06:27 UTC
The branch main has been updated by acm:
URL: https://cgit.FreeBSD.org/ports/commit/?id=7b1119cc4840b815e4d2cd2011a9206141546550
commit 7b1119cc4840b815e4d2cd2011a9206141546550
Author: Jose Alonso Cardenas Marquez <acm@FreeBSD.org>
AuthorDate: 2022-11-15 02:05:15 +0000
Commit: Jose Alonso Cardenas Marquez <acm@FreeBSD.org>
CommitDate: 2022-11-15 02:05:15 +0000
devel/dcd-*: Update to 0.13.6
---
devel/dcd-server/Makefile | 10 +++--
devel/dcd-server/distinfo | 6 +--
devel/dcd-server/files/patch-dub.json | 25 ++++++------
.../patch-src-dcd-server-autocomplete_complete.d | 46 ++++++++++++++++++++++
.../files/patch-src-dcd-server-autocomplete_doc.d | 23 +++++++++++
.../patch-src-dcd-server-autocomplete_localuse.d | 28 +++++++++++++
.../patch-src-dcd-server-autocomplete_symbols.d | 35 ++++++++++++++++
.../files/patch-src-dcd-server-autocomplete_util.d | 20 ++++++++++
devel/dcd-server/files/patch-src-dcd-server_main.d | 22 +++++++++++
9 files changed, 195 insertions(+), 20 deletions(-)
diff --git a/devel/dcd-server/Makefile b/devel/dcd-server/Makefile
index 124a9a920f96..cf0b9b044679 100644
--- a/devel/dcd-server/Makefile
+++ b/devel/dcd-server/Makefile
@@ -1,5 +1,5 @@
PORTNAME= dcd
-PORTVERSION= 0.11.0
+PORTVERSION= 0.13.6
DISTVERSIONPREFIX= v
PORTREVISION?= 0
CATEGORIES?= devel
@@ -30,14 +30,16 @@ DUB_CMD= ${LOCALBASE}/bin/dub build --build=release
DUB_CONFIG?= server
D_INCLUDE_DIR= ${PREFIX}/include/d
D_LIB_DIR= ${PREFIX}/lib/d
+DC= ${PREFIX}/bin/ldmd2
post-patch:
+ ${REINPLACE_CMD} '7d' ${WRKSRC}/common/dub.sdl
${REINPLACE_CMD} -e "s|%%LOCALBASE%%|${LOCALBASE}|g" ${WRKSRC}/dub.json
do-build:
- @cd ${WRKSRC} && ${DUB_CMD} --config=${DUB_CONFIG}
+ @cd ${WRKSRC} && DC=${DC} ${DUB_CMD} --config=${DUB_CONFIG}
.if ${PKGNAMESUFFIX} == "-server"
- @cd ${WRKSRC} && ${DUB_CMD} --config=library
+ @cd ${WRKSRC} && DC=${DC} ${DUB_CMD} --config=library
.endif
do-install:
@@ -49,7 +51,7 @@ do-install:
@${MKDIR} ${STAGEDIR}/${D_LIB_DIR}
@${INSTALL_DATA} ${WRKSRC}/libdcd.a ${STAGEDIR}${D_LIB_DIR}
@${MKDIR} ${STAGEDIR}/${D_INCLUDE_DIR}/common
- cd ${WRKSRC}/src/dcd/common && ${COPYTREE_SHARE} . ${STAGEDIR}${D_INCLUDE_DIR}/dcd/common "-name *\.d"
+ cd ${WRKSRC}/common/src/dcd/common && ${COPYTREE_SHARE} . ${STAGEDIR}${D_INCLUDE_DIR}/dcd/common "-name *\.d"
.endif
.include <bsd.port.mk>
diff --git a/devel/dcd-server/distinfo b/devel/dcd-server/distinfo
index 512b08e4f7ab..4e5bdcd56f67 100644
--- a/devel/dcd-server/distinfo
+++ b/devel/dcd-server/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1551853414
-SHA256 (dlang-community-DCD-v0.11.0_GH0.tar.gz) = b4b357409f37c96aadc5c2a34a5ee4a7d28fb1f61a2fb67ededa49aa83100fe9
-SIZE (dlang-community-DCD-v0.11.0_GH0.tar.gz) = 132185
+TIMESTAMP = 1668455203
+SHA256 (dlang-community-DCD-v0.13.6_GH0.tar.gz) = b4237b0489cb095cfd6cf5e22061086326eae057a3ff66244dc99bf61370db8b
+SIZE (dlang-community-DCD-v0.13.6_GH0.tar.gz) = 134053
diff --git a/devel/dcd-server/files/patch-dub.json b/devel/dcd-server/files/patch-dub.json
index ac2c3ad0b452..b38ed32ff98c 100644
--- a/devel/dcd-server/files/patch-dub.json
+++ b/devel/dcd-server/files/patch-dub.json
@@ -1,18 +1,17 @@
---- dub.json.orig 2019-02-10 20:32:05.000000000 +0000
-+++ dub.json 2019-03-06 06:24:55.670149000 +0000
-@@ -6,13 +6,8 @@
- "Brian Schott"
+--- dub.json 2021-07-16 11:10:51.000000000 -0500
++++ dub.json 2022-11-14 15:30:23.405796000 -0500
+@@ -7,12 +7,10 @@
],
"license": "GPL-3.0",
-- "dependencies": {
-- "dsymbol": "~>0.6.0",
-- "libdparse": "~>0.11.2",
-- "msgpack-d": "~>1.0.0-beta.7",
+ "dependencies": {
+- "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.11"
-- },
+- "emsi_containers": "~>0.8.0"
+ },
+ "libs": ["dsymbol","dparse","emsi_containers","msgpack-d","mir-core","stdx-allocator"],
+ "lflags": ["-L%%LOCALBASE%%/lib/d"],
- "stringImportPaths" : [
- "bin"
- ],
+ "subPackages": ["common"],
+ "versions": ["built_with_dub"],
+ "configurations": [
diff --git a/devel/dcd-server/files/patch-src-dcd-server-autocomplete_complete.d b/devel/dcd-server/files/patch-src-dcd-server-autocomplete_complete.d
new file mode 100644
index 000000000000..f670b46595b8
--- /dev/null
+++ b/devel/dcd-server/files/patch-src-dcd-server-autocomplete_complete.d
@@ -0,0 +1,46 @@
+--- src/dcd/server/autocomplete/complete.d 2022-11-14 15:33:10.423557000 -0500
++++ src/dcd/server/autocomplete/complete.d 2022-11-14 15:35:18.150747000 -0500
+@@ -21,6 +21,7 @@
+ import std.algorithm;
+ import std.array;
+ import std.conv;
++import std.experimental.allocator;
+ import std.experimental.logger;
+ import std.file;
+ import std.path;
+@@ -213,9 +214,9 @@
+ mixin(TYPE_IDENT_CASES);
+ case tok!")":
+ case tok!"]":
+- auto allocator = scoped!(ASTAllocator)();
++ scope allocator = new ASTAllocator();
+ RollbackAllocator rba;
+- ScopeSymbolPair pair = generateAutocompleteTrees(tokenArray, allocator,
++ ScopeSymbolPair pair = generateAutocompleteTrees(tokenArray, allocator.allocatorObject,
+ &rba, cursorPosition, moduleCache);
+ scope(exit) pair.destroy();
+ response.setCompletions(pair.scope_, getExpression(beforeTokens),
+@@ -229,9 +230,9 @@
+ case tok!";":
+ case tok!"}":
+ case tok!",":
+- auto allocator = scoped!(ASTAllocator)();
++ scope allocator = new ASTAllocator();
+ RollbackAllocator rba;
+- ScopeSymbolPair pair = generateAutocompleteTrees(tokenArray, allocator,
++ ScopeSymbolPair pair = generateAutocompleteTrees(tokenArray, allocator.allocatorObject,
+ &rba, 1, moduleCache);
+ scope(exit) pair.destroy();
+ response.setCompletions(pair.scope_, getExpression(beforeTokens),
+@@ -302,9 +303,9 @@
+ case tok!")":
+ case tok!"]":
+ mixin(STRING_LITERAL_CASES);
+- auto allocator = scoped!(ASTAllocator)();
++ scope allocator = new ASTAllocator();
+ RollbackAllocator rba;
+- ScopeSymbolPair pair = generateAutocompleteTrees(tokenArray, allocator,
++ ScopeSymbolPair pair = generateAutocompleteTrees(tokenArray, allocator.allocatorObject,
+ &rba, cursorPosition, moduleCache);
+ scope(exit) pair.destroy();
+ auto expression = getExpression(beforeTokens[0 .. $ - 1]);
diff --git a/devel/dcd-server/files/patch-src-dcd-server-autocomplete_doc.d b/devel/dcd-server/files/patch-src-dcd-server-autocomplete_doc.d
new file mode 100644
index 000000000000..2c11aa6161f6
--- /dev/null
+++ b/devel/dcd-server/files/patch-src-dcd-server-autocomplete_doc.d
@@ -0,0 +1,23 @@
+--- src/dcd/server/autocomplete/doc.d 2022-11-14 15:33:18.687809000 -0500
++++ src/dcd/server/autocomplete/doc.d 2022-11-14 15:36:55.838929000 -0500
+@@ -20,6 +20,7 @@
+
+ import std.algorithm;
+ import std.array;
++import std.experimental.allocator;
+ import std.experimental.logger;
+ import std.typecons;
+
+@@ -45,10 +46,10 @@
+ // trace("Getting doc comments");
+ AutocompleteResponse response;
+ RollbackAllocator rba;
+- auto allocator = scoped!(ASTAllocator)();
++ scope allocator = new ASTAllocator();
+ auto cache = StringCache(request.sourceCode.length.optimalBucketCount);
+ SymbolStuff stuff = getSymbolsForCompletion(request, CompletionType.ddoc,
+- allocator, &rba, cache, moduleCache);
++ allocator.allocatorObject, &rba, cache, moduleCache);
+ if (stuff.symbols.length == 0)
+ warning("Could not find symbol");
+ else
diff --git a/devel/dcd-server/files/patch-src-dcd-server-autocomplete_localuse.d b/devel/dcd-server/files/patch-src-dcd-server-autocomplete_localuse.d
new file mode 100644
index 000000000000..1ecdb95abc11
--- /dev/null
+++ b/devel/dcd-server/files/patch-src-dcd-server-autocomplete_localuse.d
@@ -0,0 +1,28 @@
+--- src/dcd/server/autocomplete/localuse.d 2022-11-14 15:33:24.333812000 -0500
++++ src/dcd/server/autocomplete/localuse.d 2022-11-14 15:38:33.174285000 -0500
+@@ -18,6 +18,7 @@
+
+ module dcd.server.autocomplete.localuse;
+
++import std.experimental.allocator;
+ import std.experimental.logger;
+ import std.range;
+ import std.typecons;
+@@ -45,7 +46,7 @@
+ {
+ AutocompleteResponse response;
+ RollbackAllocator rba;
+- auto allocator = scoped!(ASTAllocator)();
++ scope allocator = new ASTAllocator();
+ auto cache = StringCache(request.sourceCode.length.optimalBucketCount);
+
+ // patchs the original request for the subsequent requests
+@@ -60,7 +61,7 @@
+ {
+ auto sortedTokens = assumeSorted(tokenArray);
+ auto beforeTokens = sortedTokens.lowerBound(cursorPosition);
+- ScopeSymbolPair pair = generateAutocompleteTrees(tokenArray, allocator,
++ ScopeSymbolPair pair = generateAutocompleteTrees(tokenArray, allocator.allocatorObject,
+ &rba, request.cursorPosition, moduleCache);
+ auto expression = getExpression(beforeTokens);
+ return SymbolStuff(getSymbolsByTokenChain(pair.scope_, expression,
diff --git a/devel/dcd-server/files/patch-src-dcd-server-autocomplete_symbols.d b/devel/dcd-server/files/patch-src-dcd-server-autocomplete_symbols.d
new file mode 100644
index 000000000000..18806825a82a
--- /dev/null
+++ b/devel/dcd-server/files/patch-src-dcd-server-autocomplete_symbols.d
@@ -0,0 +1,35 @@
+--- src/dcd/server/autocomplete/symbols.d 2022-11-14 15:33:36.047717000 -0500
++++ src/dcd/server/autocomplete/symbols.d 2022-11-14 15:40:15.800529000 -0500
+@@ -18,6 +18,7 @@
+
+ module dcd.server.autocomplete.symbols;
+
++import std.experimental.allocator;
+ import std.experimental.logger;
+ import std.typecons;
+
+@@ -47,10 +48,10 @@
+ {
+ AutocompleteResponse response;
+ RollbackAllocator rba;
+- auto allocator = scoped!(ASTAllocator)();
++ scope allocator = new ASTAllocator();
+ auto cache = StringCache(request.sourceCode.length.optimalBucketCount);
+ SymbolStuff stuff = getSymbolsForCompletion(request,
+- CompletionType.location, allocator, &rba, cache, moduleCache);
++ CompletionType.location, allocator.allocatorObject, &rba, cache, moduleCache);
+ scope(exit) stuff.destroy();
+ if (stuff.symbols.length > 0)
+ {
+@@ -75,9 +76,9 @@
+ auto cache = StringCache(request.sourceCode.length.optimalBucketCount);
+ const(Token)[] tokenArray = getTokensForParser(cast(ubyte[]) request.sourceCode,
+ config, &cache);
+- auto allocator = scoped!(ASTAllocator)();
++ scope allocator = new ASTAllocator();
+ RollbackAllocator rba;
+- ScopeSymbolPair pair = generateAutocompleteTrees(tokenArray, allocator,
++ ScopeSymbolPair pair = generateAutocompleteTrees(tokenArray, allocator.allocatorObject,
+ &rba, request.cursorPosition, moduleCache);
+ scope(exit) pair.destroy();
+
diff --git a/devel/dcd-server/files/patch-src-dcd-server-autocomplete_util.d b/devel/dcd-server/files/patch-src-dcd-server-autocomplete_util.d
new file mode 100644
index 000000000000..67e24647b55e
--- /dev/null
+++ b/devel/dcd-server/files/patch-src-dcd-server-autocomplete_util.d
@@ -0,0 +1,20 @@
+--- src/dcd/server/autocomplete/util.d 2022-11-14 15:41:09.361709000 -0500
++++ src/dcd/server/autocomplete/util.d 2022-11-14 15:41:43.480412000 -0500
+@@ -19,7 +19,7 @@
+ module dcd.server.autocomplete.util;
+
+ import std.algorithm;
+-import stdx.allocator;
++import std.experimental.allocator;
+ import std.experimental.logger;
+ import std.range;
+ import std.string;
+@@ -134,7 +134,7 @@
+ * the request's source code, cursor position, and completion type.
+ */
+ SymbolStuff getSymbolsForCompletion(const AutocompleteRequest request,
+- const CompletionType type, IAllocator allocator, RollbackAllocator* rba,
++ const CompletionType type, RCIAllocator allocator, RollbackAllocator* rba,
+ ref StringCache cache, ref ModuleCache moduleCache)
+ {
+ const(Token)[] tokenArray;
diff --git a/devel/dcd-server/files/patch-src-dcd-server_main.d b/devel/dcd-server/files/patch-src-dcd-server_main.d
new file mode 100644
index 000000000000..1dde305a108d
--- /dev/null
+++ b/devel/dcd-server/files/patch-src-dcd-server_main.d
@@ -0,0 +1,22 @@
+--- src/dcd/server/main.d 2022-11-14 15:42:33.385930000 -0500
++++ src/dcd/server/main.d 2022-11-14 15:43:15.544622000 -0500
+@@ -24,8 +24,8 @@
+ import std.conv;
+ import std.datetime.stopwatch : AutoStart, StopWatch;
+ import std.exception : enforce;
+-import stdx.allocator;
+-import stdx.allocator.mallocator;
++import std.experimental.allocator;
++import std.experimental.allocator.mallocator;
+ import std.experimental.logger;
+ import std.file;
+ import std.getopt;
+@@ -176,7 +176,7 @@
+ info("Sockets shut down.");
+ }
+
+- ModuleCache cache = ModuleCache(new ASTAllocator);
++ ModuleCache cache = ModuleCache(new ASTAllocator().allocatorObject);
+ cache.addImportPaths(importPaths);
+ infof("Import directories:\n %-(%s\n %)", cache.getImportPaths());
+