Skip to content

Commit 9bb9fbf

Browse files
committed
add DustMite doc
update DParser to latest version
1 parent 48d9363 commit 9bb9fbf

File tree

5 files changed

+45
-4
lines changed

5 files changed

+45
-4
lines changed

doc/DustMite.dd

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
Ddoc
2+
3+
$(P Every now and then, you might run into a build problem that might look like a compiler issue.
4+
Your first step should be to search D's bug tracking system at $(LINK https://issues.dlang.org/).
5+
If that doesn't help you, you should consider filing a bug report yourself. This should
6+
include a reduced test case, so the people working on improving the compiler don't have
7+
to work through all your source code (if you can release it to the public to begin with).
8+
)
9+
10+
$(P Starting with dmd 2.065, the DMD installation comes with a tool called DustMite that can help you
11+
minimize your source code to create the reduced test case. Setting up the environment to run
12+
DustMite can be tedious, so Visual D can help you for some use cases.
13+
)
14+
15+
$(P If your build has failed with an unexpected error message or even internal compiler error, you
16+
can select the relevant error messsage in the Visual Studio build output window or focus the respective
17+
issue in the error list. Then select "DustMite Build Failure" from the Visual D menu. This will create
18+
a clean copy of the startup project alongside the project folder (so make sure that all files necessary
19+
for the build are actually referenced in the project). In addition the generated build script is added.
20+
)
21+
22+
$(P DustMite will be run against this folder in a new console window, trying to find a minimal source code that still
23+
reproduces the error message. For larger code bases this process can take several hours. On success
24+
it will report the directory with the reduced source code.)
25+
26+
$(H3 Limitations)
27+
28+
$(UL
29+
$(LI The DustMite integration does not work with single file compilation as well as compilation of non D files.)
30+
$(LI A crashing compiler might cause messages to popup that have to be closed manually. See
31+
$(LINK https://github.com/CyberShadow/DustMite/wiki/Useful-test-scripts) for some
32+
ideas how to deal with this.)
33+
)
34+
35+
You can read more about DustMite at $(LINK https://github.com/CyberShadow/DustMite/wiki).
36+
37+
Macros:
38+
TITLE=Reducing Build Failures with DustMite
39+

doc/build_doc.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ set SRC=%SRC% Features.dd
2323
set SRC=%SRC% VersionHistory.dd
2424
set SRC=%SRC% News36.dd
2525
set SRC=%SRC% CompileCommands.dd
26+
set SRC=%SRC% DustMite.dd
2627

2728
set DDOC=macros.ddoc html.ddoc visuald.ddoc dlang.org.ddoc
2829

vdc/abothe/comserver/VDServer.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ public void GetTip(string filename, int startLine, int startIndex, int endLine,
256256

257257
ISyntaxRegion sr = DResolver.GetScopedCodeObject(_editorData);
258258
LooseResolution.NodeResolutionAttempt attempt;
259-
var types = sr != null ? LooseResolution.ResolveTypeLoosely(_editorData, sr, out attempt) : null;
259+
var types = sr != null ? LooseResolution.ResolveTypeLoosely(_editorData, sr, out attempt, true) : null;
260260

261261
_tipText.Clear();
262262

@@ -400,7 +400,7 @@ public void GetDefinition(string filename, int startLine, int startIndex, int en
400400

401401
ISyntaxRegion sr = DResolver.GetScopedCodeObject(_editorData);
402402
LooseResolution.NodeResolutionAttempt attempt;
403-
var rr = sr != null ? LooseResolution.ResolveTypeLoosely(_editorData, sr, out attempt) : null;
403+
var rr = sr != null ? LooseResolution.ResolveTypeLoosely(_editorData, sr, out attempt, true) : null;
404404

405405
_tipText.Clear();
406406
if (rr != null)
@@ -454,7 +454,7 @@ public void GetReferences(string filename, string tok, uint line, uint idx, stri
454454

455455
ISyntaxRegion sr = DResolver.GetScopedCodeObject(_editorData);
456456
LooseResolution.NodeResolutionAttempt attempt;
457-
var rr = sr != null ? LooseResolution.ResolveTypeLoosely(_editorData, sr, out attempt) : null;
457+
var rr = sr != null ? LooseResolution.ResolveTypeLoosely(_editorData, sr, out attempt, true) : null;
458458

459459
StringBuilder refs = new StringBuilder();
460460
if (rr != null)

visuald_vs10.sln

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "doc", "doc", "{36148913-8F4
7575
doc\CppConversion.dd = doc\CppConversion.dd
7676
doc\Debugging.dd = doc\Debugging.dd
7777
doc\dlang.org.ddoc = doc\dlang.org.ddoc
78+
doc\DustMite.dd = doc\DustMite.dd
7879
doc\Editor.dd = doc\Editor.dd
7980
doc\Features.dd = doc\Features.dd
8081
doc\GlobalOptions.dd = doc\GlobalOptions.dd

0 commit comments

Comments
 (0)