Page 2 of 3
Re: Using Cobra from the lastest source code
Posted:
Sun Sep 21, 2008 3:21 pm
by relez
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.
Re: Using Cobra from the lastest source code
Posted:
Mon Sep 22, 2008 2:22 am
by Charles
No problem. Thanks for your patience and bug report.
-Chuck
Re: Using Cobra from the lastest source code
Posted:
Tue Sep 23, 2008 1:36 am
by arisawa
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" ?
Re: Using Cobra from the lastest source code
Posted:
Tue Sep 23, 2008 5:17 am
by Charles
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.
Re: Using Cobra from the lastest source code
Posted:
Tue Sep 23, 2008 1:49 pm
by gauthier
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()
Re: Using Cobra from the lastest source code
Posted:
Tue Sep 23, 2008 3:18 pm
by Charles
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
Re: Using Cobra from the lastest source code
Posted:
Tue Sep 23, 2008 10:36 pm
by Charles
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.
Re: Using Cobra from the lastest source code
Posted:
Wed Sep 24, 2008 6:09 pm
by gauthier
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?
Re: Using Cobra from the lastest source code
Posted:
Wed Sep 24, 2008 8:16 pm
by Charles
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.
Re: Using Cobra from the lastest source code
Posted:
Wed Sep 24, 2008 10:44 pm
by Charles
The new snapshot has been checked in. Let me know how it goes.
You can see recent activity at the
Trac timeline.