Skip to content

Commit

Permalink
Merge pull request #140 from rainers/master
Browse files Browse the repository at this point in the history
Changes for Visual D 1.4.0-beta1
  • Loading branch information
rainers committed Mar 12, 2023
2 parents f182f4e + 58909d8 commit 11eb6a0
Show file tree
Hide file tree
Showing 32 changed files with 3,533 additions and 298 deletions.
10 changes: 9 additions & 1 deletion CHANGES
Expand Up @@ -1341,4 +1341,12 @@ Version history
* fixed building against WinSDK 10.0.22621.0
* fixed projects no longer considered failing
* D files in VC projects failed to build in VS 2022 17.3 and 17.4, added separate versions of
dbuild.17.x.dll linked respective Microsoft.Build.CPPTasks.Common.dll
dbuild.17.x.dll linked against respective version of Microsoft.Build.CPPTasks.Common.dll

2023-03-12 version 1.4.0
* dmdserver updated to frontend of DMD 2.103.0-beta1
* full installer now bundled with DMD 2.102.2 and LDC 1.31.0
* fixed issue 23734: avoid exception by std.file.isDir when clicking a project folder that doesn't exist
* added separate version of Microsoft.Build.CPPTasks.Common for VS 17.5.
* improved message when dmd crashes
* "add imports from dependent projects" is now evaluated recursively
5 changes: 4 additions & 1 deletion Makefile
Expand Up @@ -149,7 +149,10 @@ dbuild17_3:
dbuild17_4:
cd msbuild\dbuild && $(MSBUILD) dbuild.csproj /p:Configuration=Release-v17_4;Platform=AnyCPU /t:Rebuild

dbuild17_all: dbuild17 dbuild17_1 dbuild17_2 dbuild17_3 dbuild17_4
dbuild17_5:
cd msbuild\dbuild && $(MSBUILD) dbuild.csproj /p:Configuration=Release-v17_5;Platform=AnyCPU /t:Rebuild

dbuild17_all: dbuild17 dbuild17_1 dbuild17_2 dbuild17_3 dbuild17_4 dbuild17_5

mago:
cd ..\..\mago && devenv /Build "Release|Win32" /Project "MagoNatDE" magodbg_2010.sln
Expand Down
8 changes: 4 additions & 4 deletions VERSION
@@ -1,5 +1,5 @@
#define VERSION_MAJOR 1
#define VERSION_MINOR 3
#define VERSION_REVISION 1
#define VERSION_BETA
#define VERSION_BUILD 0
#define VERSION_MINOR 4
#define VERSION_REVISION 0
#define VERSION_BETA -beta
#define VERSION_BUILD 1
4 changes: 2 additions & 2 deletions c2d/pp.d
Expand Up @@ -1188,7 +1188,7 @@ L_C3: if(false) L_C2: {}
else if (c)
x = 3;
}
version(0) {
version(all) {
if(a)
x = 1;
else static if(COND)
Expand All @@ -1199,8 +1199,8 @@ version(0) {
if(c)
x = 3;

return x;
}
return x;
}

assert(fn!(true)(false, false, false) == 0);
Expand Down
2 changes: 1 addition & 1 deletion doc/Debugging.dd
Expand Up @@ -124,7 +124,7 @@ Please note that these specific exception settings only apply to the Mago debug
$(H2 Debugger Customization)

$(P Starting with Visual D 1.0 the display of structs and classes can be customized in the mago expression evaluator
for the Concord debugger engine (when using dmd as the copiler). This is done by enabling
for the Concord debugger engine (when using dmd as the compiler). This is done by enabling
"Call struct/class methods __debug[Overview|Expanded|Visualizer]" in the global mago Debugging options for mago
and adding some extra methods or fields to the declaration of the struct or class:)

Expand Down
4 changes: 2 additions & 2 deletions doc/Editor.dd
Expand Up @@ -98,8 +98,8 @@ $(UL
definitions for the identifier at the caret position, the $(VDLINK Search,Search Window) will show up.
)
$(LI Use Alexander Bothe's D parsing engine:
Use the semantic engine that also powers Mono-D and D-IDE. It is more powerful than the
engine that is part of Visual D. You must have installed it from within the Visual D installer.
Use the semantic engine that also powers Mono-D and D-IDE. It is a bit outdated, but runs on
a 32-bit machine. You must have installed it from within the Visual D installer.
)
)

Expand Down
15 changes: 1 addition & 14 deletions doc/Features.dd
Expand Up @@ -53,20 +53,7 @@ Ddoc
$(LI Dustmite integration)
)
)
$(LI Supported Visual Studio versions
$(UL
$(LI VS 2008)
$(LI VS 2010)
$(LI VS 2012)
$(LI VS 2013)
$(LI VS 2015)
)
Unfortunately, Express versions of Visual Studio do not support this kind of extensions.
But you can use the (integrated) Visual Studio Shell (download
$(LINK2 http://www.microsoft.com/downloads/details.aspx?FamilyID=40646580-97FA-4698-B65F-620D4B4B1ED7&displaylang=en, VS Shell 2008) or
$(LINK2 http://www.microsoft.com/downloads/details.aspx?FamilyID=8e5aa7b6-8436-43f0-b778-00c3bca733d3&displaylang=en, VS Shell 2010) or
$(LINK2 https://www.microsoft.com/en-us/download/details.aspx?id=30670, VS Shell 2012)), which is the Visual Studio IDE stripped of any
language support.
$(LI Supported Visual Studio versions: VS 2008 - VS 2022 Community/Professional/Enterprise
)
$(LI sources include tools to
$(UL
Expand Down
13 changes: 7 additions & 6 deletions doc/StartPage.dd
Expand Up @@ -85,6 +85,13 @@ $(H2 News)
$(P $(LINK2 VersionHistory.html, Full version history and complete details...)
)

2022-10-09 Version 1.3.1
$(UL
$(LI fixed memory leak in dmdserver)
$(LI fixed support VC-Project integration for VS 2022 17.3 and 17.4)
$(LI full installer now bundled with DMD 2.100.2 and LDC 1.30.0)
)

2022-06-05 Version 1.3.0
$(UL
$(LI dmdserver updated to frontend of DMD 2.100.0)
Expand All @@ -99,12 +106,6 @@ $(P $(LINK2 VersionHistory.html, Full version history and complete details...)
$(LI full installer now bundled with DMD 2.098.1 and LDC 1.28.1)
)

2021-04-28 Version 1.1.1
$(UL
$(LI semantic engine updated to frontend of DMD 2.096.1)
$(LI full installer now bundled with DMD 2.096.1 and LDC 1.25.1)
)

$(LINK2 VersionHistory.html, more...)

$(H2 Download)
Expand Down
12 changes: 11 additions & 1 deletion doc/VersionHistory.dd
@@ -1,5 +1,15 @@
Ddoc

$(H2 2022-09-10 Version 1.3.1)
$(UL
$(LI full installer now bundled with DMD 2.100.2 and LDC 1.30.0)
$(LI dmdserver: fixed memory leak)
$(LI fixed building against WinSDK 10.0.22621.0)
$(LI fixed projects no longer considered failing)
$(LI D files in VC projects failed to build in VS 2022 17.3 and 17.4, added separate versions of
dbuild.17.x.dll linked against respective versions of Microsoft.Build.CPPTasks.Common.dll)
)

$(H2 2022-06-05 Version 1.3.0)
$(UL
$(LI dmdserver updated to frontend of DMD 2.100.0)
Expand Down Expand Up @@ -167,7 +177,7 @@ $(H2 2020-03-23 Version 0.52.0)
$(UL
$(LI rebased to dmd 2.091.0-beta1)
$(LI all language options are now passed to the engine)
$(LI fixed a couple of crashes (often result in eternally reporting "Anaylzing..."))
$(LI fixed a couple of crashes (often result in eternally reporting "Analyzing..."))
$(LI terminate on fatal assertions and let Visual D restart the server)
$(LI improvements for code-completions)
$(LI bugzilla 20660: goto definition on import module doesn't work)
Expand Down
6 changes: 3 additions & 3 deletions doc/visuald.ddoc
@@ -1,6 +1,6 @@
VERSION = 1.3.0
DMD_VERSION = 2.100.0
LDC_VERSION = 1.29.0
VERSION = 1.3.1
DMD_VERSION = 2.100.2
LDC_VERSION = 1.30.0
ROOT_DIR = https://www.dlang.org/
ROOT = https://www.dlang.org
BODYCLASS = visuald
Expand Down
9 changes: 8 additions & 1 deletion msbuild/dbuild/CompileD.cs
Expand Up @@ -4,6 +4,7 @@
using System.Collections;
using System.Resources;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Text;
using System.IO;

Expand Down Expand Up @@ -313,11 +314,17 @@ protected static ushort GetPEArchitecture(string pFilePath)
return architecture;
}

[DllImport("Kernel32.dll")] static extern int GetACP();

protected override Encoding ResponseFileEncoding
{
get
{
return new UTF8Encoding(false);
// DMD assumes filenames encoded in system default Windows ANSI code page
if (Compiler == "LDC")
return new UTF8Encoding(false);
else
return System.Text.Encoding.GetEncoding(GetACP());
}
}

Expand Down
31 changes: 29 additions & 2 deletions msbuild/dbuild/dbuild.csproj
Expand Up @@ -203,6 +203,28 @@
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<TargetVer>17.4</TargetVer>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release-v17_5|AnyCPU'">
<OutputPath>bin\Release-v17_5\</OutputPath>
<DefineConstants>TRACE;TOOLS_V17</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<TargetVer>17.5</TargetVer>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug-v17_5|AnyCPU'">
<OutputPath>bin\Debug-v17_5\</OutputPath>
<DefineConstants>TRACE;DEBUG;TOOLS_V17</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Optimize>false</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<TargetVer>17.5</TargetVer>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
Expand Down Expand Up @@ -246,7 +268,7 @@
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<TargetFrameworkVersion Condition=" '$(TargetVer)' == '12.0' or '$(TargetVer)' == '14.0' ">v4.5.2</TargetFrameworkVersion>
<TargetFrameworkVersion Condition=" '$(TargetVer)' == '16.0' or '$(TargetVer)' == '16.1' ">v4.7.2</TargetFrameworkVersion>
<TargetFrameworkVersion Condition=" '$(TargetVer)' == '17.0' or '$(TargetVer)' == '17.1' or '$(TargetVer)' == '17.2' or '$(TargetVer)' == '17.3' or '$(TargetVer)' == '17.4' ">v4.7.2</TargetFrameworkVersion>
<TargetFrameworkVersion Condition=" '$(TargetVer)' == '17.0' or '$(TargetVer)' == '17.1' or '$(TargetVer)' == '17.2' or '$(TargetVer)' == '17.3' or '$(TargetVer)' == '17.4' or '$(TargetVer)' == '17.5' ">v4.7.2</TargetFrameworkVersion>
<GeneratePkgDefFile>false</GeneratePkgDefFile>
<IncludeAssemblyInVSIXContainer>false</IncludeAssemblyInVSIXContainer>
<IncludeDebugSymbolsInVSIXContainer>false</IncludeDebugSymbolsInVSIXContainer>
Expand Down Expand Up @@ -477,7 +499,7 @@
</Reference>
</ItemGroup>
<!-- VS2022 -->
<ItemGroup Condition="'$(TargetVer)' == '17.0' or '$(TargetVer)' == '17.1' or '$(TargetVer)' == '17.2' or '$(TargetVer)' == '17.3' or '$(TargetVer)' == '17.4'">
<ItemGroup Condition="'$(TargetVer)' == '17.0' or '$(TargetVer)' == '17.1' or '$(TargetVer)' == '17.2' or '$(TargetVer)' == '17.3' or '$(TargetVer)' == '17.4' or '$(TargetVer)' == '17.5' ">
<Reference Include="Microsoft.Build">
<HintPath>assemblies\v17\Microsoft.Build.dll</HintPath>
</Reference>
Expand Down Expand Up @@ -525,6 +547,11 @@
<HintPath>assemblies\v17_4\Microsoft.Build.CPPTasks.Common.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup Condition="'$(TargetVer)' == '17.5'">
<Reference Include="Microsoft.Build.CPPTasks.Common">
<HintPath>assemblies\v17_5\Microsoft.Build.CPPTasks.Common.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Strings.resx">
<SubType>Designer</SubType>
Expand Down
3 changes: 2 additions & 1 deletion msbuild/dcompile_defaults.props
Expand Up @@ -51,7 +51,8 @@
<DBuildVersion Condition="$(MSBuildVersion_Major) == 17 and $(MSBuildVersion_Minor) == 1">17.1</DBuildVersion>
<DBuildVersion Condition="$(MSBuildVersion_Major) == 17 and $(MSBuildVersion_Minor) == 2">17.2</DBuildVersion>
<DBuildVersion Condition="$(MSBuildVersion_Major) == 17 and $(MSBuildVersion_Minor) == 3">17.3</DBuildVersion>
<DBuildVersion Condition="$(MSBuildVersion_Major) == 17 and $(MSBuildVersion_Minor) &gt; 3">17.4</DBuildVersion>
<DBuildVersion Condition="$(MSBuildVersion_Major) == 17 and $(MSBuildVersion_Minor) == 4">17.4</DBuildVersion>
<DBuildVersion Condition="$(MSBuildVersion_Major) == 17 and $(MSBuildVersion_Minor) &gt; 4">17.5</DBuildVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(DBuildVersion)' == ''">
Expand Down
5 changes: 3 additions & 2 deletions nsis/visuald.nsi
Expand Up @@ -29,12 +29,12 @@

; define DMD source path to include dmd installation
; !define DMD
!define DMD_VERSION "2.100.2"
!define DMD_VERSION "2.102.2"
!define DMD_SRC c:\d\dmd-${DMD_VERSION}

; define LDC to include ldc installation
; !define LDC
!define LDC_VERSION "1.30.0"
!define LDC_VERSION "1.31.0"
!define LDC_SRC c:\d\ldc2-${LDC_VERSION}-windows-multilib

; define VS2019 to include VS2019 support
Expand Down Expand Up @@ -334,6 +334,7 @@ Section "Visual Studio package" SecPackage
${File} ..\msbuild\dbuild\obj\release-v17_2\ dbuild.17.2.dll
${File} ..\msbuild\dbuild\obj\release-v17_3\ dbuild.17.3.dll
${File} ..\msbuild\dbuild\obj\release-v17_4\ dbuild.17.4.dll
${File} ..\msbuild\dbuild\obj\release-v17_5\ dbuild.17.5.dll
!endif
WriteRegStr HKLM "Software\${APPNAME}" "msbuild" $INSTDIR\msbuild
!endif
Expand Down
1 change: 1 addition & 0 deletions sdk/port/microsoft/visualstudio/interop.d
@@ -0,0 +1 @@
module microsoft.visualstudio.interop;
1 change: 1 addition & 0 deletions stdext/stdext.visualdproj
Expand Up @@ -2014,5 +2014,6 @@
<File path="registry.d" />
<File path="string.d" />
<File path="util.d" />
<File path="xml.d" />
</Folder>
</DProject>
28 changes: 14 additions & 14 deletions stdext/string.d
Expand Up @@ -261,21 +261,21 @@ bool _startsWith(string s, string w)
//alias startsWith _startsWith;

// munch deprecated in phobos
inout(char)[] _munch(ref inout(char)[] s, const(char)[] pattern) @safe pure @nogc
{
size_t j = s.length;
foreach (i, dchar c; s)
{
if (pattern.indexOf(c) < 0)
{
j = i;
break;
}
inout(char)[] _munch(ref inout(char)[] s, const(char)[] pattern) @safe pure @nogc
{
size_t j = s.length;
foreach (i, dchar c; s)
{
if (pattern.indexOf(c) < 0)
{
j = i;
break;
}
}
auto head = s[0 .. j];
s = s[j .. $];
return head;
}
auto head = s[0 .. j];
s = s[j .. $];
return head;
}

bool parseLong(ref const(char)[] txt, out long res)
{
Expand Down

0 comments on commit 11eb6a0

Please sign in to comment.