diff --git a/CHANGES b/CHANGES index 4c4156ef..f66293a8 100644 --- a/CHANGES +++ b/CHANGES @@ -1071,7 +1071,7 @@ Version history - fix missing line numbers for new versions of mspdb (e.g. 14.16.27012/VS 15.9) * mago: variables captured from stack of outer function not displayed in locals -unreleased 0.49.0 +2019-04-07 Version 0.49.0 * installation - prepare for VS2019: detect installation, build against VS 2019 SDK, Win SDK 10.0.17763.0 - bugzilla 19690: installer fails to register MSBuild extensions for Visual Studio Build Tools @@ -1098,3 +1098,15 @@ unreleased 0.49.0 * editor - tweaked default colors to better work with dark mode (restart VS and Visual D twice after switch between light and dark modes) + +2019-04-21 Version 0.49.1 + * fixed reading settings from VC projects in VS2017 + * fixed determining versions from dmd versions no longer supporting -gc + * fixed reading import path from newer LDC versions + * added support for VS2019 Update 16.1 + * dparser: + - jump to original definition if it is not renamed or the caret is on the import + - fixed import lookup if module name is also a package + - fixed stack overflows with static foreach + - fixed infinite loop for cyclic base classes + - fixed more crashes during semantic highlighting diff --git a/Makefile b/Makefile index 4eba2784..66ea53ab 100644 --- a/Makefile +++ b/Makefile @@ -107,6 +107,9 @@ fake_dbuild15: dbuild16: cd msbuild\dbuild && devenv /Build "Release-v16|AnyCPU" /Project "dbuild" dbuild.sln +dbuild16_1: + cd msbuild\dbuild && devenv /Build "Release-v16_1|AnyCPU" /Project "dbuild" dbuild.sln + mago: cd ..\..\mago && devenv /Build "Release|Win32" /Project "MagoNatDE" magodbg_2010.sln diff --git a/VERSION b/VERSION index fa41b9b4..41c8a32b 100644 --- a/VERSION +++ b/VERSION @@ -1,5 +1,5 @@ #define VERSION_MAJOR 0 #define VERSION_MINOR 49 -#define VERSION_REVISION 0 +#define VERSION_REVISION 1 #define VERSION_BETA #define VERSION_BUILD 0 diff --git a/appveyor.yml b/appveyor.yml index 1c3125d2..77779a32 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -21,9 +21,9 @@ environment: - os: Visual Studio 2015 VS: 14 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 - - os: Visual Studio 2013 - VS: 12 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 +# - os: Visual Studio 2013 +# VS: 12 +# APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 # cache relative to C:\projects\visuald cache: diff --git a/doc/StartPage.dd b/doc/StartPage.dd index 783810d9..a27eb510 100644 --- a/doc/StartPage.dd +++ b/doc/StartPage.dd @@ -54,6 +54,13 @@ $(H2 News) $(P $(LINK2 VersionHistory.html, Full version history and complete details...) ) +2019-04-21 Version 0.49.1 +$(UL + $(LI fixed reading settings from VC projects in VS2017) + $(LI added support for VS2019 Update 16.1) + $(LI dparser improvements and bug fixes) +) + 2019-04-07 Version 0.49.0 $(UL $(LI support for Visual Studio 2019) diff --git a/doc/VersionHistory.dd b/doc/VersionHistory.dd index 94df6309..6c7d8f66 100644 --- a/doc/VersionHistory.dd +++ b/doc/VersionHistory.dd @@ -1,5 +1,21 @@ Ddoc +$(H2 2019-04-21 Version 0.49.1) + $(UL + $(LI fixed reading settings from VC projects in VS2017) + $(LI fixed determining versions from dmd versions no longer supporting -gc) + $(LI fixed reading import path from newer LDC versions) + $(LI added support for VS2019 Update 16.1) + $(LI dparser: + $(UL + $(LI jump to original definition if it is not renamed or the caret is on the import) + $(LI fixed import lookup if module name is also a package) + $(LI fixed stack overflows with static foreach) + $(LI fixed infinite loop for cyclic base classes) + $(LI fixed more crashes during semantic highlighting) + )) + ) + $(H2 2019-04-07 Version 0.49.0) $(UL $(LI installation diff --git a/msbuild/ImportAfter/general_d.targets b/msbuild/ImportAfter/general_d.targets index e216c7d7..c3471295 100644 --- a/msbuild/ImportAfter/general_d.targets +++ b/msbuild/ImportAfter/general_d.targets @@ -2,7 +2,7 @@ - + Project diff --git a/msbuild/ImportBefore/Default/d.props b/msbuild/ImportBefore/Default/d.props index 4f56e392..7da03963 100644 --- a/msbuild/ImportBefore/Default/d.props +++ b/msbuild/ImportBefore/Default/d.props @@ -2,12 +2,16 @@ - $(registry:HKEY_LOCAL_MACHINE\SOFTWARE\VisualD@msbuild) - $(registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\VisualD@msbuild) + $(registry:HKEY_LOCAL_MACHINE\SOFTWARE\VisualD@msbuild) + $(registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\VisualD@msbuild) - - $(MsBuildToolsVersion) - 16.0 + + $([System.String]::Copy('$(MSBuildVersion)').Split(['.'])[0]) + $([System.String]::Copy('$(MSBuildVersion)').Split(['.'])[1]) + $([System.String]::Copy('$(MSBuildVersion)').Split(['.'])[2]) + $(MSBuildVersion_Major).0 + 16.0 + 16.1 diff --git a/msbuild/dbuild/dbuild.csproj b/msbuild/dbuild/dbuild.csproj index d8b52aa3..6e42609d 100644 --- a/msbuild/dbuild/dbuild.csproj +++ b/msbuild/dbuild/dbuild.csproj @@ -14,6 +14,7 @@ AnyCPU prompt MinimumRecommendedRules.ruleset + 14.0 bin\Debug-v14\ @@ -24,6 +25,7 @@ AnyCPU prompt MinimumRecommendedRules.ruleset + 14.0 bin\Release-v15\ @@ -34,6 +36,7 @@ AnyCPU prompt MinimumRecommendedRules.ruleset + 15.0 bin\Debug-v15\ @@ -44,6 +47,7 @@ AnyCPU prompt MinimumRecommendedRules.ruleset + 15.0 bin\Release-v16\ @@ -54,6 +58,7 @@ AnyCPU prompt MinimumRecommendedRules.ruleset + 16.0 bin\Debug-v16\ @@ -64,31 +69,29 @@ AnyCPU prompt MinimumRecommendedRules.ruleset + 16.0 - - dbuild.12.0 + + bin\Release-v16_1\ + TRACE;TOOLS_V15 + true + true + pdbonly + AnyCPU + prompt + MinimumRecommendedRules.ruleset + 16.1 - - - Debug - AnyCPU - 2.0 - {45508B90-440B-46DD-82CC-178196D9794E} - Library - Properties - dbuild - dbuild.12.0 - dbuild.14.0 - dbuild.15.0 - dbuild.16.0 - v4.6 - v4.7.2 - false - false - false - false - false - false + + bin\Debug-v16_1\ + TRACE;DEBUG;TOOLS_V15 + true + false + pdbonly + AnyCPU + prompt + MinimumRecommendedRules.ruleset + 16.1 true @@ -102,7 +105,7 @@ False false AnyCPU - c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\ + 12.0 pdbonly @@ -114,6 +117,29 @@ False False true + 12.0 + + + 12.0 + dbuild.$(TargetVer) + + + + Debug + AnyCPU + 2.0 + {45508B90-440B-46DD-82CC-178196D9794E} + Library + Properties + dbuild + v4.6 + v4.7.2 + false + false + false + false + false + false @@ -135,7 +161,7 @@ - + False False @@ -165,7 +191,7 @@ assemblies\v12\Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.dll - + False False @@ -207,7 +233,7 @@ - + False @@ -240,7 +266,7 @@ c:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.VisualStudio.Project.VisualC.VCProjectEngine\v4.0_14.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.dll - + False @@ -282,11 +308,12 @@ + Local Community Professional Preview - + assemblies\v15\Microsoft.Build.dll @@ -307,31 +334,31 @@ False + assemblies\v15\Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.dll c:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\VC\Project\Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.dll c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\VC\Project\Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.dll False False + assemblies\v15\Microsoft.VisualStudio.VCProject.dll c:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\PublicAssemblies\Microsoft.VisualStudio.VCProject.dll c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\PublicAssemblies\Microsoft.VisualStudio.VCProject.dll False False + assemblies\v15\Microsoft.VisualStudio.VCProjectEngine.dll c:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\PublicAssemblies\Microsoft.VisualStudio.VCProjectEngine.dll c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\PublicAssemblies\Microsoft.VisualStudio.VCProjectEngine.dll - + assemblies\v16\Microsoft.Build.dll - - assemblies\v16\Microsoft.Build.CPPTasks.Common.dll - assemblies\v16\Microsoft.Build.Framework.dll @@ -354,6 +381,18 @@ assemblies\v16\Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.dll + + + + assemblies\v16\Microsoft.Build.CPPTasks.Common.dll + + + + + assemblies\v16_1\Microsoft.Build.CPPTasks.Common.dll + + + Designer diff --git a/msbuild/dbuild/dbuild.sln b/msbuild/dbuild/dbuild.sln index 530b4f86..d99e23b0 100644 --- a/msbuild/dbuild/dbuild.sln +++ b/msbuild/dbuild/dbuild.sln @@ -11,10 +11,12 @@ Global Debug-v14|Any CPU = Debug-v14|Any CPU Debug-v15|Any CPU = Debug-v15|Any CPU Debug-v16|Any CPU = Debug-v16|Any CPU + Debug-v16_1|Any CPU = Debug-v16_1|Any CPU Release|Any CPU = Release|Any CPU Release-v14|Any CPU = Release-v14|Any CPU Release-v15|Any CPU = Release-v15|Any CPU Release-v16|Any CPU = Release-v16|Any CPU + Release-v16_1|Any CPU = Release-v16_1|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {45508B90-440B-46DD-82CC-178196D9794E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU @@ -25,6 +27,8 @@ Global {45508B90-440B-46DD-82CC-178196D9794E}.Debug-v15|Any CPU.Build.0 = Debug-v15|Any CPU {45508B90-440B-46DD-82CC-178196D9794E}.Debug-v16|Any CPU.ActiveCfg = Debug-v16|Any CPU {45508B90-440B-46DD-82CC-178196D9794E}.Debug-v16|Any CPU.Build.0 = Debug-v16|Any CPU + {45508B90-440B-46DD-82CC-178196D9794E}.Debug-v16_1|Any CPU.ActiveCfg = Debug-v16_1|Any CPU + {45508B90-440B-46DD-82CC-178196D9794E}.Debug-v16_1|Any CPU.Build.0 = Debug-v16_1|Any CPU {45508B90-440B-46DD-82CC-178196D9794E}.Release|Any CPU.ActiveCfg = Release|Any CPU {45508B90-440B-46DD-82CC-178196D9794E}.Release|Any CPU.Build.0 = Release|Any CPU {45508B90-440B-46DD-82CC-178196D9794E}.Release-v14|Any CPU.ActiveCfg = Release-v14|Any CPU @@ -33,6 +37,8 @@ Global {45508B90-440B-46DD-82CC-178196D9794E}.Release-v15|Any CPU.Build.0 = Release-v15|Any CPU {45508B90-440B-46DD-82CC-178196D9794E}.Release-v16|Any CPU.ActiveCfg = Release-v16|Any CPU {45508B90-440B-46DD-82CC-178196D9794E}.Release-v16|Any CPU.Build.0 = Release-v16|Any CPU + {45508B90-440B-46DD-82CC-178196D9794E}.Release-v16_1|Any CPU.ActiveCfg = Release-v16_1|Any CPU + {45508B90-440B-46DD-82CC-178196D9794E}.Release-v16_1|Any CPU.Build.0 = Release-v16_1|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/nsis/visuald.nsi b/nsis/visuald.nsi index 4dd9ae24..349dc770 100644 --- a/nsis/visuald.nsi +++ b/nsis/visuald.nsi @@ -266,6 +266,7 @@ Section "Visual Studio package" SecPackage ${File} ..\msbuild\dbuild\obj\release-v15\ dbuild.15.0.dll !ifdef VS2019 ${File} ..\msbuild\dbuild\obj\release-v16\ dbuild.16.0.dll + ${File} ..\msbuild\dbuild\obj\release-v16_1\ dbuild.16.1.dll !endif WriteRegStr HKLM "Software\${APPNAME}" "msbuild" $INSTDIR\msbuild !endif diff --git a/stdext/libconfig.d b/stdext/libconfig.d index da37b874..c359b207 100644 --- a/stdext/libconfig.d +++ b/stdext/libconfig.d @@ -175,7 +175,7 @@ EBNF grammar. It is a subset of the libconfig grammar (http://www.hyperrealm.com/libconfig). config = { ows , setting } , ows ; -setting = name , (":" | "=") , value , [";" | ","] ; +setting = (name | string) , (":" | "=") , value , [";" | ","] ; name = alpha , { alpha | digit | "_" | "-" } ; value = string | array | group ; array = "[" , ows , @@ -484,14 +484,20 @@ struct Parser Setting parseSetting() { - immutable name = accept(Token.name); + string name; + auto t = getTok(name); + if (t != Token.name && t != Token.str) + { + unexpectedTokenError(t, Token.name, name); + assert(false); + } accept(Token.assign); Setting res = parseValue(name); string s; - immutable t = getTok(s); + t = getTok(s); if (t != Token.semicolon && t != Token.comma) { ungetTok(t, s); @@ -606,25 +612,25 @@ unittest `// comment // comment -group-1: {}; +group-1_2: {}; // comment -Group-2: +"86(_64)?-.*linux\\.?": { // comment scalar = "abc"; // comment - Array_1 = [ "a" ]; + Array_1-2 = [ "a" ]; }; `; auto settings = Parser(input).parseConfig(); assert(settings.length == 2); - assert(settings[0].name == "group-1"); + assert(settings[0].name == "group-1_2"); assert(settings[0].type == Setting.Type.group); assert((cast(GroupSetting) settings[0]).children == []); - assert(settings[1].name == "Group-2"); + assert(settings[1].name == "86(_64)?-.*linux\\.?"); assert(settings[1].type == Setting.Type.group); auto group2 = cast(GroupSetting) settings[1]; assert(group2.children.length == 2); @@ -633,7 +639,7 @@ Group-2: assert(group2.children[0].type == Setting.Type.scalar); assert((cast(ScalarSetting) group2.children[0]).val == "abc"); - assert(group2.children[1].name == "Array_1"); + assert(group2.children[1].name == "Array_1-2"); assert(group2.children[1].type == Setting.Type.array); assert((cast(ArraySetting) group2.children[1]).vals == [ "a" ]); } diff --git a/vdc/abothe/comserver/CodeSemantics/SymbolDefinitionGenerator.cs b/vdc/abothe/comserver/CodeSemantics/SymbolDefinitionGenerator.cs index d54fd7c0..7db973ca 100644 --- a/vdc/abothe/comserver/CodeSemantics/SymbolDefinitionGenerator.cs +++ b/vdc/abothe/comserver/CodeSemantics/SymbolDefinitionGenerator.cs @@ -27,9 +27,13 @@ protected override Tuple Process(EditorData var definitionSourceFilename = new StringBuilder(); if (rr != null) { - var at = rr as AliasedType; - if (at != null && at.Definition.Location == sr.Location) - rr = at.Base; + if (rr is AliasedType at) + { + // jump to original definition if it is not renamed or the caret is on the import + var isRenamed = (at.Definition as ImportSymbolAlias)?.ImportBinding?.Alias != null; + if (!isRenamed || at.Definition.Location == sr.Location) + rr = at.Base; + } DNode n = null; foreach (var t in AmbiguousType.TryDissolve(rr)) { diff --git a/vdc/abothe/comserver/CodeSemantics/TooltipGenerator.cs b/vdc/abothe/comserver/CodeSemantics/TooltipGenerator.cs index 34aab30b..57a40fab 100644 --- a/vdc/abothe/comserver/CodeSemantics/TooltipGenerator.cs +++ b/vdc/abothe/comserver/CodeSemantics/TooltipGenerator.cs @@ -37,8 +37,16 @@ protected override Tuple Process( foreach (var t in AmbiguousType.TryDissolve(types)) { - tipText.Append(NodeToolTipContentGen.Instance.GenTooltipSignature(t)); - if (t is DSymbol symbol) + var dt = t; + if (dt is AliasedType at) + { + // jump to original definition if it is not renamed or the caret is on the import + var isRenamed = (at.Definition as ImportSymbolAlias)?.ImportBinding?.Alias != null; + if (!isRenamed || at.Definition.Location == sr.Location) + dt = at.Base; + } + tipText.Append(NodeToolTipContentGen.Instance.GenTooltipSignature(dt)); + if (dt is DSymbol symbol) dn = symbol.Definition; tipText.Append("\a"); diff --git a/visuald/config.d b/visuald/config.d index 8110f849..5f516d9a 100644 --- a/visuald/config.d +++ b/visuald/config.d @@ -407,7 +407,7 @@ class ProjectOptions if(symdbg == 1) cmd ~= " -g"; if(symdbg == 2) - cmd ~= " -gc"; + cmd ~= " -g"; // -gc no longer supported if (symdbg && symdebugref) cmd ~= " -gf"; diff --git a/visuald/dpackage.d b/visuald/dpackage.d index a84d61d6..23837d80 100644 --- a/visuald/dpackage.d +++ b/visuald/dpackage.d @@ -2219,7 +2219,7 @@ class GlobalOptions auto group = cast(GroupSetting)set; foreach(sw; group.children) { - if (sw.name == "switches" && sw.type == Setting.Type.array) + if ((sw.name == "switches" || sw.name == "post-switches") && sw.type == Setting.Type.array) { auto arr = cast(ArraySetting)sw; foreach(a; arr.vals()) diff --git a/visuald_vs10.sln b/visuald_vs10.sln index fd5a18ab..c1e6d2c5 100644 --- a/visuald_vs10.sln +++ b/visuald_vs10.sln @@ -115,7 +115,6 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ImportBefore", "ImportBefore", "{6C5387E8-CF11-443A-88BD-CA6DCA80E755}" ProjectSection(SolutionItems) = preProject msbuild\ImportBefore\d.props = msbuild\ImportBefore\d.props - msbuild\ImportBefore\d.targets = msbuild\ImportBefore\d.targets EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Default", "Default", "{AB498803-493D-4FB4-9FB1-9CEF0E628CE9}"