Skip to content

Commit 6957761

Browse files
committed
Merge pull request #44 from rainers/master
Visual D 0.3.42 beta1
2 parents 23efd5e + 3523674 commit 6957761

24 files changed

+431
-67
lines changed

CHANGES

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -698,7 +698,7 @@ Version history
698698
* object browser/symbol search: now filters out __unittest and __invariant symbols
699699
* cv2pdb: updated to 0.33 with better DWARF location support
700700

701-
unreleased Version 0.3.41
701+
2015-05-16 Version 0.3.41
702702

703703
* mago:
704704
- module list now shows x64 addresses correctly
@@ -727,3 +727,12 @@ unreleased Version 0.3.41
727727
* new command "Compile and Disassemble" to show the disassembly of the current file in
728728
the code context window that is automatically synchronized with editor movements
729729

730+
unreleased Version 0.3.42
731+
732+
* added new command "DustMite Build Failure" to reduce source of startup project
733+
for build error with DustMite
734+
* update "Build Phobos Browse Info" and "Build local version of phobos" for dmd 2.067+
735+
* cv2pdb:
736+
- last version introduced crashes with DWARF conversions
737+
- DWARF debug info now stripped from executable
738+
- support for mspdb140.dll from VS2015

VERSION

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#define VERSION_MAJOR 0
22
#define VERSION_MINOR 3
3-
#define VERSION_REVISION 41
4-
#define VERSION_BETA
5-
#define VERSION_BUILD 0
3+
#define VERSION_REVISION 42
4+
#define VERSION_BETA -beta
5+
#define VERSION_BUILD 1

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

doc/visuald.ddoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
VERSION = 0.3.40
1+
VERSION = 0.3.41
22
ROOT_DIR = http://www.dlang.org/
33
ROOT = .
44
BODYCLASS = doc

nsis/visuald.nsi

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
!define VS2010_REGISTRY_KEY SOFTWARE\Microsoft\VisualStudio\10.0
7575
!define VS2012_REGISTRY_KEY SOFTWARE\Microsoft\VisualStudio\11.0
7676
!define VS2013_REGISTRY_KEY SOFTWARE\Microsoft\VisualStudio\12.0
77-
!define VS2014_REGISTRY_KEY SOFTWARE\Microsoft\VisualStudio\14.0
77+
!define VS2015_REGISTRY_KEY SOFTWARE\Microsoft\VisualStudio\14.0
7878
!ifdef EXPRESS
7979
!define VCEXP2008_REGISTRY_KEY SOFTWARE\Microsoft\VCExpress\9.0
8080
!define VCEXP2010_REGISTRY_KEY SOFTWARE\Microsoft\VCExpress\10.0
@@ -348,14 +348,14 @@ ${MementoSection} "Register with VS 2013" SecVS2013
348348
${MementoSectionEnd}
349349

350350
;--------------------------------
351-
${MementoSection} "Register with VS 14" SecVS2014
351+
${MementoSection} "Register with VS 2015" SecVS2015
352352

353-
;ExecWait 'rundll32 "$INSTDIR\${DLLNAME}" RunDLLRegister ${VS2014_REGISTRY_KEY}'
354-
WriteRegStr ${VS_REGISTRY_ROOT} "${VS2014_REGISTRY_KEY}${VDSETTINGS_KEY}" "DMDInstallDir" $DMDInstallDir
355-
${RegisterWin32Exception} ${VS2014_REGISTRY_KEY} "Win32 Exceptions\D Exception"
353+
;ExecWait 'rundll32 "$INSTDIR\${DLLNAME}" RunDLLRegister ${VS2015_REGISTRY_KEY}'
354+
WriteRegStr ${VS_REGISTRY_ROOT} "${VS2015_REGISTRY_KEY}${VDSETTINGS_KEY}" "DMDInstallDir" $DMDInstallDir
355+
${RegisterWin32Exception} ${VS2015_REGISTRY_KEY} "Win32 Exceptions\D Exception"
356356

357-
ReadRegStr $1 ${VS_REGISTRY_ROOT} "${VS2014_REGISTRY_KEY}" InstallDir
358-
ExecWait 'rundll32 "$INSTDIR\${DLLNAME}" WritePackageDef ${VS2014_REGISTRY_KEY} $1${EXTENSION_DIR}\visuald.pkgdef'
357+
ReadRegStr $1 ${VS_REGISTRY_ROOT} "${VS2015_REGISTRY_KEY}" InstallDir
358+
ExecWait 'rundll32 "$INSTDIR\${DLLNAME}" WritePackageDef ${VS2015_REGISTRY_KEY} $1${EXTENSION_DIR}\visuald.pkgdef'
359359

360360
${SetOutPath} "$1${EXTENSION_DIR}"
361361
${File} ..\nsis\Extensions\ extension.vsixmanifest
@@ -433,8 +433,8 @@ ${MementoSection} "cv2pdb" SecCv2pdb
433433
Push ${VS2013_REGISTRY_KEY}
434434
Call PatchAutoExp
435435

436-
Push ${SecVS2014}
437-
Push ${VS2014_REGISTRY_KEY}
436+
Push ${SecVS2015}
437+
Push ${VS2015_REGISTRY_KEY}
438438
Call PatchAutoExp
439439

440440
${MementoSectionEnd}
@@ -481,8 +481,8 @@ ${MementoSection} "mago" SecMago
481481
Push ${VS2013_REGISTRY_KEY}
482482
Call RegisterMago
483483

484-
Push ${SecVS2014}
485-
Push ${VS2014_REGISTRY_KEY}
484+
Push ${SecVS2015}
485+
Push ${VS2015_REGISTRY_KEY}
486486
Call RegisterMago
487487

488488
WriteRegStr HKLM "SOFTWARE\Wow6432Node\MagoDebugger" "Remote_x64" "$INSTDIR\Mago\MagoRemote.exe"
@@ -523,7 +523,7 @@ SectionEnd
523523
LangString DESC_SecVS2010 ${LANG_ENGLISH} "Register for usage in Visual Studio 2010."
524524
LangString DESC_SecVS2012 ${LANG_ENGLISH} "Register for usage in Visual Studio 2012."
525525
LangString DESC_SecVS2013 ${LANG_ENGLISH} "Register for usage in Visual Studio 2013."
526-
LangString DESC_SecVS2014 ${LANG_ENGLISH} "Register for usage in Visual Studio 14."
526+
LangString DESC_SecVS2015 ${LANG_ENGLISH} "Register for usage in Visual Studio 2015."
527527
!ifdef EXPRESS
528528
LangString DESC_SecVCExpress2008 ${LANG_ENGLISH} "Register for usage in Visual C++ Express 2008 (experimental and unusable)."
529529
LangString DESC_SecVCExpress2010 ${LANG_ENGLISH} "Register for usage in Visual C++ Express 2010 (experimental and unusable)."
@@ -552,7 +552,7 @@ SectionEnd
552552
!insertmacro MUI_DESCRIPTION_TEXT ${SecVS2010} $(DESC_SecVS2010)
553553
!insertmacro MUI_DESCRIPTION_TEXT ${SecVS2012} $(DESC_SecVS2012)
554554
!insertmacro MUI_DESCRIPTION_TEXT ${SecVS2013} $(DESC_SecVS2013)
555-
!insertmacro MUI_DESCRIPTION_TEXT ${SecVS2014} $(DESC_SecVS2014)
555+
!insertmacro MUI_DESCRIPTION_TEXT ${SecVS2015} $(DESC_SecVS2015)
556556
!ifdef EXPRESS
557557
!insertmacro MUI_DESCRIPTION_TEXT ${SecVCExpress2008} $(DESC_SecVCExpress2008)
558558
!insertmacro MUI_DESCRIPTION_TEXT ${SecVCExpress2008} $(DESC_SecVCExpress2010)
@@ -582,18 +582,18 @@ Section "Uninstall"
582582
ExecWait 'rundll32 "$INSTDIR\${DLLNAME}" RunDLLUnregister ${VS2010_REGISTRY_KEY}'
583583
ExecWait 'rundll32 "$INSTDIR\${DLLNAME}" RunDLLUnregister ${VS2012_REGISTRY_KEY}'
584584
ExecWait 'rundll32 "$INSTDIR\${DLLNAME}" RunDLLUnregister ${VS2013_REGISTRY_KEY}'
585-
ExecWait 'rundll32 "$INSTDIR\${DLLNAME}" RunDLLUnregister ${VS2014_REGISTRY_KEY}'
585+
ExecWait 'rundll32 "$INSTDIR\${DLLNAME}" RunDLLUnregister ${VS2015_REGISTRY_KEY}'
586586
!ifdef EXPRESS
587587
ExecWait 'rundll32 "$INSTDIR\${DLLNAME}" RunDLLUnregister ${VCEXP2008_REGISTRY_KEY}'
588588
ExecWait 'rundll32 "$INSTDIR\${DLLNAME}" RunDLLUnregister ${VCEXP2010_REGISTRY_KEY}'
589589
!endif
590590

591-
ReadRegStr $1 ${VS_REGISTRY_ROOT} "${VS2014_REGISTRY_KEY}" InstallDir
592-
IfErrors NoVS2014pkgdef
591+
ReadRegStr $1 ${VS_REGISTRY_ROOT} "${VS2015_REGISTRY_KEY}" InstallDir
592+
IfErrors NoVS2015pkgdef
593593
RMDir /r '$1${EXTENSION_DIR}'
594594
RMDir '$1${EXTENSION_DIR_ROOT}\${APPNAME}'
595595
RMDir '$1${EXTENSION_DIR_ROOT}'
596-
NoVS2014pkgdef:
596+
NoVS2015pkgdef:
597597

598598
ReadRegStr $1 ${VS_REGISTRY_ROOT} "${VS2013_REGISTRY_KEY}" InstallDir
599599
IfErrors NoVS2013pkgdef
@@ -637,7 +637,7 @@ Section "Uninstall"
637637
Push ${VS2013_REGISTRY_KEY}
638638
Call un.PatchAutoExp
639639

640-
Push ${VS2014_REGISTRY_KEY}
640+
Push ${VS2015_REGISTRY_KEY}
641641
Call un.PatchAutoExp
642642
!endif
643643

@@ -649,7 +649,7 @@ Section "Uninstall"
649649
DeleteRegKey ${VS_REGISTRY_ROOT} "${VS2010_REGISTRY_KEY}\${WIN32_EXCEPTION_KEY}\Win32 Exceptions\D Exception"
650650
DeleteRegKey ${VS_REGISTRY_ROOT} "${VS2012_REGISTRY_KEY}\${WIN32_EXCEPTION_KEY}\Win32 Exceptions\D Exception"
651651
DeleteRegKey ${VS_REGISTRY_ROOT} "${VS2013_REGISTRY_KEY}\${WIN32_EXCEPTION_KEY}\Win32 Exceptions\D Exception"
652-
DeleteRegKey ${VS_REGISTRY_ROOT} "${VS2014_REGISTRY_KEY}\${WIN32_EXCEPTION_KEY}\Win32 Exceptions\D Exception"
652+
DeleteRegKey ${VS_REGISTRY_ROOT} "${VS2015_REGISTRY_KEY}\${WIN32_EXCEPTION_KEY}\Win32 Exceptions\D Exception"
653653

654654
!ifdef MAGO
655655
ExecWait 'regsvr32 /u /s "$INSTDIR\Mago\MagoNatDE.dll"'
@@ -662,7 +662,7 @@ Section "Uninstall"
662662
DeleteRegKey ${VS_REGISTRY_ROOT} "${VS2010_REGISTRY_KEY}\${MAGO_ENGINE_KEY}"
663663
DeleteRegKey ${VS_REGISTRY_ROOT} "${VS2012_REGISTRY_KEY}\${MAGO_ENGINE_KEY}"
664664
DeleteRegKey ${VS_REGISTRY_ROOT} "${VS2013_REGISTRY_KEY}\${MAGO_ENGINE_KEY}"
665-
DeleteRegKey ${VS_REGISTRY_ROOT} "${VS2014_REGISTRY_KEY}\${MAGO_ENGINE_KEY}"
665+
DeleteRegKey ${VS_REGISTRY_ROOT} "${VS2015_REGISTRY_KEY}\${MAGO_ENGINE_KEY}"
666666

667667
!ifdef VS_NET
668668
DeleteRegKey ${VS_REGISTRY_ROOT} "${VS_NET_REGISTRY_KEY}\${MAGO_EXCEPTION_KEY}"
@@ -672,7 +672,7 @@ Section "Uninstall"
672672
DeleteRegKey ${VS_REGISTRY_ROOT} "${VS2010_REGISTRY_KEY}\${MAGO_EXCEPTION_KEY}"
673673
DeleteRegKey ${VS_REGISTRY_ROOT} "${VS2012_REGISTRY_KEY}\${MAGO_EXCEPTION_KEY}"
674674
DeleteRegKey ${VS_REGISTRY_ROOT} "${VS2013_REGISTRY_KEY}\${MAGO_EXCEPTION_KEY}"
675-
DeleteRegKey ${VS_REGISTRY_ROOT} "${VS2014_REGISTRY_KEY}\${MAGO_EXCEPTION_KEY}"
675+
DeleteRegKey ${VS_REGISTRY_ROOT} "${VS2015_REGISTRY_KEY}\${MAGO_EXCEPTION_KEY}"
676676

677677
!ifdef VS_NET
678678
DeleteRegKey ${VS_REGISTRY_ROOT} "${VS_NET_REGISTRY_KEY}\InstalledProducts\Mago"
@@ -682,7 +682,7 @@ Section "Uninstall"
682682
DeleteRegKey ${VS_REGISTRY_ROOT} "${VS2010_REGISTRY_KEY}\InstalledProducts\Mago"
683683
DeleteRegKey ${VS_REGISTRY_ROOT} "${VS2012_REGISTRY_KEY}\InstalledProducts\Mago"
684684
DeleteRegKey ${VS_REGISTRY_ROOT} "${VS2013_REGISTRY_KEY}\InstalledProducts\Mago"
685-
DeleteRegKey ${VS_REGISTRY_ROOT} "${VS2014_REGISTRY_KEY}\InstalledProducts\Mago"
685+
DeleteRegKey ${VS_REGISTRY_ROOT} "${VS2015_REGISTRY_KEY}\InstalledProducts\Mago"
686686
!endif
687687

688688
Call un.RegisterVDServer
@@ -758,12 +758,12 @@ Function .onInit
758758
SectionSetFlags ${SecVS2013} ${SF_RO}
759759
Installed_VS2013:
760760

761-
; detect VS2014
761+
; detect VS2015
762762
ClearErrors
763-
ReadRegStr $1 ${VS_REGISTRY_ROOT} "${VS2014_REGISTRY_KEY}" InstallDir
764-
IfErrors 0 Installed_VS2014
765-
SectionSetFlags ${SecVS2014} ${SF_RO}
766-
Installed_VS2014:
763+
ReadRegStr $1 ${VS_REGISTRY_ROOT} "${VS2015_REGISTRY_KEY}" InstallDir
764+
IfErrors 0 Installed_VS2015
765+
SectionSetFlags ${SecVS2015} ${SF_RO}
766+
Installed_VS2015:
767767

768768
!ifdef EXPRESS
769769
; detect VCExpress 2008

stdext/path.d

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,3 +224,31 @@ unittest
224224
res = makeRelative(file, path);
225225
assert(res == file);
226226
}
227+
228+
string commonParentDir(string path1, string path2)
229+
{
230+
if (path1.length == 0 || path2.length == 0)
231+
return null;
232+
string p1 = toLower(normalizeDir(path1));
233+
string p2 = toLower(normalizeDir(path2));
234+
235+
while(p2.length)
236+
{
237+
if (p1.startsWith(p2))
238+
return path1[0 .. p2.length]; // preserve case
239+
string q2 = dirName(p2);
240+
q2 = normalizeDir(q2);
241+
if(q2 == p2)
242+
return null;
243+
p2 = q2;
244+
}
245+
return null;
246+
}
247+
248+
unittest
249+
{
250+
string path1 = "c:\\A\\bc\\def\\ghi.d";
251+
string path2 = "c:\\a/bc\\x";
252+
string res = commonParentDir(path1, path2);
253+
assert(res == "c:\\A\\bc\\");
254+
}

0 commit comments

Comments
 (0)