Skip to content

Commit c655898

Browse files
committed
Merge pull request #51 from rainers/master
Visual D 0.3.43 beta2
2 parents af39002 + 97ecd69 commit c655898

File tree

12 files changed

+95
-46
lines changed

12 files changed

+95
-46
lines changed

CHANGES

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -765,15 +765,15 @@ unreleased Version 0.3.43
765765
* replaced ancient pkgcmd.ctc with pkgcmd.vsct that's buildable with newer VS SDKs
766766
* added icons to some commands
767767
* renamed command "Add Folder" in project folder context menu to "Add Filter"
768-
* added command "Add Package" to project folder context menu
768+
* added command "Add Folder" to project folder context menu that actually creates the folder on disk
769769
* renaming a module in the project tree now reopens it at the previous caret location
770770
* renaming a package in the project tree also renames the folder on disk if it is still empty
771771
* debug info: added option "suitable for selected debug engine"
772772
* the original semantic analysis engine is no longer installed, always using dparser now
773773
* LDC: recent versions build object files into intermediate folder, wrong names passed to linker
774774
with "separate compile and link"
775775
* moved defaults for resource includes and dmd executable paths from installation to extension init
776-
* fixed spurious "not implemented" error in error list
776+
* fixed spurious "not implemented" error in error list of VS 2015
777777
* fix dark theme detection in VS 2015
778778
* better semantic/colorizer support for versions LDC,CRuntime_Microsoft,CRuntime_DigitalMars and MinGW
779779
* tweaked default path and library settings for DMD and LDC
@@ -783,3 +783,8 @@ unreleased Version 0.3.43
783783
- scale some controls vertically if there is space
784784
- added browse buttons to path settings
785785
* search pane did not save its last state, only when switching between file and symbol search
786+
* fixed calling linker to build with VC runtime of VS2015: legacy_stdio_definitions.lib missing
787+
* bugzilla 12021: C++ projects (and others probably, too) might not load correctly in a solution
788+
that also contains a Visual D project
789+
* VS2015 linker updates logs and telemetry data files, confusing tracked linker dependencies.
790+
Now ignoring files that are both read and written.

TODO

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Project:
4040
- custom command: quotes in dependencies not supported
4141
- custom command: writes build batch to project folder
4242
- custom command: no output given => creates ".build.cmd"
43-
- single file commands: track dependencies
43+
- single file commands: track dependencies, also outputs
4444
- single file commands: multiple outputs
4545

4646
- VS2013: property pages don't follow resize

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
#define VERSION_MINOR 3
33
#define VERSION_REVISION 43
44
#define VERSION_BETA -beta
5-
#define VERSION_BUILD 1
5+
#define VERSION_BUILD 2

nsis/visuald.nsi

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,11 @@ Section "Visual Studio package" SecPackage
230230
${File} ..\visuald\Templates\ProjectItems\ConsoleDMDGDC\ ConsoleApp.vstemplate
231231
${File} ..\visuald\Templates\ProjectItems\ConsoleDMDGDC\ ConsoleApp.visualdproj
232232

233+
${SetOutPath} "$INSTDIR\Templates\ProjectItems\ConsoleDMDLDC"
234+
${File} ..\visuald\Templates\ProjectItems\ConsoleDMDLDC\ main.d
235+
${File} ..\visuald\Templates\ProjectItems\ConsoleDMDLDC\ ConsoleApp.vstemplate
236+
${File} ..\visuald\Templates\ProjectItems\ConsoleDMDLDC\ ConsoleApp.visualdproj
237+
233238
${SetOutPath} "$INSTDIR\Templates\ProjectItems\WindowsApp"
234239
${File} ..\visuald\Templates\ProjectItems\WindowsApp\ winmain.d
235240
${File} ..\visuald\Templates\ProjectItems\WindowsApp\ WindowsApp.vstemplate

stdext/stdext.visualdproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@
117117
<vtls>0</vtls>
118118
<vgc>0</vgc>
119119
<symdebug>0</symdebug>
120-
<optimize>0</optimize>
120+
<optimize>1</optimize>
121121
<cpu>0</cpu>
122122
<isX86_64>0</isX86_64>
123123
<isLinux>0</isLinux>
@@ -136,7 +136,7 @@
136136
<noboundscheck>0</noboundscheck>
137137
<useSwitchError>0</useSwitchError>
138138
<useUnitTests>0</useUnitTests>
139-
<useInline>0</useInline>
139+
<useInline>1</useInline>
140140
<release>1</release>
141141
<preservePaths>0</preservePaths>
142142
<warnings>0</warnings>

tools/pipedmd.d

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ int main(string[] argv)
9898
string command;
9999
string trackdir;
100100
string trackfile;
101+
string trackfilewr;
101102

102103
bool inject = false;
103104
if (depsfile.length > 0)
@@ -118,7 +119,7 @@ int main(string[] argv)
118119
if (trackdir != ".")
119120
command ~= " /if " ~ quoteArg(trackdir);
120121
trackfile = stripExtension(baseName(exe)) ~ ".read.*.tlog";
121-
string trackfilewr = stripExtension(baseName(exe)) ~ ".write.*.tlog";
122+
trackfilewr = stripExtension(baseName(exe)) ~ ".write.*.tlog";
122123
foreach(f; std.file.dirEntries(trackdir, std.file.SpanMode.shallow))
123124
if (globMatch(baseName(f), trackfile) || globMatch(baseName(f), trackfilewr))
124125
std.file.remove(f.name);
@@ -146,16 +147,38 @@ int main(string[] argv)
146147

147148
if (exitCode == 0 && trackfile.length > 0)
148149
{
149-
ubyte[] buf;
150+
// read read.*.tlog and remove all files found in write.*.log
151+
string rdbuf;
152+
string wrbuf;
150153
foreach(f; std.file.dirEntries(trackdir, std.file.SpanMode.shallow))
151-
if (globMatch(baseName(f), trackfile))
154+
{
155+
bool rd = globMatch(baseName(f), trackfile);
156+
bool wr = globMatch(baseName(f), trackfilewr);
157+
if (rd || wr)
152158
{
153159
ubyte[] fbuf = cast(ubyte[])std.file.read(f.name);
160+
string cbuf;
154161
// strip BOM from all but the first file
155-
if (buf.length && fbuf.length > 1 && fbuf[0] == 0xFF && fbuf[1] == 0xFE)
156-
fbuf = fbuf[2..$];
157-
buf ~= fbuf;
162+
if(fbuf.length > 1 && fbuf[0] == 0xFF && fbuf[1] == 0xFE)
163+
cbuf = to!(string)(cast(wstring)(fbuf[2..$]));
164+
else
165+
cbuf = cast(string)fbuf;
166+
if(rd)
167+
rdbuf ~= cbuf;
168+
else
169+
wrbuf ~= cbuf;
158170
}
171+
}
172+
string[] rdlines = splitLines(rdbuf, KeepTerminator.yes);
173+
string[] wrlines = splitLines(wrbuf, KeepTerminator.yes);
174+
bool[string] wrset;
175+
foreach(w; wrlines)
176+
wrset[w] = true;
177+
178+
string buf;
179+
foreach(r; rdlines)
180+
if(r !in wrset)
181+
buf ~= r;
159182

160183
std.file.write(depsfile, buf);
161184
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
..\ProjectItems\ConsoleApp\ConsoleApp.vstemplate|{002A2DE9-8BB6-484D-987F-7E4AD4084715}|Console Application|30|A project for creating a command-line application|0|#1000|0|ConsoleApp
22
..\ProjectItems\ConsoleDMDGDC\ConsoleApp.vstemplate|{002A2DE9-8BB6-484D-987F-7E4AD4084715}|Console Application DMD/GDC|30|A project for creating a command-line application with DMD/GDC for x86/x64|0|#1000|0|ConsoleApp
3+
..\ProjectItems\ConsoleDMDLDC\ConsoleApp.vstemplate|{002A2DE9-8BB6-484D-987F-7E4AD4084715}|Console Application DMD/LDC|30|A project for creating a command-line application with DMD/GDC for x86/x64|0|#1000|0|ConsoleApp
34
..\ProjectItems\WindowsApp\WindowsApp.vstemplate|{002A2DE9-8BB6-484D-987F-7E4AD4084715}|Windows Application|30|A project for creating a Windows application|0|#1000|0|WindowsApp
45
..\ProjectItems\DynamicLib\DynamicLib.vstemplate|{002A2DE9-8BB6-484D-987F-7E4AD4084715}|Dynamic Library (DLL)|30|A project for creating a dynamic library|0|#1000|0|DynamicLib
56
..\ProjectItems\StaticLib\StaticLib.vstemplate|{002A2DE9-8BB6-484D-987F-7E4AD4084715}|Static Library|30|A project for creating a static library|0|#1000|0|StaticLib

visuald/automation.d

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -577,6 +577,24 @@ class ExtProjectItems : DisposingDispatchObject, dte.ProjectItems
577577
return returnError(E_NOTIMPL);
578578
}
579579

580+
override int Invoke(/* [in] */ in DISPID dispIdMember,
581+
/* [in] */ in IID* riid,
582+
/* [in] */ in LCID lcid,
583+
/* [in] */ in WORD wFlags,
584+
/* [out][in] */ DISPPARAMS *pDispParams,
585+
/* [out] */ VARIANT *pVarResult,
586+
/* [out] */ EXCEPINFO *pExcepInfo,
587+
/* [out] */ UINT *puArgErr)
588+
{
589+
mixin(LogCallMix);
590+
if (dispIdMember == -4)
591+
{
592+
pVarResult.vt = VT_UNKNOWN;
593+
return _NewEnum(&pVarResult.punkVal);
594+
}
595+
return super.Invoke(dispIdMember, riid, lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
596+
}
597+
580598
ExtProject mExtProject;
581599
ExtProjectItems mParent;
582600
CHierNode mNode;
@@ -601,12 +619,11 @@ class ExtProperties : DisposingDispatchObject, dte.Properties
601619
{
602620
this(ExtProject prj)
603621
{
604-
mProject = addref(prj);
622+
mProject = prj;
605623
}
606624

607625
override void Dispose()
608626
{
609-
mProject = release(mProject);
610627
}
611628

612629
override HRESULT QueryInterface(in IID* riid, void** pvObject)
@@ -709,14 +726,13 @@ class ExtProperty(T) : DisposingDispatchObject, dte.Property
709726
{
710727
this(ExtProperties props, string name, T value)
711728
{
712-
mProperties = addref(props);
729+
mProperties = props;
713730
mName = name;
714731
mValue = value;
715732
}
716733

717734
override void Dispose()
718735
{
719-
mProperties = release(mProperties);
720736
}
721737

722738
override HRESULT QueryInterface(in IID* riid, void** pvObject)
@@ -884,12 +900,7 @@ class ExtProject : ExtProjectItem, dte.Project
884900
{
885901
super(this, null, prj.GetProjectNode());
886902
mProject = prj;
887-
mProperties = addref(newCom!ExtProperties(this));
888-
}
889-
890-
override void Dispose()
891-
{
892-
mProperties = release(mProperties);
903+
mProperties = newCom!ExtProperties(this);
893904
}
894905

895906
override HRESULT QueryInterface(in IID* riid, void** pvObject)
@@ -1168,12 +1179,12 @@ class ExtProject : ExtProjectItem, dte.Project
11681179
/* [retval][out] */ dte.ProjectItem *ppParentProjectItem)
11691180
{
11701181
mixin(LogCallMix);
1182+
*ppParentProjectItem = null;
11711183

11721184
IVsSolution srpSolution = queryService!(IVsSolution);
11731185
if(!srpSolution)
11741186
return returnError(E_FAIL);
11751187

1176-
*ppParentProjectItem = null;
11771188
int hr = E_UNEXPECTED;
11781189

11791190
IVsHierarchy pIVsHierarchy = mProject; // ->GetIVsHierarchy();

visuald/chiernode.d

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ class CHierNode : DisposingDispatchObject
8383

8484
override void Dispose()
8585
{
86-
m_extNode = release(m_extNode);
86+
//m_extNode = release(m_extNode);
8787
}
8888

8989
static void setContainerIsSorted(bool sort)
@@ -247,7 +247,7 @@ public:
247247
{
248248
pvar.vt = VT_DISPATCH;
249249
if(!m_extNode)
250-
m_extNode = addref(newCom!ExtProjectItem(null, null, this));
250+
m_extNode = /*addref*/(newCom!ExtProjectItem(null, null, this));
251251
pvar.pdispVal = addref(m_extNode);
252252
return S_OK;
253253
}

visuald/config.d

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -918,6 +918,10 @@ class ProjectOptions
918918
string[] libs = tokenizeArgs(libfiles);
919919
libs ~= "user32.lib";
920920
libs ~= "kernel32.lib";
921+
if(useMSVCRT())
922+
if(std.file.exists(Package.GetGlobalOptions().VCInstallDir ~ "lib\\legacy_stdio_definitions.lib"))
923+
libs ~= "legacy_stdio_definitions.lib";
924+
921925
cmd ~= plusList(lnkfiles ~ libs, ".lib", plus);
922926
string[] lpaths = tokenizeArgs(libpaths);
923927
if(useStdLibPath)

0 commit comments

Comments
 (0)