digitalmars.D - Porting VisualD to Windows 8 and Visual Studio 11
- Roman D. Boiko (6/6) Jun 10 2012 https://github.com/roman-d-boiko/visuald/commit/65d733853ea7c38dd010091c...
- Roman D. Boiko (2/8) Jun 10 2012 By the way, did anybody try doing this before?
- Roman D. Boiko (6/7) Jun 10 2012 Just found that
- Roman D. Boiko (2/4) Jun 10 2012 TOOLS->Options now contain settings for D.
- Roman D. Boiko (2/6) Jun 10 2012 After reboot I can create projects in D :)
- Roman D. Boiko (2/6) Jun 10 2012 After reboot I can create projects in D :)
- Dmitry Olshansky (4/11) Jun 10 2012 I was about to say that it works for me on VS11 RC :)
- Roman D. Boiko (3/4) Jun 10 2012 Anyway it would be great to build with Windows 8 RC SDK, so my
- Rainer Schuetze (16/20) Jun 10 2012 As you don't need the VS2012 SDK or the Windows 8 SDK to build Visual D,...
- Roman D. Boiko (20/38) Jun 10 2012 I wanted to experiment with VisualD a bit to check whether it is
- Roman D. Boiko (4/10) Jun 10 2012 What would be the correct strategy: translate as many header
- Rainer Schuetze (5/15) Jun 10 2012 The more complete the translation, the better. But to keep it feasable,
- Rainer Schuetze (10/34) Jun 10 2012 I have recently refactored the code so that the parser and the semantic
- Roman D. Boiko (9/22) Jun 10 2012 Great! This simplifies my task a lot. Interface and
- Roman D. Boiko (6/17) Jun 11 2012 Do I understand correctly that syntax coloring is implemented via
- Rainer Schuetze (10/25) Jun 11 2012 No. Syntax highlighting is done by the lexer, no (complex) parsing
- Roman D. Boiko (2/12) Jun 11 2012 I couldn't find respective code so far
- Rainer Schuetze (3/15) Jun 12 2012 It's mostly in class Colorizer, with the IDE paint callback being
- Kagamin (2/3) Jun 13 2012 Hmm... why do you mark the interface dual? It doesn't look as one.
- Rainer Schuetze (5/8) Jun 13 2012 It just discloses that I am not an expert in the COM world. The IUnknown...
- Kagamin (5/10) Jun 14 2012 That's strange. Docs say it's an error for dual interface to not
- Rainer Schuetze (5/9) Jun 14 2012 I have committed a version that converts the used parts of the Windows 8...
- Roman D. Boiko (3/15) Jun 14 2012 Thanks! I see you copied some of my changes, but completed work
- Roman D. Boiko (3/11) Jun 14 2012 It took me a working day to implement probably 5-10% of what was
- Rainer Schuetze (4/15) Jun 14 2012 Yeah, thanks for starting it. It is also a bit cleaner now for the other...
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 Sunday, 10 June 2012 at 08:38:59 UTC, Roman D. Boiko wrote:By the way, did anybody try doing this before?Just found that 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.TOOLS->Options now contain settings for D.
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:After reboot I can create projects in D :)But after installing it nothing changed in VS, new project types have not been created.TOOLS->Options now contain settings for D.
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:After reboot I can create projects in D :)But after installing it nothing changed in VS, new project types have not been created.TOOLS->Options now contain settings for D.
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:I was about to say that it works for me on VS11 RC :) -- Dmitry OlshanskyBy the way, did anybody try doing this before?Just found that 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:25:59 UTC, Dmitry Olshansky wrote:I was about to say that it works for me on VS11 RC :)Anyway it would be great to build with Windows 8 RC SDK, so my changes are potentially useful (but not necessary, nor important).
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: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. RainerI was about to say that it works for me on VS11 RC :)Anyway it would be great to build with Windows 8 RC SDK, so my 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.I wanted to experiment with VisualD a bit to check whether it is 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.I didn't include all required files yet.At first glance, your way to translate the shared/um files seems fine, but I have yet to understand the text replacements.These are dirty, I tried to move fast without polishing. 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.Would be nice to know the correct mapping for various annotations. So far I tried to mimic code already present in VisualD.RainerThanks!
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:What would be the correct strategy: translate as many header files as possible, or only necessary (this is what I tried so far), or use some other criteria to decide?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.I didn't include all required files yet.
Jun 10 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: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).On Sunday, 10 June 2012 at 16:51:23 UTC, Rainer Schuetze wrote:What would be the correct strategy: translate as many header files as possible, or only necessary (this is what I tried so far), or use some other criteria to decide?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.I didn't include all required files yet.
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: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.dAs 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.I wanted to experiment with VisualD a bit to check whether it is 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.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.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).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.Would be nice to know the correct mapping for various annotations. So far I tried to mimic code already present in VisualD.
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.dGreat! This simplifies my task a lot. Interface and implementation seem to be straightforward. Of course, I'll need to understand overall design first, but now I have a good starting point.I'll try to finish in the same way as I started (commenting them 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.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).
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:Do I understand correctly that syntax coloring is implemented via 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?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.dGreat! This simplifies my task a lot. Interface and implementation seem to be straightforward. Of course, I'll need to understand overall design first, but now I have a good starting point.
Jun 11 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: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.On Sunday, 10 June 2012 at 18:16:39 UTC, Rainer Schuetze wrote:Do I understand correctly that syntax coloring is implemented via 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?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.dGreat! This simplifies my task a lot. Interface and implementation seem to be straightforward. Of course, I'll need to understand overall design first, but now I have a good starting point.
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.I couldn't find respective code so far
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:It's mostly in class Colorizer, with the IDE paint callback being ColorizeLine.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.I couldn't find respective code so far
Jun 12 2012
On Sunday, 10 June 2012 at 18:16:39 UTC, Rainer Schuetze wrote:https://github.com/rainers/visuald/blob/master/vdc/ivdserver.dHmm... why do you mark the interface dual? It doesn't look as one.
Jun 13 2012
On 6/13/2012 10:16 AM, Kagamin wrote:On Sunday, 10 June 2012 at 18:16:39 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 I guess I should just remove the "dual" from the idl file, shouldn't I?https://github.com/rainers/visuald/blob/master/vdc/ivdserver.dHmm... 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 ofThat'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 6/10/2012 12:35 PM, Roman D. Boiko wrote:On Sunday, 10 June 2012 at 10:25:59 UTC, Dmitry Olshansky wrote: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.I was about to say that it works for me on VS11 RC :)Anyway it would be great to build with Windows 8 RC SDK, so my changes are potentially useful (but not necessary, nor important).
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: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.On Sunday, 10 June 2012 at 10:25:59 UTC, Dmitry Olshansky wrote: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.I was about to say that it works for me on VS11 RC :)Anyway it would be great to build with Windows 8 RC SDK, so my changes are potentially useful (but not necessary, nor important).
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 SchuetzeIt took me a working day to implement probably 5-10% of what was needed, as far as I can see from your commit :(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 6/14/2012 9:54 PM, Roman D. Boiko wrote:On Thursday, 14 June 2012 at 19:44:30 UTC, Roman D. Boiko wrote:Yeah, thanks for starting it. It is also a bit cleaner now for the other SDK versions.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.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