Skip to content

Commit f2af919

Browse files
committed
Update assert_writeln_magic & dpl-docs to the latest libdparse
I noticed on the CI that this was throwing a lot of errors. Turns out it was using a libdparse from late 2017, which didn't knew about a lot of syntax changes, such as 'body' -> 'do', new contract syntax, extern(C++, string)... The two small changes required were introduced by: - dlang-community/libdparse@daa93a5#diff-277d73641e4843decd9c9a41c6c23046L820 - dlang-community/libdparse@e625d2b#diff-ad149e8970c93d472185f0fb76ffcaeaR86
1 parent 481e0bf commit f2af919

File tree

4 files changed

+21
-20
lines changed

4 files changed

+21
-20
lines changed

ddoc/dub.sdl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name "ddoc_preprocessor"
22
description "Preprocesses source code before running Ddoc over it"
3-
dependency "libdparse" version="~>0.8.7"
3+
dependency "libdparse" version="~>0.15.1"
44
dependency "dmd" path="../../dmd"
55
versions "DdocOptions"
66
buildRequirements "disallowDeprecations"

ddoc/dub.selections.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"fileVersion": 1,
33
"versions": {
44
"dmd": {"path":"../../dmd"},
5-
"libdparse": "0.8.7",
6-
"stdx-allocator": "2.77.2"
5+
"libdparse": "0.15.4",
6+
"stdx-allocator": "2.77.5"
77
}
88
}

ddoc/source/assert_writeln_magic.d

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env dub
22
/++ dub.sdl:
3-
dependency "libdparse" version="0.7.2-alpha.4"
3+
dependency "libdparse" version="0.15.1"
44
name "assert_writeln_magic"
55
+/
66
/*
@@ -76,7 +76,8 @@ class TestVisitor(Out) : ASTVisitor
7676
return;
7777

7878
// only look at `a == b` within the AssertExpression
79-
if (typeid(expr.assertion) != typeid(CmpExpression))
79+
if (!expr.assertArguments ||
80+
typeid(expr.assertArguments.assertion) != typeid(CmpExpression))
8081
return;
8182

8283
lastAssert = expr;
@@ -180,15 +181,15 @@ private:
180181
void parseString(Visitor)(ubyte[] sourceCode, Visitor visitor)
181182
{
182183
import dparse.lexer;
183-
import dparse.parser : parseModule;
184+
import dparse.parser : parseModule, ParserConfig;
184185
import dparse.rollback_allocator : RollbackAllocator;
185186

186187
LexerConfig config;
187188
auto cache = StringCache(StringCache.defaultBucketCount);
188189
const(Token)[] tokens = getTokensForParser(sourceCode, config, &cache).array;
189190

190191
RollbackAllocator rba;
191-
auto m = parseModule(tokens, "magic.d", &rba);
192+
auto m = parseModule(ParserConfig(tokens, "magic.d", &rba));
192193
visitor.visit(m);
193194
}
194195

dpl-docs/dub.selections.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
{
22
"fileVersion": 1,
33
"versions": {
4-
"botan": "1.12.10",
4+
"botan": "1.12.18",
55
"botan-math": "1.0.3",
66
"ddoc_preprocessor": {"path":"../ddoc"},
7-
"ddox": "0.16.11",
8-
"diet-ng": "1.5.0",
7+
"ddox": "0.16.15",
8+
"diet-ng": "1.7.2",
99
"dmd": {"path":"../../dmd"},
10-
"eventcore": "0.8.35",
11-
"hyphenate": "1.1.1",
12-
"libasync": "0.8.3",
13-
"libdparse": "0.8.7",
10+
"eventcore": "0.9.7",
11+
"hyphenate": "1.1.2",
12+
"libasync": "0.8.6",
13+
"libdparse": "0.15.4",
1414
"libevent": "2.0.2+2.0.16",
15-
"memutils": "0.4.11",
16-
"mir-linux-kernel": "1.0.0",
15+
"memutils": "1.0.4",
16+
"mir-linux-kernel": "1.0.1",
1717
"openssl": "1.1.6+1.0.1g",
18-
"stdx-allocator": "2.77.2",
19-
"taggedalgebraic": "0.10.11",
20-
"vibe-core": "1.4.0",
21-
"vibe-d": "0.8.4"
18+
"stdx-allocator": "2.77.5",
19+
"taggedalgebraic": "0.11.16",
20+
"vibe-core": "1.9.3",
21+
"vibe-d": "0.9.0"
2222
}
2323
}

0 commit comments

Comments
 (0)