See Node.cobra's SourceException. The error with the comma was probably a catch by the back-end C# compilation.
Anyway, you can just add those two cases, using http://regexhero.net/tester/ to test the regex. Or if you want, I can send you another patch.
Forums
IDE support sucks
31 posts
• Page 3 of 4 • 1, 2, 3, 4
Re: IDE support sucks
I'm sure you have bigger fish to fry. I'll add the additional cases tonight or tomorrow. Thanks for the patch.
I've also found that MonoDevelop 3.0 is using the https://github.com/icsharpcode/NRefactory library which I believe is also used by SharpDevelop for code completion and refactoring. 3.0 sounds pretty nice. I think after applying the error parsing patch and some other tweaks, I'll create a branch of the addin for MonoDevelop 3.0.
I've also found that MonoDevelop 3.0 is using the https://github.com/icsharpcode/NRefactory library which I believe is also used by SharpDevelop for code completion and refactoring. 3.0 sounds pretty nice. I think after applying the error parsing patch and some other tweaks, I'll create a branch of the addin for MonoDevelop 3.0.
- nerdzero
- Posts: 286
- Location: Chicago, IL
Re: IDE support sucks
Patch applied and repo updated. Error and warnings highlight the appropriate lines.
Also, working directory is set to "/" on non-Windows systems before starting the compiler process. I can't test this on Mac but it didn't seem to break anything for me on Ubuntu.
Also, working directory is set to "/" on non-Windows systems before starting the compiler process. I can't test this on Mac but it didn't seem to break anything for me on Ubuntu.
- Attachments
-
- error_highlighting.png (108.54 KiB) Viewed 22622 times
- nerdzero
- Posts: 286
- Location: Chicago, IL
Re: IDE support sucks
Bah, spoke a little too soon. Was working with a previous build. I get this message with the working directory set to "/": Error: error: COBRA INTERNAL ERROR / UnauthorizedAccessException / Access to the path "//MainWrapper.cobra.cs" is denied. (ConsoleTest1)
I'll revert that change until I figure it out.
I'll revert that change until I figure it out.
- nerdzero
- Posts: 286
- Location: Chicago, IL
Re: IDE support sucks
I'm actually not less confident that the "/" is the problem.
So when I first tried the addin, on build I got the following compiler output
I added in the Current Directory slash, updated the addin .dll and the error went away. Then the error came back. Clearly something finicky is happening.
So when I first tried the addin, on build I got the following compiler output
- Code: Select all
Building: HelloWorld (Release|x86)
Building Solution HelloWorld
Building: HelloWorld (Release|x86)
Performing main compilation...
---------------------- Done ----------------------
Build successful.
Build failed. ApplicationName='cobra', CommandLine='-compile -debug:full -target:exe -out:"/Users/test/Documents/Cobra/HelloWorld2/HelloWorld2/bin/Release/HelloWorld2.exe" "/Users/test/Documents/Cobra/HelloWorld2/HelloWorld2/MyProgram.cobra"', CurrentDirectory=''
I added in the Current Directory slash, updated the addin .dll and the error went away. Then the error came back. Clearly something finicky is happening.
- jaegs
- Posts: 58
Re: IDE support sucks
This is strange. If I'm following you correctly (bear with me)...
1) You opened the MonoDevelop.CobraBinding solution and built the addin successfully
2) You moved the generated DLL to the correct folder
3) Restarted MonoDevelop
4) Created a Cobra project. It failed to compile.
5) You switched back to the C# solution and rebuilt the addin after adding proc.StartInfo.WorkingDirectory = "/" to the compile method.
6) You moved the newly generated DLL to the correct folder
7) Restarted MonoDevelop
8) Created a Cobra project. It compiled.
9) ???
10) Cobra projects no longer compile.
Is this correct?
1) You opened the MonoDevelop.CobraBinding solution and built the addin successfully
2) You moved the generated DLL to the correct folder
3) Restarted MonoDevelop
4) Created a Cobra project. It failed to compile.
5) You switched back to the C# solution and rebuilt the addin after adding proc.StartInfo.WorkingDirectory = "/" to the compile method.
6) You moved the newly generated DLL to the correct folder
7) Restarted MonoDevelop
8) Created a Cobra project. It compiled.
9) ???
10) Cobra projects no longer compile.
Is this correct?
- nerdzero
- Posts: 286
- Location: Chicago, IL
Re: IDE support sucks
That's a good summary, lol. Obviously there is something missing in my description or it would make more sense.
Also, on step 9, I ran a Hello World.
I tried running the compiler string directly in Terminal
Also, on step 9, I ran a Hello World.
I tried running the compiler string directly in Terminal
- Code: Select all
test$ cobra -compile -debug:full -target:exe -out:"/Users/test/Documents/Cobra/HW/HW/bin/Debug/HW.exe" "/Users/test/Documents/Cobra/HW/HW/MyProgram.cobra"
Compilation succeeded
- jaegs
- Posts: 58
Re: IDE support sucks
The Cobra compiler might generate any kind of .cs file for its purposes, including the MainWrapper.cobra.cs you mentioned. So the working directory needs to be one where you have write access. Presumably, the best choice is the project solution's directory.
- Charles
- Posts: 2515
- Location: Los Angeles, CA
Re: IDE support sucks
Gosh, I actually forgot that Cobra generates cs files even with that error message smacking me right in the face. I feel dumb. Yeah, either the solution directory or the output directory makes sense then. I'll give it a shot.
- nerdzero
- Posts: 286
- Location: Chicago, IL
Re: IDE support sucks
No problem. With multiple people working on this, it's progressing quickly. Gauthier has agreed to dust off the Cobra CodeDom, so that's another parallel effort in place.
If we keep the momentum, we'll be sitting pretty.
If we keep the momentum, we'll be sitting pretty.
- Charles
- Posts: 2515
- Location: Los Angeles, CA
31 posts
• Page 3 of 4 • 1, 2, 3, 4
Who is online
Users browsing this forum: No registered users and 33 guests