digitalmars.D - Porting VisualD to Windows 8 and Visual Studio 11
- "Roman D. Boiko" <rb d-coding.com> Jun 10 2012
- "Roman D. Boiko" <rb d-coding.com> Jun 10 2012
- Dmitry Olshansky <dmitry.olsh gmail.com> Jun 10 2012
- Rainer Schuetze <r.sagitario gmx.de> Jun 10 2012
- Rainer Schuetze <r.sagitario gmx.de> Jun 10 2012
- Rainer Schuetze <r.sagitario gmx.de> Jun 11 2012
- Rainer Schuetze <r.sagitario gmx.de> Jun 12 2012
- Rainer Schuetze <r.sagitario gmx.de> Jun 13 2012
- Rainer Schuetze <r.sagitario gmx.de> Jun 10 2012
- Rainer Schuetze <r.sagitario gmx.de> Jun 14 2012
- Rainer Schuetze <r.sagitario gmx.de> Jun 14 2012
- "Roman D. Boiko" <rb d-coding.com> Jun 10 2012
- "Roman D. Boiko" <rb d-coding.com> Jun 10 2012
- "Roman D. Boiko" <rb d-coding.com> Jun 10 2012
- "Roman D. Boiko" <rb d-coding.com> Jun 10 2012
- "Roman D. Boiko" <rb d-coding.com> Jun 10 2012
- "Roman D. Boiko" <rb d-coding.com> Jun 10 2012
- "Roman D. Boiko" <rb d-coding.com> Jun 10 2012
- "Roman D. Boiko" <rb d-coding.com> Jun 10 2012
- "Roman D. Boiko" <rb d-coding.com> Jun 11 2012
- "Roman D. Boiko" <rb d-coding.com> Jun 11 2012
- "Kagamin" <spam here.lot> Jun 13 2012
- "Kagamin" <spam here.lot> Jun 14 2012
- "Roman D. Boiko" <rb d-coding.com> Jun 14 2012
- "Roman D. Boiko" <rb d-coding.com> Jun 14 2012
https://github.com/roman-d-boiko/visuald/commit/65d733853ea7c38dd010091c942b66ef892bd216#diff-0 Please review. It is not finished, but I would like to get some feedback. Note: support for previous versions of Windows and VS is temporarily broken to speed-up my current work. Later my changes will be versioned.
Jun 10 2012
On Sunday, 10 June 2012 at 08:38:05 UTC, Roman D. Boiko wrote:https://github.com/roman-d-boiko/visuald/commit/65d733853ea7c38dd010091c942b66ef892bd216#diff-0 Please review. It is not finished, but I would like to get some feedback. Note: support for previous versions of Windows and VS is temporarily broken to speed-up my current work. Later my changes will be versioned.
By the way, did anybody try doing this before?
Jun 10 2012
On 10.06.2012 14:13, Roman D. Boiko wrote:On Sunday, 10 June 2012 at 08:38:59 UTC, Roman D. Boiko wrote:By the way, did anybody try doing this before?
http://dsource.org/projects/visuald/browser/downloads/VisualD-v0.3.33rc1.exe supports VS 11 :) (Is it for beta or RC?) But after installing it nothing changed in VS, new project types have not been created.
I was about to say that it works for me on VS11 RC :) -- Dmitry Olshansky
Jun 10 2012
On 6/10/2012 12:35 PM, Roman D. Boiko wrote:On Sunday, 10 June 2012 at 10:25:59 UTC, Dmitry Olshansky wrote:I was about to say that it works for me on VS11 RC :)
are potentially useful (but not necessary, nor important).
As you don't need the VS2012 SDK or the Windows 8 SDK to build Visual D, it does not seem urgent to do the translations, but it might be nice to have them as this is a fast way to update the interface headers to a new OS version. The recent version of the converter also translates "#ifdef _WIN64" to "version(Win64)" instead of throwing the code out, but I have not done a lot with it yet. So far I have the beta of VS 2012 installed, and from the files you added to the translation, it seems that the release candidate has a few more files. I'll update my VS11beta to VS2012rc and will have a look. At first glance, your way to translate the shared/um files seems fine, but I have yet to understand the text replacements. Those _null_terminated_ annotations (and similar) should probably be translated to their Win7 SDK version identifier __nullterminated. That way they might get handled correctly by the regex expressions. Rainer
Jun 10 2012
On 6/10/2012 7:10 PM, Roman D. Boiko wrote:On Sunday, 10 June 2012 at 16:51:23 UTC, Rainer Schuetze wrote:As you don't need the VS2012 SDK or the Windows 8 SDK to build Visual D, it does not seem urgent to do the translations, but it might be nice to have them as this is a fast way to update the interface headers to a new OS version. The recent version of the converter also translates "#ifdef _WIN64" to "version(Win64)" instead of throwing the code out, but I have not done a lot with it yet.
possible to make use of my other project (https://github.com/roman-d-boiko/dct, currently very early draft) from VisualD.
I have recently refactored the code so that the parser and the semantic analysis can run in an different process (a local COM server). This was mainly to avoid GC stalls within the IDE, but could also be used to plugin other code for semantic analysis. The current interface is here: https://github.com/rainers/visuald/blob/master/vdc/ivdserver.dAre these SDKs needed for developing VisualD on Windows 8 RC with Visual Studio 11 RC? This setup is the one I use most often.
You can also use the SDKs that come with VS2008 or VS2010.Basically, either a block of text from some file is commented out when it generates compiler error, or some block (`open`) is replaced with equivalent starting from `/+`, and the other (`close`) with the one ending `+/`, so that everything between them is commented out. I think some blocks could be converted to the D equivalents, but I don't have experience with this.Those _null_terminated_ annotations (and similar) should probably be translated to their Win7 SDK version identifier __nullterminated. That way they might get handled correctly by the regex expressions.
far I tried to mimic code already present in VisualD.
The annotations are usually commented out by the converter to keep them as documentation. But that means they can still confuse some conversion rules (e.g. calls to replaceTokenSequence that contain __nulltermiatated).
Jun 10 2012
On 6/11/2012 1:10 PM, Roman D. Boiko wrote:On Sunday, 10 June 2012 at 18:45:55 UTC, Roman D. Boiko wrote:On Sunday, 10 June 2012 at 18:16:39 UTC, Rainer Schuetze wrote:I have recently refactored the code so that the parser and the semantic analysis can run in an different process (a local COM server). This was mainly to avoid GC stalls within the IDE, but could also be used to plugin other code for semantic analysis. The current interface is here: https://github.com/rainers/visuald/blob/master/vdc/ivdserver.d
seem to be straightforward. Of course, I'll need to understand overall design first, but now I have a good starting point.
GetTip / GetTipResult pair of functions, which serialize tokens using ast.node.Node.toD(CodeWriter)? If yes, is format defined by some standard or documented? If no, what mechanism is used to highlight syntax?
No. Syntax highlighting is done by the lexer, no (complex) parsing involved. The only case where the parser is consulted (but not waiting for an answer, just using cached information) is to figure out whether "in"/"is" are used as operators or as parameter modifier/IsExpression, respectively. Syntax highlighting needs to be rather fast, as it is done during drawing, so switching context is out of the question. Instead, Visual D keeps a lexer-state (an int) per line and continues scanning from the start of the line when color information is requested by the IDE.
Jun 11 2012
On 6/11/2012 7:57 PM, Roman D. Boiko wrote:On Monday, 11 June 2012 at 17:41:12 UTC, Rainer Schuetze wrote:No. Syntax highlighting is done by the lexer, no (complex) parsing involved. The only case where the parser is consulted (but not waiting for an answer, just using cached information) is to figure out whether "in"/"is" are used as operators or as parameter modifier/IsExpression, respectively. Syntax highlighting needs to be rather fast, as it is done during drawing, so switching context is out of the question. Instead, Visual D keeps a lexer-state (an int) per line and continues scanning from the start of the line when color information is requested by the IDE.
It's mostly in class Colorizer, with the IDE paint callback being ColorizeLine.
Jun 12 2012
On 6/13/2012 10:16 AM, Kagamin wrote:On Sunday, 10 June 2012 at 18:16:39 UTC, Rainer Schuetze wrote:https://github.com/rainers/visuald/blob/master/vdc/ivdserver.d
Hmm... why do you mark the interface dual? It doesn't look as one.
It just discloses that I am not an expert in the COM world. The IUnknown base class instead of IDispatch was the result of trial and error when trying to implement the server in C#. I guess I should just remove the "dual" from the idl file, shouldn't I?
Jun 13 2012
On 6/10/2012 7:14 PM, Roman D. Boiko wrote:On Sunday, 10 June 2012 at 17:10:40 UTC, Roman D. Boiko wrote:On Sunday, 10 June 2012 at 16:51:23 UTC, Rainer Schuetze wrote:So far I have the beta of VS 2012 installed, and from the files you added to the translation, it seems that the release candidate has a few more files. I'll update my VS11beta to VS2012rc and will have a look.
possible, or only necessary (this is what I tried so far), or use some other criteria to decide?
The more complete the translation, the better. But to keep it feasable, I have also cut off include dependencies where sensible. The files in sdk/port are the files that might not be converted. (Beware: some of them are in fact converted, I'll need to cleanup the folder).
Jun 10 2012
On 6/10/2012 12:35 PM, Roman D. Boiko wrote:On Sunday, 10 June 2012 at 10:25:59 UTC, Dmitry Olshansky wrote:I was about to say that it works for me on VS11 RC :)
are potentially useful (but not necessary, nor important).
I have committed a version that converts the used parts of the Windows 8 SDK and the VS2012 Beta SDK. I have also verified that it didn't break converting Windows SDK 6.0A with VS2008 SDK and Windows SDK 7.0A with VS2010 SDK.
Jun 14 2012
On 6/14/2012 9:54 PM, Roman D. Boiko wrote:On Thursday, 14 June 2012 at 19:44:30 UTC, Roman D. Boiko wrote:On Thursday, 14 June 2012 at 19:35:56 UTC, Rainer SchuetzeI have committed a version that converts the used parts of the Windows 8 SDK and the VS2012 Beta SDK. I have also verified that it didn't break converting Windows SDK 6.0A with VS2008 SDK and Windows SDK 7.0A with VS2010 SDK.
Thanks! I see you copied some of my changes, but completed work (I didn't), and made it clean :) I guess I can drop my branch now.
Yeah, thanks for starting it. It is also a bit cleaner now for the other SDK versions.It took me a working day to implement probably 5-10% of what was needed, as far as I can see from your commit :(
I guess I had a head-start having worked on previous versions of the SDK.
Jun 14 2012
On Sunday, 10 June 2012 at 08:38:59 UTC, Roman D. Boiko wrote:By the way, did anybody try doing this before?
http://dsource.org/projects/visuald/browser/downloads/VisualD-v0.3.33rc1.exe supports VS 11 :) (Is it for beta or RC?) But after installing it nothing changed in VS, new project types have not been created.
Jun 10 2012
On Sunday, 10 June 2012 at 10:13:40 UTC, Roman D. Boiko wrote:But after installing it nothing changed in VS, new project types have not been created.
Jun 10 2012
On Sunday, 10 June 2012 at 10:18:42 UTC, Roman D. Boiko wrote:On Sunday, 10 June 2012 at 10:13:40 UTC, Roman D. Boiko wrote:But after installing it nothing changed in VS, new project types have not been created.
Jun 10 2012
On Sunday, 10 June 2012 at 10:18:42 UTC, Roman D. Boiko wrote:On Sunday, 10 June 2012 at 10:13:40 UTC, Roman D. Boiko wrote:But after installing it nothing changed in VS, new project types have not been created.
Jun 10 2012
On Sunday, 10 June 2012 at 10:25:59 UTC, Dmitry Olshansky wrote:I was about to say that it works for me on VS11 RC :)
changes are potentially useful (but not necessary, nor important).
Jun 10 2012
On Sunday, 10 June 2012 at 16:51:23 UTC, Rainer Schuetze wrote:As you don't need the VS2012 SDK or the Windows 8 SDK to build Visual D, it does not seem urgent to do the translations, but it might be nice to have them as this is a fast way to update the interface headers to a new OS version. The recent version of the converter also translates "#ifdef _WIN64" to "version(Win64)" instead of throwing the code out, but I have not done a lot with it yet.
possible to make use of my other project (https://github.com/roman-d-boiko/dct, currently very early draft) from VisualD. Are these SDKs needed for developing VisualD on Windows 8 RC with Visual Studio 11 RC? This setup is the one I use most often.So far I have the beta of VS 2012 installed, and from the files you added to the translation, it seems that the release candidate has a few more files. I'll update my VS11beta to VS2012rc and will have a look.
At first glance, your way to translate the shared/um files seems fine, but I have yet to understand the text replacements.
Basically, either a block of text from some file is commented out when it generates compiler error, or some block (`open`) is replaced with equivalent starting from `/+`, and the other (`close`) with the one ending `+/`, so that everything between them is commented out. I think some blocks could be converted to the D equivalents, but I don't have experience with this.Those _null_terminated_ annotations (and similar) should probably be translated to their Win7 SDK version identifier __nullterminated. That way they might get handled correctly by the regex expressions.
annotations. So far I tried to mimic code already present in VisualD.Rainer
Jun 10 2012
On Sunday, 10 June 2012 at 17:10:40 UTC, Roman D. Boiko wrote:On Sunday, 10 June 2012 at 16:51:23 UTC, Rainer Schuetze wrote:So far I have the beta of VS 2012 installed, and from the files you added to the translation, it seems that the release candidate has a few more files. I'll update my VS11beta to VS2012rc and will have a look.
files as possible, or only necessary (this is what I tried so far), or use some other criteria to decide?
Jun 10 2012
On Sunday, 10 June 2012 at 18:16:39 UTC, Rainer Schuetze wrote:I have recently refactored the code so that the parser and the semantic analysis can run in an different process (a local COM server). This was mainly to avoid GC stalls within the IDE, but could also be used to plugin other code for semantic analysis. The current interface is here: https://github.com/rainers/visuald/blob/master/vdc/ivdserver.d
implementation seem to be straightforward. Of course, I'll need to understand overall design first, but now I have a good starting point.Would be nice to know the correct mapping for various annotations. So far I tried to mimic code already present in VisualD.
The annotations are usually commented out by the converter to keep them as documentation. But that means they can still confuse some conversion rules (e.g. calls to replaceTokenSequence that contain __nulltermiatated).
out), in order to avoid doing changes that I don't understand. If you will consider the result useful, it should be relatively easy to fix them for you.
Jun 10 2012
On Sunday, 10 June 2012 at 18:45:55 UTC, Roman D. Boiko wrote:On Sunday, 10 June 2012 at 18:16:39 UTC, Rainer Schuetze wrote:I have recently refactored the code so that the parser and the semantic analysis can run in an different process (a local COM server). This was mainly to avoid GC stalls within the IDE, but could also be used to plugin other code for semantic analysis. The current interface is here: https://github.com/rainers/visuald/blob/master/vdc/ivdserver.d
implementation seem to be straightforward. Of course, I'll need to understand overall design first, but now I have a good starting point.
using GetTip / GetTipResult pair of functions, which serialize tokens using ast.node.Node.toD(CodeWriter)? If yes, is format defined by some standard or documented? If no, what mechanism is used to highlight syntax?
Jun 11 2012
On Monday, 11 June 2012 at 17:41:12 UTC, Rainer Schuetze wrote:No. Syntax highlighting is done by the lexer, no (complex) parsing involved. The only case where the parser is consulted (but not waiting for an answer, just using cached information) is to figure out whether "in"/"is" are used as operators or as parameter modifier/IsExpression, respectively. Syntax highlighting needs to be rather fast, as it is done during drawing, so switching context is out of the question. Instead, Visual D keeps a lexer-state (an int) per line and continues scanning from the start of the line when color information is requested by the IDE.
Jun 11 2012
On Sunday, 10 June 2012 at 18:16:39 UTC, Rainer Schuetze wrote:https://github.com/rainers/visuald/blob/master/vdc/ivdserver.d
Hmm... why do you mark the interface dual? It doesn't look as one.
Jun 13 2012
On Wednesday, 13 June 2012 at 17:26:23 UTC, Rainer Schuetze wrote:It just discloses that I am not an expert in the COM world. The IUnknown base class instead of IDispatch was the result of trial and error when trying to implement the server in C#.
That's strange. Docs say it's an error for dual interface to not derive from IDispatch.I guess I should just remove the "dual" from the idl file, shouldn't I?
Neither clr nor COM need dual interfaces, plain COM should just work.
Jun 14 2012
On Thursday, 14 June 2012 at 19:35:56 UTC, Rainer Schuetze wrote:On 6/10/2012 12:35 PM, Roman D. Boiko wrote:On Sunday, 10 June 2012 at 10:25:59 UTC, Dmitry Olshansky wrote:I was about to say that it works for me on VS11 RC :)
changes are potentially useful (but not necessary, nor important).
I have committed a version that converts the used parts of the Windows 8 SDK and the VS2012 Beta SDK. I have also verified that it didn't break converting Windows SDK 6.0A with VS2008 SDK and Windows SDK 7.0A with VS2010 SDK.
Thanks! I see you copied some of my changes, but completed work (I didn't), and made it clean :) I guess I can drop my branch now.
Jun 14 2012
On Thursday, 14 June 2012 at 19:44:30 UTC, Roman D. Boiko wrote:On Thursday, 14 June 2012 at 19:35:56 UTC, Rainer SchuetzeI have committed a version that converts the used parts of the Windows 8 SDK and the VS2012 Beta SDK. I have also verified that it didn't break converting Windows SDK 6.0A with VS2008 SDK and Windows SDK 7.0A with VS2010 SDK.
Thanks! I see you copied some of my changes, but completed work (I didn't), and made it clean :) I guess I can drop my branch now.
needed, as far as I can see from your commit :(
Jun 14 2012









Rainer Schuetze <r.sagitario gmx.de> 