Page 1 of 2

Cobra 0.9.6

PostPosted: Mon Dec 23, 2013 12:03 pm
by Charles
I'm happy to announce that Cobra 0.9.6 has been released full of refinements and fixes. As usual, there is a package for Windows and another for Mac/Linux/Unix-like.

Thanks to everyone who contributed through patches, bug reports, help with the web site, satellite projects like MonoDevelop/Xamarin, etc. Credits are on the release notes wiki page.

Thanks to nerdzero, there have also been a number of improvements to the MonoDevelop/Xamarin Studio add-in for Cobra. The latest version includes support for mouseover tooltips, method parameter completion tooltips, support for building a Cobra project file using MSBuild or XBuild, and a new Go To Declaration right-click command.

Also, thanks to GitHub user sephthir, you can now install the add-in using the MonoDevelop Add-In Manager. Add the repository using the Add-In Manager to install the precompiled add-in package. This repository hosts the latest stable versions of the add-in. If you prefer the latest development version, you can install from source using the master branch on the GitHub repository at See the file for more details on installing from source and how you can help contribute with development or testing.

Please help get the word out to friends and colleagues.

Re: Cobra 0.9.6

PostPosted: Wed Dec 25, 2013 1:43 am
by kobi7

Re: Cobra 0.9.6

PostPosted: Sat Dec 28, 2013 12:08 pm
by torial
Installing workspace on a mac OSX, I had an exception trying to copy to /usr/local/bin, but I had a /usr/sbin directory, so changed installfromworkspace.cobra to use that instead. Not sure if that will cause problems, but then it ran w/o a hitch.

Re: Cobra 0.9.6

PostPosted: Sat Dec 28, 2013 2:48 pm
by Charles
I'm willing to update the installer, but "sbin" is for administrative and management commands. Any reason you didn't go with "/usr/bin"?

Looking at these command line tools that I have on my Mac:

$ type -a hg
hg is /usr/local/bin/hg
hg is /Library/Frameworks/Python.framework/Versions/2.5/bin/hg
hg is /usr/local/bin/hg

$ type -a git
git is /usr/local/git/bin/git
git is /usr/bin/git
git is /usr/local/git/bin/git

$ type -a svn
svn is /opt/subversion/bin/svn
svn is /usr/bin/svn

... it looks like what I'll do is have the installer check for /usr/local/bin and then /usr/bin. I'll also clean it up to give a nice warning if it can't find either.

Thanks for the report.

Re: Cobra 0.9.6

PostPosted: Sat Dec 28, 2013 4:10 pm
by torial
sbin was certainly due to ignorance and sloppiness as I was also kind of rushing when I was looking at my "ls" results on /usr.

Re: Cobra 0.9.6

PostPosted: Sat Dec 28, 2013 6:32 pm
by Charles
No problem. I was just checking.

Re: Cobra 0.9.6

PostPosted: Sat Dec 28, 2013 8:16 pm
by Charles
Should work now. Let me know if you any problems.

Re: Cobra 0.9.6

PostPosted: Sat Dec 28, 2013 8:16 pm
by Charles
Btw there is an error message so you shouldn't have gotten an exception. If you get one again, please paste it here. Thanks.

Re: Cobra 0.9.6

PostPosted: Wed Jan 01, 2014 2:11 am
by kobi7
did the syntax for attributes changed?

I'm doing:
enum Options
has Flags
unknown = 1
one = 2
two = 4
three = 8

and get:
Error: Cannot find "Flags".

Do I need to "use" some kind of library?
Thanks, kobi

Re: Cobra 0.9.6

PostPosted: Wed Jan 01, 2014 3:22 am
by Charles
This will be interesting. Works for me:
# x-flags.cobra
enum Options
has Flags
unknown = 1
one = 2
two = 4
three = 8

class P

def main
print 'done.'

Code: Select all
cobra -v x-flags.cobra

Code: Select all
Cobra Command Line svn:3090 (post 0.9.6) / 2013-12-31
Copyright (C) 2003-2014 by Cobra Language LLC.

OS Version:   Microsoft Windows NT 6.2.9200.0
CLR Platform: .NET
CLR Version:  4.0.30319.34003
Current Directory: C:\Users\Chuck\Documents\Local\cobra-workspace-clean-test\Source
Current Exe: C:\Users\Chuck\Documents\Local\cobra-workspace-clean-test\Source\cobra.exe
Option Dictionary:
    verbosity: 1
    back-end: 'none'
    contracts: 'inline'
    copy-core: false
    correct-source: Set<of String>['none']
    debug: '1'
    debugging-tips: true
    embed-run-time: false
    embed-version: 'compiler-version'
    include-asserts: true
    include-nil-checks: true
    include-tests: true
    include-traces: true
    native-compiler: 'auto'
    number: 'decimal'
    test-runner: 'Cobra.Core.CobraCore.runAppTests'
    testify-results: 'r-testify.text'
    library-directory: List<of String>[]
Phase: Binding Cobra run-time library
Adding reference to Cobra.Core.dll
Adding reference to System.Core.dll
Phase: Reading libraries
Reading assembly:  mscorlib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089
              at:  C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscorlib.dll
Reading assembly:  System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089
              at:  C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll
Loading reference: Cobra.Core.dll
Reading assembly:  Cobra.Core, Version=0.0.3090.1, Culture=neutral, PublicKeyToken=null
              at:  C:\Users\Chuck\Documents\Local\cobra-workspace-clean-test\Source\Cobra.Core.dll
Loading reference: System.Core.dll
Reading assembly:  System.Core, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089
              at:  C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll
Phase: Parsing source code
Phase: Binding use directives
Phase: Binding inheritance
Phase: Binding interface
Phase: Binding mixins
Phase: Computing matching base members
Phase: Binding implementation
Phase: Identifying .main
Phase: Generating C# code
Phase: Compiling C# code
Compiling to produce x-flags.exe
Deleting intermediate files.
Phase: Checking if a default number type should be suggested
Running: x-flags