Forums

Using Cobra from the lastest source code

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

Re: Using Cobra from the lastest source code

Postby relez » Sun Sep 21, 2008 3:21 pm

I followed your istructions and now it's all right.
I tried under italian and US settings and both ways (cobra hello.cobra and hello.exe) are ok.
Tk u.
relez
 
Posts: 69

Re: Using Cobra from the lastest source code

Postby Charles » Mon Sep 22, 2008 2:22 am

No problem. Thanks for your patience and bug report.

-Chuck
Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: Using Cobra from the lastest source code

Postby arisawa » Tue Sep 23, 2008 1:36 am

Excuse me.

I ran "comp.bat" to try a new source and succeeded and got slightly bigger "cobra.exe".

However, where is new "Cobra.Lang.dll" ?
arisawa
 
Posts: 51

Re: Using Cobra from the lastest source code

Postby Charles » Tue Sep 23, 2008 5:17 am

You can build it with:

cobra -bsl

-bsl is an abbreviation for -build-standard-library. Also, if you want to see more details of what's going on, try:

cobra -bsl -v

This information and more is found in the beginning of the Developer\ImplementationNotes.text file next door to the Source directory.
Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: Using Cobra from the lastest source code

Postby gauthier » Tue Sep 23, 2008 1:49 pm

I'm getting the same problem with latest rev using fr-FR settings, it seems to be formatting issue with decimal?

it's ok with en-US settings

Code: Select all
An unhandled exception has occurred.

Cobra debugging tips:
    To get file name and line number information for the stack frames, use:
        cobra -debug foo.cobra
    To get a post-mortem, HTML-formatted report with more details about your objects:
        cobra -debug -exception-report foo.cobra
    For even more information, try:
        cobra -debug -exception-report -detailed-stack-trace foo.cobra
    Or use the abbreviations:
        cobra -d -er -dst foo.cobra


Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Cobra.Lang.AssertException:
sourceSite = C:\home\dev\src\dotnet\projects\cobralanguage\Source\snapshot\CobraLang.cobra:1956 in StringMaker.testCases for object Cobra.Lang.PrintStringMaker
info       = nil
this       = PrintStringMaker('Cobra.Lang.PrintStringMaker')
    (.makeString(6.0, 'N2') == '6.00') = false
        .makeString(6.0, 'N2') = '6,00'

   at Cobra.Lang.StringMaker.TestCases(IList cases)
   at Cobra.Lang.PrintStringMaker.test_MakePrintString()
   at Cobra.Lang.PrintStringMaker.RunTestsIfNeeded()
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
   at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at Cobra.Lang.CobraCore._runAllTests(Assembly ass, Dictionary`2 found)
   at CobraMain.Main()

gauthier
 
Posts: 116

Re: Using Cobra from the lastest source code

Postby Charles » Tue Sep 23, 2008 3:18 pm

The source code that the assert statement is reporting is old. I just updated it the other day to:

assert .makeString(6.0, 'N2') in ['6.00', '6,00']

Do an "svn up" and try again.

-Chuck
Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: Using Cobra from the lastest source code

Postby Charles » Tue Sep 23, 2008 10:36 pm

Or if you were doing "cobra -ert:no ..." so it referenced the Cobra.Lang.dll instead of including it, then be sure to rebuild the library:

cobra -bsl -v

Actually, rebuild it anyway just to be safe. Let me know how it goes.
Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: Using Cobra from the lastest source code

Postby gauthier » Wed Sep 24, 2008 6:09 pm

Thanks Chuck, unfortunately I get the same error after a clean checkout + running comp.bat

The version in Snapshot folder doesn't expose the behaviour.

Any idea?
gauthier
 
Posts: 116

Re: Using Cobra from the lastest source code

Postby Charles » Wed Sep 24, 2008 8:16 pm

I took a closer look at your exception and see that the source of the problem is listed as being in the Snapshot directory. So the problem is that I haven't fixed it there. I didn't understand right away that it's "comp" and not a subsequent "cobra hello" that is giving you the problem.

Well I have some bug fixes in today and another one coming, so I was planning on doing a new snapshot anyway. I'll post here when I do -- hopefully tonight.

As a quick fix you can probably copy CobraLang.cobra down into Snapshot, or just fix that one line by commenting it out.

Thanks for your patience.
Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: Using Cobra from the lastest source code

Postby Charles » Wed Sep 24, 2008 10:44 pm

The new snapshot has been checked in. Let me know how it goes.

You can see recent activity at the Trac timeline.
Charles
 
Posts: 2515
Location: Los Angeles, CA

PreviousNext

Return to Discussion

Who is online

Users browsing this forum: No registered users and 93 guests

cron