Skip to content

Commit 2139142

Browse files
authored
Merge pull request #122 from rainers/master
Visual D 0.51.0
2 parents 158eda0 + 6e2eede commit 2139142

33 files changed

+2034
-608
lines changed

CHANGES

Lines changed: 28 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1175,20 +1175,33 @@ Version history
11751175
* VS 2019 16.2: command line options no longer read correctly from the VC project for
11761176
Compile and Run/Debug/Disassemble, dbuild refactored to not rely on msbuild DLLs for that
11771177

1178-
unreleased Version 0.51.0
1179-
* Ctrl+Click goto definition added for VS2017+
1180-
* experimental: semantic server built from dmd frontend
1181-
* VS2017+: syntax highlighted tool tips
1178+
2020-01-18 Version 0.51.0
1179+
* installer:
1180+
- add sections for "Build Tools VS2017/2019"
1181+
- support more legacy Windows SDKs
1182+
- full installer now bundled with DMD 2.090 and LDC 1.19
1183+
* editor:
1184+
- added option to not show error squiggles and markers
1185+
- Ctrl+Click goto definition added for VS2017+
1186+
- VS2017+: syntax highlighted tool tips
1187+
- added tooltip to collapsed region
1188+
- fix function signature tool tips
1189+
- synchronize known version identifiers with dmd 2.090
1190+
* semantic server
1191+
- experimental: semantic server built from dmd frontend
1192+
- now creates server process per Visual Studio instance
1193+
- improve recovery after semantic server is restarted
1194+
- error list now filled with intellisense errors
1195+
* projects:
1196+
- visualdproj basic DUB support: upgrade and refresh if project contains dub.json or dub.sdl
1197+
- msbuild: pass original variable LinkToolExe to pipelink.exe through environment
1198+
- msbuild: fixed dependency project being marked as "unsuccessfully built" when detecting
1199+
D library requirements
1200+
- removed support for -gc (no longer supported since dmd 2.083)
11821201
* mago:
11831202
- new option "hide reference pointers"
1184-
- new option: "remove leading zeroes from hex values"
1185-
- fix crash expanding pointer to empty dynamic array
1186-
- large arrays: show growing index, fix omitting last element
1187-
* installer: add sections for "Build Tools VS2017/2019""
1188-
* dparser: now creates server process per Visual Studio instance
1189-
* added option to not show error squiggles and markers
1190-
* added tooltip to collapsed region
1191-
* fix function signature tool tips
1192-
* error list now filled with intellisense errors
1193-
* basic DUB support: upgrade and refresh if project contains dub.json or dub.sdl
1194-
* msbuild: pass original variable LinkToolExe to pipelink.exe through environment
1203+
- new option: "remove leading zeroes from hex values"
1204+
- fix crash expanding pointer to empty dynamic array
1205+
- large arrays: show growing index, fix omitting last element
1206+
- improve AA version detection, adapt to modified hash function
1207+
- VS2019 16.4: fix "Error" shown in tooltip for array elements beyond the actual size

VERSION

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

c2d/tokutil.d

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1172,10 +1172,10 @@ void regexReplacePPdefines(TokenList srctokens, string[string] defines)
11721172
endIt.retreat();
11731173
posttext = endIt.pretext ~ endIt.text ~ posttext;
11741174
}
1175-
string text = tokenListToString(tokIt + 2, endIt);
1175+
string toktext = tokenListToString(tokIt + 2, endIt);
11761176
string txt = s;
11771177
txt = replace(txt, "$id", ident);
1178-
txt = replace(txt, "$text", text);
1178+
txt = replace(txt, "$text", toktext);
11791179
it.pretext ~= tokIt.pretext;
11801180
it.text = txt ~ posttext;
11811181
it.type = Token.PPinsert;

c2d/vsi2d.visualdproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1002,7 +1002,7 @@
10021002
<useArrayBounds>0</useArrayBounds>
10031003
<boundscheck>0</boundscheck>
10041004
<useSwitchError>0</useSwitchError>
1005-
<useUnitTests>1</useUnitTests>
1005+
<useUnitTests>0</useUnitTests>
10061006
<useInline>0</useInline>
10071007
<release>0</release>
10081008
<preservePaths>0</preservePaths>

doc/StartPage.dd

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,13 @@ $(H2 News)
8484
$(P $(LINK2 VersionHistory.html, Full version history and complete details...)
8585
)
8686

87+
2020-18-01 Version 0.51.0
88+
$(UL
89+
$(LI experimental: semantic server built from DMD frontend)
90+
$(LI VS2017+: Ctrl+Click goto definition added)
91+
$(LI VS2017+: syntax highlighted tool tips)
92+
)
93+
8794
2019-09-03 Version 0.50.1
8895
$(UL
8996
$(LI Fixes some integration issues with VS 2019 16.2)
@@ -100,27 +107,6 @@ $(UL
100107
$(LI highlight references to symbol at caret)
101108
)
102109

103-
2019-04-28 Version 0.49.2
104-
$(UL
105-
$(LI VS2013/VS2015: VC projects broken in 0.49.1 due to unsupported msbuild variable)
106-
$(LI VS2015: workaround VS not correctly updating extension caches after uninstallation)
107-
)
108-
109-
2019-04-21 Version 0.49.1
110-
$(UL
111-
$(LI fixed reading settings from VC projects in VS2017)
112-
$(LI added support for VS2019 Update 16.1)
113-
$(LI dparser improvements and bug fixes)
114-
)
115-
116-
2019-04-07 Version 0.49.0
117-
$(UL
118-
$(LI support for Visual Studio 2019)
119-
$(LI parallel compilation supported by VC projects (thanks to Igor Cesi))
120-
$(LI catch up with recent language changes)
121-
$(LI new "Language" configuration page for -transition=/-preview=/-revert= options)
122-
)
123-
124110
$(LINK2 VersionHistory.html, more...)
125111

126112
$(H2 Download)

doc/VersionHistory.dd

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,47 @@
11
Ddoc
22

3+
$(H2 2020-01-18 Version 0.51.0)
4+
$(UL
5+
$(LI installer:
6+
$(UL
7+
$(LI add sections for "Build Tools VS2017/2019")
8+
$(LI support more legacy Windows SDKs)
9+
))
10+
$(LI editor:
11+
$(UL
12+
$(LI Ctrl+Click goto definition added for VS2017+)
13+
$(LI VS2017+: syntax highlighted tool tips)
14+
$(LI added tooltip to collapsed region)
15+
$(LI added option to not show error squiggles and markers)
16+
$(LI fix function signature tool tips)
17+
$(LI synchronize known version identifiers with dmd 2.090)
18+
))
19+
$(LI semantic server
20+
$(UL
21+
$(LI experimental: semantic server built from DMD frontend)
22+
$(LI now creates server process per Visual Studio instance)
23+
$(LI improve recovery after semantic server is restarted)
24+
$(LI error list now filled with intellisense errors)
25+
))
26+
$(LI projects:
27+
$(UL
28+
$(LI visualdproj basic DUB support: upgrade and refresh if project contains dub.json or dub.sdl)
29+
$(LI msbuild: pass original variable LinkToolExe to pipelink.exe through environment)
30+
$(LI msbuild: fixed dependency project being marked as "unsuccessfully built" when detecting
31+
D library requirements)
32+
$(LI removed support for -gc (no longer supported since dmd 2.083))
33+
))
34+
$(LI mago:
35+
$(UL
36+
$(LI new option "hide reference pointers")
37+
$(LI new option: "remove leading zeroes from hex values")
38+
$(LI fix crash expanding pointer to empty dynamic array)
39+
$(LI large arrays: show growing index, fix omitting last element)
40+
$(LI improve AA version detection, adapt to modified hash function)
41+
$(LI VS2019 16.4: fix "Error" shown in tooltip for array elements beyond the actual size)
42+
))
43+
)
44+
345
$(H2 2019-09-03 Version 0.50.1)
446
$(UL
547
$(LI installer:
@@ -32,7 +74,7 @@ $(H2 2019-09-03 Version 0.50.1)
3274
$(LI display of delegate type)
3375
$(LI support arbitrary return types)
3476
))
35-
$(LI fix showing UTF32 values (supported by dmd 2.089))
77+
$(LI fix showing UTF32 values (supported by dmd 2.089))
3678
$(LI fix reading enum values (not emitted before dmd 2.089))
3779
))
3880
)

doc/visuald.ddoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
VERSION = 0.50.1
2-
DMD_VERSION = 2.087.1
3-
LDC_VERSION = 1.17.0
1+
VERSION = 0.51.0
2+
DMD_VERSION = 2.090.0
3+
LDC_VERSION = 1.19.0
44
ROOT_DIR = https://www.dlang.org/
55
ROOT = https://www.dlang.org
66
BODYCLASS = visuald

msbuild/dbuild/CompileDOpt.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ public string DebugInfo
421421
string[][] switchMap = new string[3][]
422422
{
423423
new string[2] { "None", "" },
424-
new string[2] { "VS", "-gc" },
424+
new string[2] { "VS", "-g" }, // -gc removed, but kept for compatibility
425425
new string[2] { "Mago", "-g" }
426426
};
427427

msbuild/dbuild/VCProjectInterop.cs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ public partial class VisualCHelper : IVisualCHelper
4040
{
4141
///////////////////////////////////////////////////////////////////////
4242
static int ConfigureFlags(bool unittestOn, bool debugOn, bool x64, bool cov, bool doc, bool nobounds, bool gdc,
43-
int versionLevel, int debugLevel, bool noDeprecated, bool ldc, bool warnings)
43+
int versionLevel, int debugLevel, bool noDeprecated, bool deprecateInfo,
44+
bool ldc, bool warnings, bool warnAsError)
4445
{
4546
return (unittestOn ? 1 : 0)
4647
| (debugOn ? 2 : 0)
@@ -50,10 +51,12 @@ static int ConfigureFlags(bool unittestOn, bool debugOn, bool x64, bool cov, boo
5051
| (nobounds ? 32 : 0)
5152
| (gdc ? 64 : 0)
5253
| (noDeprecated ? 128 : 0)
54+
| (deprecateInfo ? 0x40000000 : 0)
5355
| ((versionLevel & 0xff) << 8)
5456
| ((debugLevel & 0xff) << 16)
5557
| (ldc ? 0x4000000 : 0)
56-
| (warnings ? 0x10000000 : 0);
58+
| (warnings ? 0x10000000 : 0)
59+
| (warnAsError ? 0x20000000 : 0);
5760
}
5861

5962

@@ -207,13 +210,16 @@ public void GetDCompileOptions(IVsHierarchy proj, uint itemid,
207210
bool cov = vcprop.GetEvaluatedPropertyValue("Coverage") == "true";
208211
bool doc = vcprop.GetEvaluatedPropertyValue("DocDir") != "" || vcprop.GetEvaluatedPropertyValue("DocFile") != "";
209212
bool nobounds = vcprop.GetEvaluatedPropertyValue("BoundsCheck") == "On";
210-
bool noDeprecated = vcprop.GetEvaluatedPropertyValue("Deprecations") == "Error";
213+
bool noDeprecated = vcprop.GetEvaluatedPropertyValue("Deprecations") != "Allow";
214+
bool deprecatedInfo = vcprop.GetEvaluatedPropertyValue("Deprecations") == "Info";
211215
bool warnings = vcprop.GetEvaluatedPropertyValue("Warnings") != "None";
216+
bool warnAsError = vcprop.GetEvaluatedPropertyValue("Warnings") == "Error";
212217
bool gdc = false;
213218
int versionLevel = 0;
214219
int debugLevel = 0;
215220
flags = (uint)ConfigureFlags(unittestOn, debugOn, x64, cov, doc, nobounds, gdc,
216-
versionLevel, debugLevel, noDeprecated, ldc, warnings);
221+
versionLevel, debugLevel, noDeprecated, deprecatedInfo,
222+
ldc, warnings, warnAsError);
217223
}
218224

219225

msbuild/dcompile.targets

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,18 @@
3838
</UsingTask>
3939

4040
<!-- remove disabled files from DCompile -->
41-
<Target Name="_collectDFiles"
42-
DependsOnTargets="_SelectedFiles">
43-
41+
<Target Name="_collectDFiles">
42+
43+
<ItemGroup>
44+
<dcompile_SelectedFiles Include="$(SelectedFiles)"/>
45+
</ItemGroup>
46+
4447
<ItemGroup Condition="'$(DCompiler)' == 'None'">
4548
<DCompile Remove="@(DCompile)" />
4649
</ItemGroup>
4750

48-
<ItemGroup Condition="'@(SelectedFiles)' != ''">
49-
<DCompile Remove="@(DCompile)" Condition="'%(Identity)' != '@(SelectedFiles)'" />
51+
<ItemGroup Condition="'@(dcompile_SelectedFiles)' != ''">
52+
<DCompile Remove="@(DCompile)" Condition="'%(Identity)' != '@(dcompile_SelectedFiles)'" />
5053
</ItemGroup>
5154

5255
<ItemGroup>
@@ -127,10 +130,10 @@
127130
BeforeTargets="$(DCompileBeforeTargets)"
128131
AfterTargets="$(DCompileAfterTargets)"
129132
Condition="'@(DCompile)' != '' and '$(DCompiler)' != 'None'"
130-
DependsOnTargets="_collectDFiles;_replacePackageName;_SelectedFiles">
133+
DependsOnTargets="_collectDFiles;_replacePackageName">
131134

132-
<ItemGroup Condition="'@(SelectedFiles)' != ''">
133-
<DCompile Remove="@(DCompile)" Condition="'%(Identity)' != '@(SelectedFiles)'" />
135+
<ItemGroup Condition="'@(dcompile_SelectedFiles)' != ''">
136+
<DCompile Remove="@(DCompile)" Condition="'%(Identity)' != '@(dcompile_SelectedFiles)'" />
134137
</ItemGroup>
135138

136139
<PropertyGroup>

0 commit comments

Comments
 (0)