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.
Forums
IDE support sucks
31 posts
• Page 2 of 4 • 1, 2, 3, 4
Re: IDE support sucks
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
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
- nerdzero
- Posts: 286
- Location: Chicago, IL
Re: IDE support sucks
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.
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: 2515
- Location: Los Angeles, CA
Re: IDE support sucks
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.
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
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).
I emailed you a patch to parse the compiler messages (warnings and errors).
- Charles
- Posts: 2515
- Location: Los Angeles, CA
Re: IDE support sucks
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.
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
Are there any docs or discussions on the 3.0 API vs. the 2.8?
- Charles
- Posts: 2515
- Location: Los Angeles, CA
Re: IDE support sucks
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
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
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
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?
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
31 posts
• Page 2 of 4 • 1, 2, 3, 4
Who is online
Users browsing this forum: No registered users and 10 guests