Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: nocide on March 23, 2010, 12:58:11 pm

Title: D Programming Language Support
Post by: nocide on March 23, 2010, 12:58:11 pm
I'am new to codeblocks and have just realized, that Codeblocks support the D programming language.
I'm interessted into improve it in this manner with the following points
- fix the current bugs related to D
- update it to the newest realeas of the dmd/gdc compiler
- make it work on more plattforms (win32/linux/freeBSD[?]/OSX[?])

so my questions are:
- is this desired?
- where can I send patches? (before all, as I know, the changed code would not be related to a plugin)

thanks and greets
nocide

-----------------------------------------------------------------------

Update: 2010-03-28
I've made a patch now!
- fixed the path for dmd1/dmd2 -> win32 only (If someone can give me the
  paths for the other OS, I will add it too!)
- fixed bugID 014301 (-g option is now added to the linkeroptions)
- d_lexer updated
- d/console project updated
- added D-Icon for codecompletion
*************************************************
update: 2010-03-29
new patch available!
- fixed a bug in common_functions.script
- added support for dmd-D1/D2 on linux/OSX/freeBSD
  [note: either install on debian-based distros the .deb package from digitalMars homepage or download, unzip and install as described on the digitalMars-page!
           -> this default paths will be assumed]
*************************************************
update: 2010-03-31
Bugfix:
- added -g option to gdc/linker for debug target
update: 2010-03-31 (evening)
- minor changes in the lexer
*************************************************
updaate: 2010-04-02
- created patchfiles for *nix and win32
- minor bugfixes
*************************************************
update: 2010-04-10
- some bugfixes (tested on linux/windows)
- now with different auto-detection for D1/D2 (gdc/dmd)
*************************************************
update-2: 2010-04-10
- recognized a bug in compilerD.cpp on windows > wxShell does not exist in windows version, replaced with wxExecute
*************************************************
update: 2010-04-12
++ uploaded the patch to patch-tracker, hopfully this patch soonly will be in the trunk
*************************************************
update: 2010-05-22
- a detailed description of the installation proccess is available on http://prowiki.org/wiki4d/wiki.cgi?EditorSupport/CodeBlocks#section6 (http://prowiki.org/wiki4d/wiki.cgi?EditorSupport/CodeBlocks#section6)
*************************************************
update: 2010-09-29
This patch is partially applied. (see http://developer.berlios.de/patch/?func=detailpatch&patch_id=2981&group_id=5358)
So the patch in this thread is no longer needed and was removed.
Title: Re: D Programming Language Support
Post by: MortenMacFly on March 23, 2010, 01:22:20 pm
- is this desired?
Yes, I have seen several requests / discussion in this direction.

- where can I send patches? (before all, as I know, the changed code would not be related to a plugin)
We have a bug / patch tracker available trough our webpage. I suggest you create a forum thread related to D programming where you initially post the patches for volunteers to help (test) and if you believe they are "stable" feel free to put them on the patch tracker.
Title: Re: D Programming Language Support
Post by: nocide on March 23, 2010, 01:46:25 pm
Ok, thats fine.
I've just checked out and will post a patch ... :)
Title: Re: D Programming Language Support
Post by: afb on March 23, 2010, 04:34:45 pm
I'm interested in patches for GDC/D1, not so much for DMD/D2.

Was using Code::Blocks for wxD, http://wxd.sourceforge.net/

Title: Re: D Programming Language Support
Post by: nocide on March 23, 2010, 04:51:08 pm
I thought to support both: D1/D2 (since D2 is still beta!)
Title: Re: (Update: 2010-03-27) D Programming Language Support
Post by: nocide on March 28, 2010, 01:24:25 am
push! (see post 1)
Title: Re: (Update: 2010-03-27) D Programming Language Support
Post by: bernard on March 29, 2010, 09:11:07 am
Code
[codeblocks]$ patch -p0 <dprogramming.patch 
(Stripping trailing CRs from patch.)
patching file src/plugins/codecompletion/codecompletion.cpp
(Stripping trailing CRs from patch.)
patching file src/plugins/compilergcc/compilerDMD.cpp
(Stripping trailing CRs from patch.)
patching file src/plugins/compilergcc/compilerDMD.h
(Stripping trailing CRs from patch.)
patching file src/plugins/compilergcc/compilergcc.cpp
(Stripping trailing CRs from patch.)
patching file src/plugins/scriptedwizard/resources/common_functions.script
Hunk #1 FAILED at 31.
Hunk #2 FAILED at 65.
Hunk #3 FAILED at 130.
3 out of 3 hunks FAILED -- saving rejects to file src/plugins/scriptedwizard/resources/common_functions.script.rej
(Stripping trailing CRs from patch.)
patching file src/plugins/scriptedwizard/resources/d/console/hello.d
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file src/plugins/scriptedwizard/resources/d/console/hello.d.rej
(Stripping trailing CRs from patch.)
patching file src/plugins/scriptedwizard/resources/d/wizard.script
Hunk #1 FAILED at 17.
Hunk #2 FAILED at 29.
2 out of 2 hunks FAILED -- saving rejects to file src/plugins/scriptedwizard/resources/d/wizard.script.rej
(Stripping trailing CRs from patch.)
patching file src/sdk/resources/lexers/lexer_d.sample
Hunk #1 FAILED at 1.
Hunk #2 FAILED at 14.
2 out of 2 hunks FAILED -- saving rejects to file src/sdk/resources/lexers/lexer_d.sample.rej
(Stripping trailing CRs from patch.)
patching file src/sdk/resources/lexers/lexer_d.xml
Hunk #1 FAILED at 3.
Hunk #2 FAILED at 122.
2 out of 2 hunks FAILED -- saving rejects to file src/sdk/resources/lexers/lexer_d.xml.rej

common_functions.script.rej
Code
***************
*** 31,37 ****
          base.AddCompilerOption(_T("-Wall"));
      }
      else if (   GetCompilerFactory().CompilerInheritsFrom(compilerID, _T("bcc*"))
-              || GetCompilerFactory().CompilerInheritsFrom(compilerID, _T("dmd")) )
      {
          base.AddCompilerOption(_T("-w"));
      }
--- 31,37 ----
          base.AddCompilerOption(_T("-Wall"));
      }
      else if (   GetCompilerFactory().CompilerInheritsFrom(compilerID, _T("bcc*"))
+              || GetCompilerFactory().CompilerInheritsFrom(compilerID, _T("dmd*")) )
      {
          base.AddCompilerOption(_T("-w"));
      }
***************
*** 65,80 ****
               || GetCompilerFactory().CompilerInheritsFrom(compilerID, _T("ppc*"))
               || GetCompilerFactory().CompilerInheritsFrom(compilerID, _T("cygwin"))
               || GetCompilerFactory().CompilerInheritsFrom(compilerID, _T("dmc"))
-              || GetCompilerFactory().CompilerInheritsFrom(compilerID, _T("dmd"))
               || GetCompilerFactory().CompilerInheritsFrom(compilerID, _T("gcc"))
               || GetCompilerFactory().CompilerInheritsFrom(compilerID, _T("gdc"))
               || GetCompilerFactory().CompilerInheritsFrom(compilerID, _T("tcc")) )
      {
          base.AddCompilerOption(_T("-g"));
 
-         if  (GetCompilerFactory().CompilerInheritsFrom(compilerID, _T("dmd")))
          {
-             base.AddCompilerOption(_T("-debug"));
          }
      }
      else if (GetCompilerFactory().CompilerInheritsFrom(compilerID, _T("bcc*")))
--- 65,80 ----
               || GetCompilerFactory().CompilerInheritsFrom(compilerID, _T("ppc*"))
               || GetCompilerFactory().CompilerInheritsFrom(compilerID, _T("cygwin"))
               || GetCompilerFactory().CompilerInheritsFrom(compilerID, _T("dmc"))
+              || GetCompilerFactory().CompilerInheritsFrom(compilerID, _T("dmd*"))
               || GetCompilerFactory().CompilerInheritsFrom(compilerID, _T("gcc"))
               || GetCompilerFactory().CompilerInheritsFrom(compilerID, _T("gdc"))
               || GetCompilerFactory().CompilerInheritsFrom(compilerID, _T("tcc")) )
      {
          base.AddCompilerOption(_T("-g"));
 
+         if  (GetCompilerFactory().CompilerInheritsFrom(compilerID, _T("dmd*")))
          {
+             base.AddLinkerOptions(_T("-g"));
          }
      }
      else if (GetCompilerFactory().CompilerInheritsFrom(compilerID, _T("bcc*")))
***************
*** 130,136 ****
      {
          base.AddCompilerOption(_T("-Os"));
      }
-     else if (GetCompilerFactory().CompilerInheritsFrom(compilerID, _T("dmd")))
      {
          base.AddCompilerOption(_T("-O"));
      }
--- 130,136 ----
      {
          base.AddCompilerOption(_T("-Os"));
      }
+     else if (GetCompilerFactory().CompilerInheritsFrom(compilerID, _T("dmd*")))
      {
          base.AddCompilerOption(_T("-O"));
      }

[b]/src/plugins/scriptedwizard/resources/d/console/hello.d.rej[/b]
[code]
***************
*** 1,10 ****
- version(Tango) extern (C) int printf(char *, ...);
 
- int main(char[][] args)
  {
-     printf("hello world\n");
-     printf("args.length = %d\n", args.length);
-     for (int i = 0; i < args.length; i++)
- printf("args[%d] = '%s'\n", i, cast(char *)args[i]);
-     return 0;
  }
--- 1,9 ----
+ module main;
 
+ import std.stdio;
+
+ int main(string[] args)
  {
+     writefln("Hello World\n");
+ return 0;
  }

./src/plugins/scriptedwizard/resources/d/wizard.script.rej
Code
***************
*** 17,23 ****
      // add builtin pages
      Wizard.AddInfoPage(_T("DIntro"), intro_msg); // intro
      Wizard.AddProjectPathPage(); // select project name and path
-     Wizard.AddCompilerPage(_T(""), _T("dmd;gdc"), true, true); // select compiler and configurations
      // nothing more needs to be done here
  }
 
--- 17,23 ----
      // add builtin pages
      Wizard.AddInfoPage(_T("DIntro"), intro_msg); // intro
      Wizard.AddProjectPathPage(); // select project name and path
+     Wizard.AddCompilerPage(_T(""), _T("dmd1;dmd2;gdc"), true, true); // select compiler and configurations
      // nothing more needs to be done here
  }
 
***************
*** 29,35 ****
  function SetupProject(project)
  {
      // enable compiler warnings (project-wide)
-     if (Wizard.GetCompilerID().Matches(_T("gdc")))
          WarningsOn(project, Wizard.GetCompilerID());
 
      // Debug build target
--- 29,35 ----
  function SetupProject(project)
  {
      // enable compiler warnings (project-wide)
+     if (Wizard.GetCompilerID().Matches(_T("dmd1")))
          WarningsOn(project, Wizard.GetCompilerID());
 
      // Debug build target

./src/sdk/resources/lexers/lexer_d.sample.rej
Code
***************
*** 1,13 ****
- /*
-  * Sample preview code
-  * This is a block comment
   */

- /++
- A Super Block
-  ++/
 
- import std.file;
 
  /**
    * This is a documentation comment block
--- 1,12 ----
+ /**
+  * This is a Ddoc block comment
+  * Authors: Melvin D. Nerd, melvin@mailinator.com
+  * Bugs:    Doesn't work for negative values.
+  * Date:    March 14, 2003
   */
 
+ module hello;
+ import std.stdio;
 
  /**
    * This is a documentation comment block
***************
*** 15,33 ****
    * @authr some user (this is the documentation keyword error)
    */
 
- int main(char[] args)
  {
- /// This is a documentation comment line
- int[20] numbers;
  int average = 0;
  char ch = '\n';
- for (int i = 0; i < 20; ++i) // a breakpoint is set
- {
- numbers[i] = i; // active line (during debugging)
- total += i; // error line
- }
- average = total / 20;
- printf("%d\n%d\n", numbers[0], numbers[19]);
- printf("total: %d average: %d\n", total, average);
  }
-
--- 14,65 ----
    * @authr some user (this is the documentation keyword error)
    */
 
+ void main(string[] args)
  {
+     /*
+      * Sample preview code
+      * This is a block comment
+      */
+
+     /// Deprecated: superseded by function bar().
+     void foo() {  }
+
+     int numbers[20];
  int average = 0;
  char ch = '\n';
+     int a =     /+ Nested Comment +/ 1;
+     int b = 2;  // Line Comment
+
+     writefln("Hello World, Reloaded");
+
+     // auto type inference and built-in foreach
+     foreach (argc, argv; args)
+     {
+         // Improved typesafe printf
+         writeln("argc: ", argc, " arg: ", argv);
+     }
+
+     // Nested structs and classes
+     struct specs
+     {
+         // all members automatically initialized
+         int count, allocated;
+     }
+
+     // Nested functions can refer to outer
+     // variables like args
+     specs argspecs()
+     {
+         specs* s = new specs;
+         // no need for '->'
+         s.count = args.length;        // get length of array with .length
+         s.allocated = typeof(args).sizeof; // built-in native type properties
+         foreach (argv; args)
+             s.allocated += argv.length * typeof(argv[0]).sizeof;
+         return *s;
+     }
+
+     // built-in string and common string operations
+     writefln("argc = %d, " ~ "allocated = %d",
+ argspecs().count, argspecs().allocated);
  }

./src/sdk/resources/lexers/lexer_d.xml.rej
Code
***************
*** 3,102 ****
  <CodeBlocks_lexer_properties>
  <Lexer name="D"
  index="79"
- filemasks="*.d,*.dmd,*.di">
  <Style name="Default"
  index="0"
  fg="0,0,0"
- bg="255,255,255"
  bold="0"
  italics="0"
  underlined="0"/>
- <Style name="Comment (normal)"
- index="1,2"
- fg="160,160,160"/>
  <Style name="Comment (nested)"
  index="4"
- fg="160,160,160"/>
- <Style name="Comment (documentation)"
- index="3,15"
- fg="128,128,255"
- bold="1"/>
- <Style name="Comment keyword (documentation)"
- index="16"
- fg="0,128,128"/>
- <Style name="Comment keyword error (documentation)"
- index="17"
- fg="128,0,0"/>
  <Style name="Number"
  index="5"
- fg="240,0,240"/>
- <Style name="Keyword"
- index="6,7"
- fg="0,0,160"
- bold="1"/>
- <Style name="User keyword"
  index="8"
- fg="0,160,0"
- bold="1"/>
- <Style name="Typedef"
  index="9"
- fg="0,160,0"/>
  <Style name="String"
- index="10,11"
- fg="0,0,255"/>
  <Style name="Character"
  index="12"
- fg="224,160,0"/>
  <Style name="Operator"
  index="13"
- fg="255,0,0"/>
  <Style name="Selection"
  index="-99"
- bg="192,192,192"/>
  <Style name="Active line"
  index="-98"
- bg="255,255,160"/>
  <Style name="Breakpoint line"
  index="-2"
- bg="255,160,160"/>
  <Style name="Debugger active line"
  index="-3"
- bg="160,160,255"/>
  <Style name="Compiler error line"
  index="-4"
- bg="255,128,0"/>
  <Style name="Matching brace highlight"
  index="34"
  fg="255,0,0"
- bold="1"
- underlined="1"/>
  <Style name="No matching brace highlight"
  index="35"
  bg="255,0,0"/>
  <Keywords>
- <Language index="0"
- value="abstract alias align asm assert auto
- body bool break byte
- case cast catch cdouble cent cfloat char
- class const continue creal
- dchar debug default delegate delete
- deprecated do double
- else enum export extern
- false final finally float for foreach foreach_reverse function
- goto
- idouble if ifloat import in inout int interface invariant ireal is
- lazy long
- macro mixin module
- new null out override
- package pragma private protected public
- real ref return
- scope short static struct super switch synchronized
- template this throw true try typedef typeid typeof
- ubyte ucent uint ulong union unittest ushort
- version void volatile
- wchar while with"/>
- <User index="1"/>
- <Documentation index="2"
  value="a addindex addtogroup anchor arg attention
  author b brief bug c class code date def defgroup deprecated dontinclude
  e em endcode endhtmlonly endif endlatexonly endlink endverbatim enum example exception
--- 3,117 ----
  <CodeBlocks_lexer_properties>
  <Lexer name="D"
  index="79"
+ filemasks="*.d,*.dd,*.di">
  <Style name="Default"
  index="0"
  fg="0,0,0"
+ bg="239,240,225"
  bold="0"
  italics="0"
  underlined="0"/>
+ <Style name="Comment"
+ index="1"
+ fg="0,128,0"/>
+ <Style name="Commentline"
+ index="2"
+ fg="0,128,0"/>
+ <Style name="Comment (doc)"
+ index="3"
+ fg="107,107,107"
+ italics="1"/>
  <Style name="Comment (nested)"
  index="4"
+ fg="107,107,107"
+ italics="1"/>
  <Style name="Number"
  index="5"
+ fg="0,100,100"/>
+ <Style name="Keyword 1"
+ index="6"
+ fg="0,0,255"/>
+ <Style name="Keyword 2"
+ index="7"
+ fg="0,0,255"/>
+ <Style name="Keyword 3"
  index="8"
+ fg="0,0,255"/>
+ <Style name="Keyword 4"
  index="9"
+ fg="0,0,255"/>
  <Style name="String"
+ index="10,11,18"
+ fg="219,0,14"/>
+ <Style name="Rawstring"
+ index="19"
+ fg="219,0,14"/>
  <Style name="Character"
  index="12"
+ fg="193,135,0"/>
  <Style name="Operator"
  index="13"
+ fg="0,0,0"/>
+ <Style name="Identifier"
+ index="14"
+ fg="0,0,0"/>
+ <Style name="Commentline (doc)"
+ index="15"
+ fg="107,107,107"
+ italics="1"/>
+ <Style name="Comment keyword (doc)"
+ index="16"
+ fg="0,128,128"
+ italics="1"/>
+ <Style name="Comment keyword error (doc)"
+ index="17"
+ fg="128,0,0"
+ italics="1"
+ bold="1"/>
+ <Style name="Keyword 5"
+ index="20"
+ fg="0,113,240"/>
+ <Style name="Keyword 6"
+ index="21"
+ fg="0,0,102"/>
+ <Style name="Keyword 7"
+ index="22"
+ fg="153,0,112"/>
  <Style name="Selection"
  index="-99"
+ bg="10,36,106"
+ fg="255,255,255"/>
  <Style name="Active line"
  index="-98"
+ bg="231,231,232"/>
  <Style name="Breakpoint line"
  index="-2"
+ bg="150,58,70"
+ fg="255,255,255"/>
  <Style name="Debugger active line"
  index="-3"
+ bg="53,61,100"
+ fg="0,0,0"/>
  <Style name="Compiler error line"
  index="-4"
+ underlined="1"/>
  <Style name="Matching brace highlight"
  index="34"
  fg="255,0,0"
+ bold="1"/>
  <Style name="No matching brace highlight"
  index="35"
  bg="255,0,0"/>
  <Keywords>
+ <Set index="0" value="void byte bool ubyte short ushort int uint long ulong cent ucent float double real ifloat
+ idouble ireal cfloat cdouble creal char wchar dchar body asm bool true false function delegate"/>
+ <Set index="1" value="public private protected with extern
+ final abstract override const debug version pragma public private deprecated protected volatile
+ class struct interface enum new this null delete invariant super union template
+
+ is import module alias typedef with cast package typeof typeid classinfo mixin
+ in out const static inout lazy ref extern export auto align scope pure"/>
+ <Set index="2"
  value="a addindex addtogroup anchor arg attention
  author b brief bug c class code date def defgroup deprecated dontinclude
  e em endcode endhtmlonly endif endlatexonly endlink endverbatim enum example exception
***************
*** 107,112 ****
  sa section see showinitializer since skip skipline struct subsection
  test throw todo typedef union until
  var verbatim verbinclude version warning weakgroup $ @ \ & < > # { }"/>
  </Keywords>
  <SampleCode value="lexer_d.sample"
  breakpoint_line="20"
--- 122,129 ----
  sa section see showinitializer since skip skipline struct subsection
  test throw todo typedef union until
  var verbatim verbinclude version warning weakgroup $ @ \ & < > # { }"/>
+ <Set index="3"
+ value="if for foreach while do assert return unittest try catch else throw switch case break continue default finally goto synchronized"/>
  </Keywords>
  <SampleCode value="lexer_d.sample"
  breakpoint_line="20"
[/code]
Title: Re: (Update: 2010-03-27) D Programming Language Support
Post by: MortenMacFly on March 29, 2010, 10:56:39 am
Code
[...]
Applied just nice over here. Are you sure you are using trunk? It might be an issue with the line feeds on Linux. Take in mind that this patch was for Windows atm. Try a dos2unix at the patch file before applying it under Linux.
Title: Re: (Update: 2010-03-27) D Programming Language Support
Post by: nocide on March 29, 2010, 01:14:55 pm
Hello bernard!

I just tried it myself and it works just fine.
It may be as Morten mentioned, that the lineendings make problems.
So I created a new patch (same content) with unix lineendigns (see post 1)

greets
nocide
Title: Re: (Update: 2010-03-27) D Programming Language Support
Post by: nocide on March 29, 2010, 06:56:29 pm
push (see post 1)
Title: Re: (Update: 03-29) D Programming Language Support
Post by: bernard on March 30, 2010, 12:12:27 am
It's still failing with the same things as before. I have no idea why, I see no real reason for the hunks to fail.
Title: Re: (Update: 03-29) D Programming Language Support
Post by: nocide on March 30, 2010, 08:46:35 am
Ok,
I could reproduce this failure!
Strange, with tortoiseSVN it worked perfect, but with the msys patch-tool I get the same output as you ??
I try to fix!
Title: Re: (Update: 2010-03-29) D Programming Language Support
Post by: nocide on March 30, 2010, 02:09:03 pm
Hello Bernard

I have created a patch with Gnu-diff (GnuWin32) tool.  (see post 1)
This worked for me to patch with TortoiseSVN and the gnu-patch tool.
Please try it out and report back

greets
nocide
Title: Re: (Update: 2010-03-31) D Programming Language Support
Post by: nocide on March 31, 2010, 10:30:11 am
Bugfix:
- added -g option to gdc/linker for debug target
Title: Re: D Programming Language Support
Post by: bernard on March 31, 2010, 11:29:35 pm
Still failing, no clue why. I'm going to manually apply these bastards if I have to!

EDIT: Okay, patch manually applied (D:), compiling now.
Title: Re: D Programming Language Support
Post by: nocide on April 01, 2010, 12:52:36 am
Ok, cool!

I just tried to patch on Kubuntu 9.10 myself, and I'v got the same error.
But this seems to be a known bug by the diff tool, which don't handle the CRNL code correctly.
For future patch I try to make the diff on linux. I just need to patch my workingcopy on linux myself!?!
Title: Re: D Programming Language Support
Post by: MortenMacFly on April 01, 2010, 07:16:45 am
But this seems to be a known bug by the diff tool, which don't handle the CRNL code correctly.
I think still the best way to create a working patch is if you use svn from the command line like:
svn diff > d.patch
Execute this command in the root SVN folder (trunk) of Code::Blocks.
Make sure you always do an svn update on trunk before, otherwise you might get other conflicts.
Title: Re: D Programming Language Support
Post by: nocide on April 01, 2010, 11:19:08 am
svn diff > d.patch
Execute this command in the root SVN folder (trunk) of Code::Blocks.

That's what I have tried.
I also tried svn diff --diff-cmd diff > d.patch to use another diff
tool, but I've got similar result
On win32 this patches works ok, but on linux we get the error as bernard mentioned.
Also a dos2unix or gawk '{ sub("\r$", ""); print }' ... does not help.
It's really strange, I can't see any reason for this failure, when I explore the patch-files.

But I hope I can resolve this issue by going the other way around and create the patches on
linux, which hopefully can applied on win32.
Title: Re: D Programming Language Support
Post by: MortenMacFly on April 01, 2010, 04:59:56 pm
It's really strange, I can't see any reason for this failure, when I explore the patch-files.
Well there is another reason: An incompatible patch application. ;-)
Title: Re: D Programming Language Support
Post by: nocide on April 02, 2010, 05:02:59 pm
Ok, now I have created the patch on linux, and also added the lineendings for windows.
Now it should work on all supported plattforms: (Linux,win32,OSX,freeBSD)

Please report any bugs, specificaly related to the compiler and linker settings.
I am not able to test all compilers on all plattfroms. This would be simply too much work for my sparetime :)

greets
nocide
Title: Re: D Programming Language Support
Post by: nocide on April 10, 2010, 01:44:47 pm
update: 2010-04-10
- some bugfixes (tested on linux/windows)
- now with different auto-detection for D1/D2 (gdc/dmd)
Title: Re: D Programming Language Support
Post by: nocide on April 10, 2010, 05:16:48 pm
update-2: 2010-04-10
- recognized a bug in compilerD.cpp on windows > wxShell does not exist in windows version, replaced with wxExecute
Title: Re: D Programming Language Support
Post by: Andrej08 on June 20, 2010, 06:58:47 pm
I get errors when trying to patch with svn6354:
Code
C:\codeblocks>patch -p0 < d_v8_win.patch
patching file debian/changelog
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file debian/changelog.rej
patching file src/plugins/compilergcc/compilerDMD.h
patching file src/plugins/compilergcc/compilerD.h
patching file src/plugins/compilergcc/compilerGDC.h
patching file src/plugins/compilergcc/compilerDMD.cpp
Hunk #1 succeeded at 7 with fuzz 1.
patching file src/plugins/compilergcc/compilerD.cpp
patching file src/plugins/compilergcc/compilergcc.cpp
patching file src/plugins/compilergcc/compilerGDC.cpp
patching file src/plugins/scriptedwizard/resources/common_functions.script
patching file src/plugins/scriptedwizard/resources/d/console/hello.d
patching file src/plugins/scriptedwizard/resources/d/wizard.script
patching file src/plugins/codecompletion/codecompletion.cpp
patching file src/sdk/resources/lexers/lexer_d.xml
patching file src/sdk/resources/lexers/lexer_d.sample
patching file src/CodeBlocks-unix.cbp
Hunk #1 succeeded at 1140 (offset 14 lines).
patching file src/CodeBlocks.cbp
Hunk #1 succeeded at 1279 (offset 53 lines).

changelog.rej:
Code
***************
*** 1,4 ****
- codeblocks (8.02svn5933) unstable; urgency=low
  
    * more fixes to debian build system, sources and packages are now
      lintian-clean, except for some words guessed as spelling-errors.
--- 1,4 ----
+ codeblocks (8.02svn6198) unstable; urgency=low
  
    * more fixes to debian build system, sources and packages are now
      lintian-clean, except for some words guessed as spelling-errors.

And then I get errors trying to build CB. Build Log:

Code
||=== Code::Blocks, Compiler ===|
C:\codeblocks\src\plugins\compilergcc\compilerD.cpp|40|error: redefinition of 'wxString CompilerD::GetCmdOutput(wxString, wxString, int) const'|
C:\codeblocks\src\plugins\compilergcc\compilerD.cpp|6|error: 'wxString CompilerD::GetCmdOutput(wxString, wxString, int) const' previously defined here|
C:\codeblocks\src\plugins\compilergcc\compilerD.cpp|59|error: redefinition of 'wxString CompilerD::GetCmdOutput(wxString) const'|
C:\codeblocks\src\plugins\compilergcc\compilerD.cpp|25|error: 'wxString CompilerD::GetCmdOutput(wxString) const' previously defined here|
||=== Build finished: 4 errors, 0 warnings ===|
||=== Build finished: 4 errors, 0 warnings ===|

Hope this helps..

Edit: Forgot to mention this is on XP-32bit
Title: Re: D Programming Language Support
Post by: michaelp on June 20, 2010, 11:33:58 pm
Also have problems patching. This is with the 10.05 source.
Code
patching file changelog
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file changelog.rej
patching file compilerDMD.h
Hunk #1 FAILED at 3.
1 out of 1 hunk FAILED -- saving rejects to file compilerDMD.h.rej
patching file compilerD.h
patching file compilerGDC.h
Hunk #1 FAILED at 6.
Hunk #2 succeeded at 18 with fuzz 3 (offset -1 lines).
1 out of 2 hunks FAILED -- saving rejects to file compilerGDC.h.rej
patching file compilerDMD.cpp
Hunk #1 FAILED at 7.
Hunk #2 FAILED at 17.
Hunk #3 succeeded at 110 with fuzz 3 (offset -1 lines).
Hunk #4 FAILED at 153.
3 out of 4 hunks FAILED -- saving rejects to file compilerDMD.cpp.rej
patching file compilerD.cpp
patching file compilergcc.cpp
Hunk #1 FAILED at 393.
1 out of 1 hunk FAILED -- saving rejects to file compilergcc.cpp.rej
patching file compilerGDC.cpp
Hunk #1 FAILED at 24.
Hunk #2 FAILED at 83.
Hunk #3 succeeded at 108 with fuzz 3 (offset -1 lines).
Hunk #4 succeeded at 195 with fuzz 3 (offset -2 lines).
Hunk #5 FAILED at 252.
3 out of 5 hunks FAILED -- saving rejects to file compilerGDC.cpp.rej
patching file common_functions.script
Hunk #1 FAILED at 24.
Hunk #2 FAILED at 65.
Hunk #3 FAILED at 115.
Hunk #4 FAILED at 130.
4 out of 4 hunks FAILED -- saving rejects to file common_functions.script.rej
patching file hello.d
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file hello.d.rej
patching file wizard.script
Hunk #1 FAILED at 17.
Hunk #2 FAILED at 28.
2 out of 2 hunks FAILED -- saving rejects to file wizard.script.rej
patching file codecompletion.cpp
Hunk #1 succeeded at 78 with fuzz 3 (offset -1 lines).
Hunk #2 FAILED at 644.
1 out of 2 hunks FAILED -- saving rejects to file codecompletion.cpp.rej
patching file lexer_d.xml
Hunk #1 FAILED at 3.
Hunk #2 FAILED at 68.
2 out of 2 hunks FAILED -- saving rejects to file lexer_d.xml.rej
patching file lexer_d.sample
Hunk #1 FAILED at 1.
Hunk #2 FAILED at 15.
2 out of 2 hunks FAILED -- saving rejects to file lexer_d.sample.rej
patching file CodeBlocks-unix.cbp
Hunk #1 succeeded at 1125 with fuzz 3 (offset -1 lines).
patching file CodeBlocks.cbp
Hunk #1 succeeded at 1225 with fuzz 3 (offset -1 lines).

Using:
Code
patch -F 100 < d_v8_unix.patch

On Ubuntu 10.04. Didn't try to compile it.
If this could work with the latest SVN, or this release, that would be great.
Title: Re: D Programming Language Support
Post by: stahta01 on June 21, 2010, 12:00:32 am
The command I use to create an unified patch on Windows.
This is the result of reading and lots of trial and error.

My SVN is CollabNet Subversion Client and my patch and unix2dos is from GnuWin32

Code
svn.exe diff --extensions --unified --extensions --ignore-space-change --extensions --ignore-eol-style > my.patch

The command I use to apply the created patch is

Code
unix2dos < my.patch > my-CRLF.patch
patch --backup-if-mismatch --unified --strip=0 --ignore-whitespace --forward --input=my-CRLF.patch

Tim S.
Title: Re: D Programming Language Support
Post by: stahta01 on June 21, 2010, 12:18:25 am
Quote
Start by selecting which strings are translatable and mark them with the _() macro.
From http://wiki.wxwidgets.org/Internationalization
http://www.wxwidgets.org/docs/faqcmn.htm#wxtmacro

You are changing text from _("Words") to _T("Words") this is likely wrong if the words are supposed to be translated.

Code
@@ -83,12 +87,12 @@
 
     m_Options.ClearOptions();
     m_Options.AddOption(_("Produce debugging symbols"),
-                _T("-g"),
-                _("Debugging"),
+                _T("-gc"),
+                _T("Debugging"),
                 _T(""),
                 true,
                 _T("-O -O1 -O2 -O3 -Os"),
-                _("You have optimizations enabled. This is Not A Good Thing(tm) when producing debugging symbols..."));
+                _T("You have optimizations enabled. This is Not A Good Thing(tm) when producing debugging symbols..."));
     wxString gprof_link = _T("-pg");
     if (platform::windows)
         gprof_link = _T("-pg -lgmon");

Tim S.
Title: Re: D Programming Language Support
Post by: bioinfornatics on June 26, 2010, 04:23:18 am
hello, i am a fedora packager and ldc and tango will be go to official fedora repo.
How use LDC compiler with codeblocks ?

beta rpm here: http://bioinfornatics.fedorapeople.org/
Title: Re: D Programming Language Support
Post by: bioinfornatics on July 27, 2010, 01:14:45 pm
ping

Note: ldc has moved to offcial fedora repo
Title: Re: D Programming Language Support
Post by: afb on July 28, 2010, 09:21:45 pm
How use LDC compiler with codeblocks ?

You should be able to create such a feature patch by modifying the GDC support...

However, I don't think LDC (http://www.dsource.org/projects/ldc/) works well with Windows yet (no exception support) ?

Title: Re: D Programming Language Support
Post by: afb on July 28, 2010, 09:24:16 pm
Note: ldc has moved to offcial fedora repo

and gdc is in the official ubuntu repo (for whatever that means).
Title: Re: D Programming Language Support
Post by: bioinfornatics on August 04, 2010, 06:49:22 pm
gdc project is near to death it is the reason why i choose ldc compiler.
And all package about D in ubuntu are outdated for this reason i use fedora for D programming
Title: Re: D Programming Language Support
Post by: michaelp on August 15, 2010, 08:29:13 pm
GDC is active!

See http://bitbucket.org/goshawk/gdc/wiki/Home (http://bitbucket.org/goshawk/gdc/wiki/Home) for more information.
Title: Re: D Programming Language Support
Post by: afb on August 18, 2010, 12:54:14 pm
GDC is active!

See http://bitbucket.org/goshawk/gdc/wiki/Home (http://bitbucket.org/goshawk/gdc/wiki/Home) for more information.

I'm not sure if Tango (http://www.dsource.org/projects/tango/) works with GDC any more, the latest release (0.99.9) only said DMD and LDC.

On the other hand I'm not sure if Phobos (http://www.digitalmars.com/d/1.0/phobos/phobos.html) works with LDC, maybe that was why Fedora chose Tango.
Title: Re: D Programming Language Support
Post by: michaelp on August 20, 2010, 04:56:03 am
GDC isn't officially supported by Tango, but I think that it is quite possible to get Tango compiling with GDC without much effort.

And LDC comes with Tango rather than Phobos. I'm not sure if LDC actually works with Phobos though.
Title: Re: D Programming Language Support
Post by: afb on August 20, 2010, 01:13:03 pm
GDC isn't officially supported by Tango, but I think that it is quite possible to get Tango compiling with GDC without much effort.

It used to work in Tango 0.99.8, as long as you used GDC trunk and not 0.24.
Not sure about Windows though, recall there were some issues with MinGW...

* http://dsource.org/projects/tango/wiki/0_99_8_GdcDownloads
Title: Re: D Programming Language Support
Post by: bioinfornatics on August 23, 2010, 05:51:53 pm
so LDC support will be great
thanks
Title: Re: D Programming Language Support
Post by: afb on August 26, 2010, 12:52:53 pm
so LDC support will be great

I'll do it. Some of the D2 support will take longer, though.
But GDC/LDC doesn't work very well with D2 yet anyway.

Changes to "hello.d" won't work with Tango, so a no-go...
(that silly old printf example is still the upstream default)
Title: Re: D Programming Language Support
Post by: bioinfornatics on August 27, 2010, 05:39:02 pm
Code
import tango.io.Stdout;
void main(){
    Stdout("Hello word").nl;//print to stdout
}
Title: Re: D Programming Language Support
Post by: afb on August 27, 2010, 09:07:56 pm
Code
import tango.io.Stdout;
void main(){
    Stdout("Hello word").nl;//print to stdout
}

And that doesn't work with Phobos... See how that's a problem ? :-)

So for each application, you'd need to choose which library to use.

Or use something silly, like printf or lots of version() statements.

Code
version (Tango)
import tango.io.Stdout;
else // Phobos
import std.stdio;

void main()
{
  version (Tango)
  Stdout ("Hello, World!").newline;
  else // Phobos
  writefln("Hello, World!");
}

And that's after choosing between using D and D2 (like C and C++).
Title: Re: D Programming Language Support
Post by: afb on August 27, 2010, 09:19:06 pm
By the way, if you want GDC there's http://gdcgnu.sourceforge.net/
It's for an older version of Fedora (like 5) and GCC (than 4.5), though.

But it comes with either of Phobos (standard) or Tango (alternative).
Just add GCC: https://sourceforge.net/projects/gdcgnu/files/gdc/r229/
Title: Re: D Programming Language Support
Post by: bioinfornatics on September 03, 2010, 03:13:53 am
Now codeblocks support ldc  :P
How to: http://blog.fedora-fr.org/bioinfornatics/ (http://blog.fedora-fr.org/bioinfornatics/)
But they are not yet a smart auto completion  :?

I can not add gdc to fedora because gdc team do not want merge with gcc project is a big problem, and they support only an old gcc release alwayse gcc version -1. If they do no not change this they will go never in fedora.

Any question need submit here: https://bugzilla.redhat.com/show_bug.cgi?id=628269 (https://bugzilla.redhat.com/show_bug.cgi?id=628269)
Title: Re: D Programming Language Support
Post by: afb on September 03, 2010, 08:50:31 am
Now codeblocks support ldc  :P
How to: http://blog.fedora-fr.org/bioinfornatics/ (http://blog.fedora-fr.org/bioinfornatics/)

You are welcome. ;-)

By the way, you don't need to set the "Tango" and "Posix" versions since they are pre-defined by the system...

Quote
But they are not yet a smart auto completion  :?

There are several things missing from D support. Mostly because it is implemented as a "weird C++ compiler", rather than adding any new PROGRAM_D feature to Code::Blocks. But it should work well enough as a basic IDE, and it could eventually work for doing GUI:

(http://wxd.sourceforge.net/wxd-codeblocks-wizard.png) (http://wxd.sourceforge.net/wxd-minimal-wxgtk28.png)

The wizard feature isn't done, but you can build code ? There's details on http://wxd.sourceforge.net/. It should even limp along with LDC, although getting the `wx-config --libs` into the CB project is a nightmare because of the weird syntax. (so use make COMPILER=LDC LIBRARY=Tango)

Quote
I can not add gdc to fedora because gdc team do not want merge with gcc project is a big problem, and they support only an old gcc release alwayse gcc version -1. If they do no not change this they will go never in fedora.

I know, that has always been the case (and the reason for setting up gdcgnu.repo (http://gdcgnu.sourceforge.net/)). It cannot be merged into GCC because of copyright assignments, and it lags behind the latest release sufficiently to make it unavailable in Fedora.

But for other distributions, that allow more than one version of GCC, it is available in the repositories. Like Ubuntu (http://packages.ubuntu.com/gdc) or FreeBSD (http://cvsweb.freebsd.org/ports/lang/gdc). But I suppose there could be a new package of "gcc43-d" (containing gdc-4.3) made for it...
Title: Re: D Programming Language Support
Post by: bioinfornatics on September 03, 2010, 01:38:36 pm
ok i found the spec file if i have enough time i wil add gdc in fedora repo

I do not understand what is your picture?
Title: Re: D Programming Language Support
Post by: afb on September 04, 2010, 09:25:22 am
I do not understand what is your picture?

Well, currently you have one "Console Application" (for C/C++) and one "D Application" (for D). It would be more integrated if there was just one "Console Application" project (for C/C++/D)

And this extends to most of the other projects too, such as the "wxWidgets" project shown there. It would use something like minimal.d (http://wxd.sourceforge.net/Minimal.html) instead of the corresponding minmal.cpp (http://wxd.sourceforge.net/minimal.cpp), to make a GUI ?

At least that was the original idea...

You could also use GtkD (http://www.dsource.org/projects/gtkd) or SDL, GL.

Title: Re: D Programming Language Support
Post by: bioinfornatics on September 05, 2010, 01:28:34 pm
i seen you are wxd developper, but this project has a very low activity no?
Title: Re: D Programming Language Support
Post by: afb on September 06, 2010, 09:04:39 am
i seen you are wxd developper, but this project has a very low activity no?

Yeah, and it's the same with GDC. The "offical" projects are DMD and QtD.
Maybe the "alternative" projects like LDC/Tango/DWT/etc can change that.

And there's plenty of room for new volunteers. ;-)

I'll keep the life-support plugged in on GDC/wxD (and C::B), meanwhile...
But I don't have any plans to update it to D2/wx3, or add D language to CB.

Original idea* was for a free GCC/GUI/IDE combination.

* http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=46121
* http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=19951

That was back in 2007, when D 1.00 was first released...
Title: Re: D Programming Language Support
Post by: nocide on September 29, 2010, 10:00:40 am
since the patch in the firsts post is partially applied, I have removed it to prevent confusion.

Quote
But I don't have any plans to [...] add D language to CB.
that's a pity ..
Title: Re: D Programming Language Support
Post by: afb on September 29, 2010, 02:34:15 pm
Quote
But I don't have any plans to [...] add D language to CB.
that's a pity ..

Of course, that doesn't mean that someone else couldn't do it instead ?
And it should continue to work in "C++ mode", until D mode is added...

As I see it, providing a GUI and IDE is something for the vendor of DMD.
wxD and C::B was the attempt for GDC and D 1.0, but it didn't work out.
Title: Re: D Programming Language Support
Post by: gour on October 11, 2010, 02:40:36 pm
And this extends to most of the other projects too, such as the "wxWidgets" project shown there. It would use something like minimal.d (http://wxd.sourceforge.net/Minimal.html) instead of the corresponding minmal.cpp (http://wxd.sourceforge.net/minimal.cpp), to make a GUI ?

I'm new to CodeBlocks as well to D and in the phase of choosing the right tools for our open-source project.

Considering that we plan to use QtD (http://bitbucket.org/qtd/repo/) and that CodeBlocks is open-source, have you thought about adding some (more) specific support (if required) to be able to develop Qt applications using CB IDE?
Title: Re: D Programming Language Support
Post by: oBFusCATed on October 11, 2010, 02:51:17 pm
There were several (at least two) QT plugins, non of them is supported, search the forums for details.
Title: Re: D Programming Language Support
Post by: afb on October 11, 2010, 03:48:45 pm
And this extends to most of the other projects too, such as the "wxWidgets" project shown there. It would use something like minimal.d (http://wxd.sourceforge.net/Minimal.html) instead of the corresponding minmal.cpp (http://wxd.sourceforge.net/minimal.cpp), to make a GUI ?

I'm new to CodeBlocks as well to D and in the phase of choosing the right tools for our open-source project.

Considering that we plan to use QtD (http://bitbucket.org/qtd/repo/) and that CodeBlocks is open-source, have you thought about adding some (more) specific support (if required) to be able to develop Qt applications using CB IDE?

Yes, it could be extended to other project templates too (beyond "Console" and "wxWidgets"), such as "GTK+ project" (GtkD (http://www.dsource.org/projects/gtkd)) and "Qt4 project" (QtD (http://www.dsource.org/projects/qtd)). Or "SDL project" or "OpenGL project", etc.

But adding a new D to Code::Blocks, next to the C and CPP, is still the biggest change needed.

Code
/// Struct to keep programs
struct CompilerPrograms
{
    wxString C; // C compiler
    wxString CPP; // C++ compiler

Once Code::Blocks knows the difference between C++ and D, it's easier to teach the wizards ?

The difference between D and D2 is more like the difference between C and C99 or C++ and C++0x, so that should be a smaller change even it requires running a different program rather just than a switch.

The hardest part is getting the code-completion to work with D, without "cheating" (i.e. C/C++).
Title: Re: D Programming Language Support
Post by: gour on October 11, 2010, 04:26:27 pm
Yes, it could be extended to other project templates too (beyond "Console" and "wxWidgets"), such as "GTK+ project" (GtkD (http://www.dsource.org/projects/gtkd)) and "Qt4 project" (QtD (http://www.dsource.org/projects/qtd)). Or "SDL project" or "OpenGL project", etc.

But adding a new D to Code::Blocks, next to the C and CPP, is still the biggest change needed.

This sounds encouraging (for potential D developers).  :D

Quote
The difference between D and D2 is more like the difference between C and C99 or C++ and C++0x, so that should be a smaller change even it requires running a different program rather just than a switch.

Do C:B devs have such things on their TODO or do you suggest submitting some feature requests to the bug tracker?

Quote
The hardest part is getting the code-completion to work with D, without "cheating" (i.e. C/C++).

As far as I'm concerned, I'm coming from Haskell world (where there is very nice haskell-mode for Emacs) to the D and, (most probably, afaict) D-mode is not as 'intelligent' as former.

However, I've hope that I can (softly) suggest to all the members of the team to accept CodeBlocks as multi-platform IDE for our project, so having decent support for D would be terrific.  :wink:
 
Title: Re: D Programming Language Support
Post by: bioinfornatics on December 06, 2010, 10:45:50 pm
some news about D support on codeblocks ?
what is the status?
Title: Re: D Programming Language Support
Post by: bioinfornatics on January 18, 2011, 12:07:10 am
ping  :P
Title: Re: D Programming Language Support
Post by: wangdong1226 on January 18, 2011, 02:52:30 am
I would support this topic also.

We still need the info that does CodeBlocks have some kind of timeschedule for that?

More and more people noticing and will using D in future, and D itself is growing every day.
please notice the stauts under this link: http://www.dsource.org/projects/phobos/timeline

It is strongly recommended that CodeBlocks should fully support D (basicly, it should starting from codecompletion for D. )
Title: Re: D Programming Language Support
Post by: ollydbg on January 18, 2011, 04:18:32 am
I would support this topic also.

We still need the info that does CodeBlocks have some kind of timeschedule for that?

More and more people noticing and will using D in future, and D itself is growing every day.
please notice the stauts under this link: http://www.dsource.org/projects/phobos/timeline

It is strongly recommended that CodeBlocks should fully support D (basicly, it should starting from codecompletion for D. )
As I know, no body was working on D codecompletion. :(

You can read the source code about the c/c++ parser in the current implementation of CodeCompletion plugin , and wrote a similar for D parser.  :D
Title: Re: D Programming Language Support
Post by: afb on January 23, 2011, 01:03:59 am
some news about D support on codeblocks ?
what is the status?

I don't know about anyone working on D2 support for Code::Blocks,
or D code completion. Think the LDC support was somewhat functional ?
(Or at least I haven't seen too many major bug reports about it yet...)
So the current Status Quo will be kept, until someone steps up to develop.
Title: Re: D Programming Language Support
Post by: bioinfornatics on January 25, 2011, 02:16:29 am
ldc works fine  with codeblock :D

me i a m too busy this time but if someone could contribute forr improve D support he is welcome  :P
Title: Re: D Programming Language Support
Post by: bioinfornatics on February 06, 2011, 01:39:39 pm
i have stopped to works with code::blocks in D programming. now i use geany it is better, syntax hightlighting, autcompletion support all compiler and makefile.
Title: Class Browser not working
Post by: Marenz on August 31, 2011, 02:40:59 pm
Hello there,

I just created a D project and added all the files. Compilation works fine (using my Makefile) from within codeblocks and also without it (though i get expected linker errors, but nevermind that)

The only thing really not working is the Class/Symbol Browser (The thing under Managment -> Tabs). It shows no symbols at all :(

I know it worked in the past, so I don't understand why it doesn't work anymore.. I am using D1.

I just looked at the terminal when codeblocks is starting and when I open the project.. and it says:

Code
Loading project file...
Parsing project file...
Loading target debug
Loading target main
Loading project files...
9 files loaded
Done loading project in 1ms
Project's base path: /home/mathias/workspace/Cliff/
Project's common toplevel path: /home/mathias/workspace/Cliff/
Text seems to be pure ASCII!
We use user specified encoding: Unicode 8 bit (UTF-8) (ID: 41)
Final encoding detected: Unicode 8 bit (UTF-8) (ID: 41)
Editor Open
project data set for /home/mathias/workspace/Cliff/src/mod/cliff/Cliff.d
Text seems to be pure ASCII!
We use user specified encoding: Unicode 8 bit (UTF-8) (ID: 41)
Final encoding detected: Unicode 8 bit (UTF-8) (ID: 41)
Editor Open
project data set for /home/mathias/workspace/Cliff/src/core/process/BidAggregator.d
Text seems to be pure ASCII!
We use user specified encoding: Unicode 8 bit (UTF-8) (ID: 41)
Final encoding detected: Unicode 8 bit (UTF-8) (ID: 41)
Editor Open
project data set for /home/mathias/workspace/Cliff/src/main/cliff.d
Top Editor: /home/mathias/workspace/Cliff/src/core/process/BidAggregator.d
Passing list of files to batch-parser.
Create new parser for project 'Cliff'
Unexpected behavior! in project 'Cliff'

Any pointers?

Oh yea, this is with the latest nightly build: svn 7419

   --Marenz
Title: Re: D Programming Language Support
Post by: oBFusCATed on August 31, 2011, 03:45:20 pm
The code-completion is C/C++ only.
It might have worked in the past, because D looks like C/C++ (sometimes), but there is no guarantee that it will work in the future or for every project.
If you want to have CC for D in C::B the only solution is to step up and implement one.
If you use a existing parser it should not be that hard.
You only have to know to program in C++ and wxWidgets (this is not a requirement, because the lib is not that hard).
Title: Re: D Programming Language Support
Post by: Marenz on August 31, 2011, 03:53:34 pm
I don't want any code completion. I just want the class browser in the "Symbols" tab to work again.
Title: Re: D Programming Language Support
Post by: ollydbg on August 31, 2011, 04:17:24 pm
I don't want any code completion. I just want the class browser in the "Symbols" tab to work again.
D language has the different syntax or semantic grammar, and we only have c/c++ parser. class browser also need the c/c++ parser to collect the tags/tokens.

As obf said, we only implement c/c++ parser. Currently no D parser is implemented. So, no idea to support class browser for D language.
Title: Re: D Programming Language Support
Post by: Marenz on August 31, 2011, 06:15:49 pm
Hmm I see. So it probably worked in the past and doesn't work anylonger because you made the parser for c++ smarter?

Is syntax hilighting related to this? Because that does still work.

  --Marenz
Title: Re: D Programming Language Support
Post by: oBFusCATed on August 31, 2011, 06:46:45 pm
No, the syntax highlighter is implemented inside wxScintilla. The editor component, we are using.