Forums

IDE support sucks

General discussion about Cobra. Releases and general news will also be posted here.
Feel free to ask questions or just say "Hello".

Re: IDE support sucks

Postby torial » Wed Jul 25, 2012 10:39 am

Kudos - great work.

Btw, there is an old project for SharpDevelop support at http://cobrapluginsd.codeplex.com/, and you may be able to extract some useful stuff from it as well.

Video was great.
torial
 
Posts: 227
Location: IA

Re: IDE support sucks

Postby nerdzero » Wed Jul 25, 2012 11:15 am

Thanks, after work/class tonight, I'll create a Readme file with instructions and push the repo to GitHub and if not tonight then tomorrow.

You'll see what I mean when I say it's a bit of a hack. It generates the compiler arguments as a string and then just spawns a process relying on the cobra script/batch file being in the path. Ideally, it would instantiate an instance of the Cobra compiler and then invoke the appropriate methods, etc. I'll check out that SharpDevelop code to see how it's done.

Another thing to note is that I could not get this to work on MonoDevelop 3.0.X which is the latest stable release. 2.8.6 is what is available from the Ubuntu 12.04 LTS repos. Seems there were a few changes to the language binding interfaces and the documentation is a bit out of date.

Oh, and the WinForms thing was just an example. I was amazed it worked at all :D
nerdzero
 
Posts: 286
Location: Chicago, IL

Re: IDE support sucks

Postby Charles » Wed Jul 25, 2012 11:35 am

I think we're okay with the external invocation as this gives you a clean start each time. I worry about whether or not using Cobra.Compiler.dll repeatedly will suffer from side effects.

I've heard about the MonoDevelop 2.8 vs 3.0 differences as well. I guess we'll tackle that in due time.

Stubbing out autocompletion, even with just choices "a", "b" and "c", could be another interesting baby step.
Charles
 
Posts: 2510
Location: Los Angeles, CA

Re: IDE support sucks

Postby nerdzero » Wed Jul 25, 2012 7:49 pm

Okay, it's up!

https://github.com/ramon-rocha/MonoDevelop.CobraBinding

Feel free to fork and go nuts or just browse the code and provide feedback.
nerdzero
 
Posts: 286
Location: Chicago, IL

Re: IDE support sucks

Postby Charles » Thu Jul 26, 2012 4:38 pm

I took it for a test drive on Ubuntu with MonoDevelop 2.8. Works great.

I emailed you a patch to parse the compiler messages (warnings and errors).
Charles
 
Posts: 2510
Location: Los Angeles, CA

Re: IDE support sucks

Postby nerdzero » Thu Jul 26, 2012 5:56 pm

Awesome. Glad it worked.

Got the patch and I'll apply it soon. I am a bit nervous about targeting the 2.8 series as opposed to 3.0. The download links on the MonoDevelop website for Windows and Mac provide the 3.0 series and it's a bit of googling to find packages for the older version. Also, I'll only be able to test on Ubuntu and Windows.
nerdzero
 
Posts: 286
Location: Chicago, IL

Re: IDE support sucks

Postby Charles » Thu Jul 26, 2012 6:07 pm

Are there any docs or discussions on the 3.0 API vs. the 2.8?
Charles
 
Posts: 2510
Location: Los Angeles, CA

Re: IDE support sucks

Postby nerdzero » Thu Jul 26, 2012 6:34 pm

Not that I could find. I'll dig around some more and ask on their forums if I can't figure it out.
nerdzero
 
Posts: 286
Location: Chicago, IL

Re: IDE support sucks

Postby jaegs » Thu Jul 26, 2012 7:55 pm

I managed to find a Mac .dmg for 2.8 here: link

There is a slight change that needs to be made so that the binding works on OS X. In CobraLanguageBinding.cs, add
Code: Select all
proc.StartInfo.WorkingDirectory = "/";
jaegs
 
Posts: 58

Re: IDE support sucks

Postby nerdzero » Thu Jul 26, 2012 8:40 pm

I'll make the change, jaegs and thanks for finding that link.

Charles, I'm testing the patch and the regex doesn't seem to match these errors:

foo.cobra(4,15): error: Expecting an expression.

or

error: Cannot load reference "Cobra.Core.dll" due to: Could not find file.

I think the first one is due to the comma inside the parenthesis and that second one is from something not going quite right with my installation of the latest compiler version from source which didn't match because it had no parenthesis in it. They should both be easy to fix but what code in the compiler can I look at to see how the final error/warning messages are constructed once they are thrown?
nerdzero
 
Posts: 286
Location: Chicago, IL

PreviousNext

Return to Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron