www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.ide - Inconsistent behavior between Visual-D and Mono-D

reply beannaich <beannaich gmail.com> writes:
tldr; the fragmentation in the D community is shocking at times, 
and the IDEs should at least inter-operate elegantly.

While trying different IDE packages on Windows, I've slowly 
figured out that Mono-D is a better editing experience, and 
Visual-D is a better debugging experience.

It would seem logical that Visual-D and Mono-D would both be able 
to open the same .dproj files, but they can't. After inspecting 
the .dproj files generated by both, it becomes very obvious why 
they can't.

Mono-D generates some fairly standard looking project files, 
while Visual-D generates a completely custom project file.. Why? 
Why can't the two Windows IDE use the same, mostly standard 
looking project files?

If I want to use Mono-D to edit, and Visual-D to debug (which, by 
the way, is a pain in the ass in itself) then I have to make /2/ 
project files, and rename one of them (they both use the .dproj 
extension).

I realize at this point, that changing the format of the Visual-D 
project files will cause a lot of project files to simply break, 
which might cause a lot of backlash. But in my opinion, this 
needs to be done sooner than later.

Side note: The syntax highlighting options in Visual-D are almost 
comical. Why should I have to tell it which types to highlight? 
Shouldn't this be automatically deduced by a semantic parser?

Side note 2: Why does the "add folder" menu in Visual-D add a 
filter? As near as I can tell, filters do absolutely nothing, 
aside from confusing the user. Mono-D just adds a folder to the 
file system, as you'd expect. Since D's file scanning 
functionality is based on paths, doesn't it make sense that the 
"add folder" menu should actually add a folder?
Oct 02 2015
next sibling parent extrawurst <stephan extrawurst.org> writes:
On Friday, 2 October 2015 at 21:12:26 UTC, beannaich wrote:
 tldr; the fragmentation in the D community is shocking at 
 times, and the IDEs should at least inter-operate elegantly.

 [...]
Go for the dub package format as a common denominator: http://code.dlang.org/package-format dub as a tool can generate visual-d projects (sln etc.) and mono-d can already natively load dub files (the json version of the format at least) --Stephan
Oct 04 2015
prev sibling parent reply Rainer Schuetze <r.sagitario gmx.de> writes:
On 02.10.2015 23:12, beannaich wrote:
 Mono-D generates some fairly standard looking project files, while
 Visual-D generates a completely custom project file.. Why? Why can't the
 two Windows IDE use the same, mostly standard looking project files?
Mono-D seems to be using msbuild-project files, while Visual D predates VS2010 which introduced these for C++. You might have been familiar with these before that time if you were using C#, but not me.
 If I want to use Mono-D to edit, and Visual-D to debug (which, by the
 way, is a pain in the ass in itself) then I have to make /2/ project
 files, and rename one of them (they both use the .dproj extension).
The project files for Visual D have extension .visualdproj, so they are different.
 I realize at this point, that changing the format of the Visual-D
 project files will cause a lot of project files to simply break, which
 might cause a lot of backlash. But in my opinion, this needs to be done
 sooner than later.

 Side note: The syntax highlighting options in Visual-D are almost
 comical. Why should I have to tell it which types to highlight?
 Shouldn't this be automatically deduced by a semantic parser?
Getting any semantic analysis correct for D is not a small task. Mono-D and Visual-D share the same semantic analyzer, though, so VD could get the same highlighting, but that never got high priority. I notice identifier highlighting when coding C++, but it always seems pretty random to me...
 Side note 2: Why does the "add folder" menu in Visual-D add a filter? As
 near as I can tell, filters do absolutely nothing, aside from confusing
 the user. Mono-D just adds a folder to the file system, as you'd expect.
 Since D's file scanning functionality is based on paths, doesn't it make
 sense that the "add folder" menu should actually add a folder?
There will be two new-item commands available "Add Filter" (that's for the current functionality which is also what happens with C++ projects) and "Add Package" (that's what you and C# people expect) in the next release, but it was not as easy as you might expect because there is no official information how to change entries in that specific sub-menu.
Oct 04 2015
parent beannaich <beannaich gmail.com> writes:
On Sunday, 4 October 2015 at 07:34:54 UTC, extrawurst wrote:
 Go for the dub package format as a common denominator: 
 http://code.dlang.org/package-format

 dub as a tool can generate visual-d projects (sln etc.) and 
 mono-d can already natively load dub files (the json version of 
 the format at least)
Thanks for the heads-up! Up until now, I've used dub to create and build projects. I didn't know that it also acted as a sort of "CMake" for D. I also actively refuse to use the SDL dub files, so JSON is perfect for me. :P On Sunday, 4 October 2015 at 17:41:02 UTC, Rainer Schuetze wrote:
 Mono-D seems to be using msbuild-project files, while Visual D 
 predates VS2010 which introduced these for C++. You might have 
 been familiar with these before that time if you were using C#, 
 but not me.
Microsoft is moving to a more unified project system soon (One more breaking release before stability is claimed): http://blogs.msdn.com/b/visualstudio/archive/2015/06/02/introducing-the-project-system-extensibility-sdk-preview.aspx Perhaps it would be easier to make a D project system once this is stable? Also, most people who use visual studio are using it for .NET languages and web development. Having project files that look similar to the project files for those project types definitely wouldn't hurt your extension. It also would help for those rare times when you have to do some manual project file surgery.
 The project files for Visual D have extension .visualdproj, so 
 they are different.
I could have sworn I was using Mono-D and the person I work with was using Visual-D and couldn't open the solution files I created in monodevelop. Could be that the solution file was referencing the *.dproj and Visual-D couldn't open that. I'm sorry for jumping the gun on this one. However, if that's the case, then *.dproj support should be added for Visual-D, and *.visualdproj support should be added to Mono-D (Or one format should be agreed upon). The fact that there isn't a common project format really locks you in to one editor or another, and that's never good for open source projects. I could maintain 2 project files, but adding/removing files then becomes really annoying, and raises the chances that one is out of date and/or broken.
 Getting any semantic analysis correct for D is not a small 
 task. Mono-D and Visual-D share the same semantic analyzer, 
 though, so VD could get the same highlighting, but that never 
 got high priority. I notice identifier highlighting when coding 
 C++, but it always seems pretty random to me...
C++ semantic parsing/highlighting has gotten much better with each new version of Visual Studio, and highlighting overall is definitely part of the VS experience. I would think it would be pretty easy to add support for, since there's already a way to match tokens with type names and colorize them. It seems all you'd have to do is point Visual-D at a different location for the "type name bucket". If I knew more about how Visual-D parses the source files then I'd clone the code and try to add this myself. I might just do this anyway, since the only real way to learn a code base is to play around with it.
 There will be two new-item commands available "Add Filter" 
 (that's for the current functionality which is also what 
 happens with C++ projects) and "Add Package" (that's what you 
 and C# people expect) in the next release, but it was not as 
 easy as you might expect because there is no official 
 information how to change entries in that specific sub-menu.
Having made VS extensions in the past, I totally understand the lack of documentation. I really think the menu should be called "Add Folder" because under the hood, that should be all it's doing. How do filters and folders exist side-by-side in the solution explorer? Do filters have a different icon? I could see that being very confusing, especially if you're loading up someone else's project. I know the way C++ projects handle this discrepancy, and that isn't very pretty either. PS: I don't want to come off like I'm ragging on Visual-D, it's a great (and very necessary) extension. Just the fact that it and Mono-D don't play well together is very unfortunate, but it's something that can be fixed.
Oct 05 2015