Skip to content

Commit 2ae3f79

Browse files
authored
Merge pull request #106 from rainers/master
Changes for 0.48.1
2 parents 8ef5dd8 + 2a9e959 commit 2ae3f79

File tree

14 files changed

+169
-24
lines changed

14 files changed

+169
-24
lines changed

CHANGES

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -986,7 +986,7 @@ Version history
986986
* miscellaneous
987987
- Issue 18622: removed outdated information regarding link definition when generated by Visual D DLL project.
988988

989-
unreleased Version 0.48.0
989+
2018-12-02 Version 0.48.0
990990

991991
* installation
992992
- installer and binaries now digitally signed by the "D Language Foundation"
@@ -1055,3 +1055,19 @@ unreleased Version 0.48.0
10551055
- added option to not indent case statements
10561056
* fixed "Compile and Run" on selection
10571057
* fix help via F1 for dmd 2.072+
1058+
1059+
2018-12-22 Version 0.48.1
1060+
* dparser:
1061+
- fix Issue 19411: increase stack size for DParserCOMServer
1062+
- goto definition on alias: jump to base definition if caret on alias
1063+
* build system
1064+
- fix Issue 19445: Linking to lib under "c:\Program Files (x86)" does not work in Visual D
1065+
* dustmite
1066+
- fix copying project for dustmite with relative paths
1067+
- move command line options to new setup page, add dustmite command line options
1068+
* cv2pdb
1069+
- fix crash if mspdb*.dll cannot be loaded from path
1070+
- emit "elemtype[keytype]" instead of "dAssocArray"
1071+
- fix missing line numbers for new versions of mspdb (e.g. 14.16.27012/VS 15.9)
1072+
* mago: variables captured from stack of outer function not displayed in locals
1073+

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ vdserver:
5454

5555
dparser:
5656
cd vdc\abothe && $(MSBUILD15) vdserver.sln /p:Configuration=Release;Platform="Any CPU" /p:TargetFrameworkVersion=4.5 /p:DefineConstants=NET40 /t:Rebuild
57+
editbin /STACK:0x800000 bin\Release\DParserCOMServer\DParserCOMServer.exe
5758

5859
dparser_test:
5960
set PLATFORM="Any CPU" && dotnet test vdc\abothe\VDServer.sln -c Release

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#define VERSION_MAJOR 0
22
#define VERSION_MINOR 48
3-
#define VERSION_REVISION 0
3+
#define VERSION_REVISION 1
44
#define VERSION_BETA
55
#define VERSION_BUILD 0

doc/StartPage.dd

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,13 @@ $(H2 News)
5454
$(P $(LINK2 VersionHistory.html, Full version history and complete details...)
5555
)
5656

57+
2018-12-22 Version 0.48.1
58+
$(UL
59+
$(LI goto definition on alias: jump to base definition if caret on alias)
60+
$(LI cv2pdb: fix missing line numbers for new versions of mspdb*.dll)
61+
$(LI mago: variables captured from stack of outer function not displayed in locals)
62+
)
63+
5764
2018-12-02 Version 0.48.0
5865
$(UL
5966
$(LI installer and binaries now digitally signed by the "D Language Foundation")

doc/VersionHistory.dd

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,34 @@
11
Ddoc
22

3+
$(H2 2018-12-22 Version 0.48.1)
4+
$(UL
5+
$(LI dparser:
6+
$(UL
7+
$(LI fix Issue 19411: increase stack size for DParserCOMServer)
8+
$(LI goto definition on alias: jump to base definition if caret on alias)
9+
))
10+
$(LI build system
11+
$(UL
12+
$(LI fix Issue 19445: Linking to lib under "c:\Program Files (x86)" does not work in Visual D)
13+
))
14+
$(LI dustmite
15+
$(UL
16+
$(LI fix copying project for dustmite with relative paths)
17+
$(LI move command line options to new setup page, add dustmite command line options)
18+
))
19+
$(LI cv2pdb
20+
$(UL
21+
$(LI fix crash if mspdb*.dll cannot be loaded from path)
22+
$(LI emit "elemtype[keytype]" instead of "dAssocArray")
23+
$(LI fix missing line numbers for new versions of mspdb*.dll (e.g. 14.16.27012/VS 15.9))
24+
))
25+
$(LI mago
26+
$(UL
27+
$(LI variables captured from stack of outer function not displayed in locals)
28+
))
29+
)
30+
31+
332
$(H2 2018-12-02 Version 0.48.0)
433
$(UL
534
$(LI installation

vdc/abothe/comserver/CodeSemantics/SymbolDefinitionGenerator.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ protected override Tuple<CodeLocation, CodeLocation, string> Process(EditorData
2727
var definitionSourceFilename = new StringBuilder();
2828
if (rr != null)
2929
{
30+
var at = rr as AliasedType;
31+
if (at != null && at.Definition.Location == sr.Location)
32+
rr = at.Base;
3033
DNode n = null;
3134
foreach (var t in AmbiguousType.TryDissolve(rr))
3235
{

visuald/chiernode.d

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ class CHierNode : DisposingDispatchObject
6060
{
6161
static void shared_static_this()
6262
{
63-
gVsItemMap_sync = new Object;
63+
if (!gVsItemMap_sync)
64+
gVsItemMap_sync = new Object;
6465
}
6566

6667
this()

visuald/config.d

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -963,6 +963,7 @@ class ProjectOptions
963963
string s;
964964
foreach(i, file; lnkfiles)
965965
{
966+
file = unquoteArgument(file);
966967
if(toLower(extension(file)) != ext)
967968
continue;
968969
if(s.length > 0)

visuald/dpackage.d

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,8 @@ class Package : DisposingComObject,
407407
tpp = newCom!LdcDirPropertyPage(mOptions);
408408
else if(*rguidPage == g_DubPropertyPage)
409409
tpp = newCom!DubPropertyPage(mOptions);
410+
else if(*rguidPage == g_CmdLinePropertyPage)
411+
tpp = newCom!CmdLinePropertyPage(mOptions);
410412
else if(*rguidPage == g_ToolsProperty2Page)
411413
tpp = newCom!ToolsProperty2Page(mOptions);
412414
else if(*rguidPage == g_ColorizerPropertyPage)
@@ -1353,6 +1355,7 @@ class GlobalOptions
13531355
string compileAndRunOpts;
13541356
string compileAndDbgOpts;
13551357
int compileAndDbgEngine;
1358+
string dustmiteOpts;
13561359

13571360
string[] coverageBuildDirs;
13581361
string[] coverageExecutionDirs;
@@ -1837,6 +1840,7 @@ class GlobalOptions
18371840
compileAndRunOpts = getStringOpt("compileAndRunOpts", "-unittest");
18381841
compileAndDbgOpts = getStringOpt("compileAndDbgOpts", "-g");
18391842
compileAndDbgEngine = getIntOpt("compileAndDbgEngine", 0);
1843+
dustmiteOpts = getStringOpt("dustmiteOpts", "--strip-comments --split *.bat:lines");
18401844

18411845
dubPath = getStringOpt("dubPath", "dub");
18421846
dubOptions = getStringOpt("dubOptions", "");
@@ -1961,6 +1965,7 @@ class GlobalOptions
19611965
keyToolOpts.Set("compileAndRunOpts", toUTF16(compileAndRunOpts));
19621966
keyToolOpts.Set("compileAndDbgOpts", toUTF16(compileAndDbgOpts));
19631967
keyToolOpts.Set("compileAndDbgEngine", compileAndDbgEngine);
1968+
keyToolOpts.Set("dustmiteOpts", toUTF16(dustmiteOpts));
19641969

19651970
keyToolOpts.Set("coverageExecutionDirs", toUTF16(join(coverageExecutionDirs, ";")));
19661971
keyToolOpts.Set("coverageBuildDirs", toUTF16(join(coverageBuildDirs, ";")));

visuald/dproject.d

Lines changed: 44 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2798,7 +2798,7 @@ HRESULT DustMiteProject()
27982798
if (msgRet != IDYES)
27992799
return S_FALSE;
28002800

2801-
string workdir = cfg.GetProjectDir();
2801+
string workdir = normalizeDir(cfg.GetProjectDir());
28022802

28032803
auto pane = getVisualDOutputPane();
28042804
scope(exit) release(pane);
@@ -2822,7 +2822,9 @@ HRESULT DustMiteProject()
28222822
}
28232823
pane.OutputString(_toUTF16z("created clean copy of the project in " ~ dustmitepath ~ "\n"));
28242824

2825-
nworkdir = npath; // TODO
2825+
auto reldir = makeRelative(workdir, commonpath);
2826+
npath = makeDirnameCanonical(npath, null);
2827+
nworkdir = makeDirnameCanonical(reldir, npath);
28262828
string nintdir = makeFilenameAbsolute(cfg.GetIntermediateDir(), nworkdir);
28272829
string noutdir = makeFilenameAbsolute(cfg.GetOutDir(), nworkdir);
28282830
mkdirRecurse(nworkdir);
@@ -2833,7 +2835,7 @@ HRESULT DustMiteProject()
28332835
std.file.write(normalizeDir(noutdir) ~ "empty.txt", "");
28342836

28352837
if (nworkdir != npath)
2836-
cmdline ~= "cd " ~ quoteFilename(makeRelative(nworkdir, npath));
2838+
cmdline ~= "cd " ~ quoteFilename(makeRelative(nworkdir, npath)) ~ "\n";
28372839
cmdline ~= cfg.getCommandLine(true, true, false);
28382840
cmdfile = npath ~ "build.dustmite.bat";
28392841
std.file.write(cmdfile, cmdline);
@@ -2844,7 +2846,7 @@ HRESULT DustMiteProject()
28442846
string intdir = makeFilenameAbsolute(cfg.GetIntermediateDir(), workdir);
28452847
mkdirRecurse(intdir);
28462848
dustfile = intdir ~ "\\dustmite.cmd";
2847-
string opts = "--strip-comments --split *.bat:lines";
2849+
string opts = Package.GetGlobalOptions().dustmiteOpts;
28482850
cmd = Package.GetGlobalOptions().findDmdBinDir() ~ "dustmite " ~ opts ~ " " ~ quoteFilename(npath[0..$-1]) ~ " \"" ~ dustcmd ~ "\"";
28492851
std.file.write(dustfile, cmd ~ "\npause\n");
28502852
std.process.spawnShell(quoteFilename(dustfile), null, std.process.Config.none, nworkdir);
@@ -2876,3 +2878,41 @@ class DustMiteThread : CBuilderThread
28762878

28772879
string mBuildDir;
28782880
}
2881+
2882+
unittest
2883+
{
2884+
CHierNode.shared_static_this();
2885+
Package pkg = newCom!Package.addref();
2886+
scope(exit) pkg.release();
2887+
string tmpdir = normalizeDir(tempDir());
2888+
string projdir = tmpdir ~ "test/dustmite/project/";
2889+
string projfile = projdir ~ "project.vdproj";
2890+
string platform = "Win32", config = "Debug";
2891+
auto cfg = newCom!VCConfig(projfile, "test", platform, config);
2892+
2893+
Project prj = newCom!Project(Package.GetProjectFactory(), "test", projfile, platform, config);
2894+
2895+
mkdirRecurse(projdir);
2896+
string dfile1 = projdir ~ "dfile1.d";
2897+
std.file.write(dfile1, "// dfile1\n");
2898+
auto pFile1 = newCom!CFileNode("dfile1.d");
2899+
prj.GetRootNode().AddTail(pFile1);
2900+
2901+
mkdirRecurse(tmpdir ~ "test/dustmite/other");
2902+
string dfile2 = tmpdir ~ "test/dustmite/other/dfile2.d";
2903+
std.file.write(dfile2, "// dfile2\n");
2904+
auto pFile2 = newCom!CFileNode("../other/dfile2.d");
2905+
prj.GetRootNode().AddTail(pFile2);
2906+
2907+
string commonpath = commonProjectFolder(prj);
2908+
string dustmitepath = buildPath(dirName(commonpath), baseName(commonpath) ~ ".dustmite");
2909+
assert(dustmitepath == tmpdir ~ r"test\dustmite.dustmite");
2910+
if (std.file.exists(dustmitepath))
2911+
rmdirRecurse(dustmitepath);
2912+
2913+
string npath = copyProjectFolder(prj, dustmitepath);
2914+
assert(npath == normalizeDir(dustmitepath));
2915+
2916+
assert(std.file.exists(dustmitepath ~ r"\project\dfile1.d"));
2917+
assert(std.file.exists(dustmitepath ~ r"\other\dfile2.d"));
2918+
}

0 commit comments

Comments
 (0)