[Mono-dev] Mono.CSharp.Evaluator: x.GetType Bug?
Hi, This is regarding Mono 3.0.3: Mono.CSharp.Evaluator When I instantiate an Evaluator and then then evaluate following input: var context = new CompilerContext(new CompilerSettings(), new ConsoleReportPrinter()); var evaluator = new Evaluator(context); evaluator.DescribeTypeExpressions = true; object result = null; bool set = false; evaluator.Evaluate(class A{ public int X;}, out result, out set); //this works evaluator.Evaluate(var a = new A();a.GetType();, out result, out set); Console.WriteLine(result); //this doesnt work evaluator.Evaluate(var a = new A();, out result, out set); //Error here: evaluator.Evaluate(a.GetType();, out result, out set); Console.WriteLine(result); I get an error in the second last line: System.IO.FileNotFoundException: Could not load file or assembly 'eval-0, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' o r one of its dependencies. The system cannot find the file specified. File name: 'eval-0, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' at InteractiveExpressionClass.Host(Object $retval) at Mono.CSharp.Evaluator.Evaluate(String input, Object result, Boolean result_set) at MonoEval.Program.Main(String[] args) in C:\Users\Luke\Dev\Samples\MonoEval\Program.cs:line 30 The last lines works if evaluate the code in the csharp interactive console that comes with mono but NOT when I have my own instance of evaluator. Any ideas why that might be? Is this a bug? Thank -luke -- View this message in context: http://mono.1490590.n4.nabble.com/Mono-CSharp-Evaluator-x-GetType-Bug-tp4658288.html Sent from the Mono - Dev mailing list archive at Nabble.com. ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] Mono.CSharp.Evaluator: x.GetType Bug?
On 25.01.2013 18:33, lukebuehler wrote: //this doesnt work evaluator.Evaluate(var a = new A();, out result, out set); //Error here: evaluator.Evaluate(a.GetType();, out result, out set); Console.WriteLine(result); Local variables don't survive the evaluation. You must Run() them: evaluator.Run(var a = new A();); evaluator.Evaluate(a.GetType();); Robert ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] Mono.CSharp.Evaluator: x.GetType Bug?
No that doesn't work. 1. Your code gives me the same exception 2. A quick look with reflector shows me that eval.Run is just a wrapper over eval.Evaluate. 3. To prove it, this works: evaluator.Evaluate(class A{ public int X;}, out result, out set); evaluator.Evaluate(var a = new A{X=10};, out result, out set); evaluator.Evaluate(var b = new A{X=20};, out result, out set); // this prints 30 without an exception evaluator.Evaluate(print(a.X+b.X);, out result, out set); It's only the GetType call that trips up the compiler. Cheers -luke On Fri, Jan 25, 2013 at 12:58 PM, Robert Jordan [via Mono] ml-node+s1490590n4658289...@n4.nabble.com wrote: On 25.01.2013 18:33, lukebuehler wrote: //this doesnt work evaluator.Evaluate(var a = new A();, out result, out set); //Error here: evaluator.Evaluate(a.GetType();, out result, out set); Console.WriteLine(result); Local variables don't survive the evaluation. You must Run() them: evaluator.Run(var a = new A();); evaluator.Evaluate(a.GetType();); Robert ___ Mono-devel-list mailing list [hidden email] http://user/SendEmail.jtp?type=nodenode=4658289i=0 http://lists.ximian.com/mailman/listinfo/mono-devel-list -- If you reply to this email, your message will be added to the discussion below: http://mono.1490590.n4.nabble.com/Mono-CSharp-Evaluator-x-GetType-Bug-tp4658288p4658289.html To unsubscribe from Mono.CSharp.Evaluator: x.GetType Bug?, click herehttp://mono.1490590.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=4658288code=bHVrYXMuYnVlaGxlckBnbWFpbC5jb218NDY1ODI4OHw5NTQyOTA5MA== . NAMLhttp://mono.1490590.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml -- View this message in context: http://mono.1490590.n4.nabble.com/Mono-CSharp-Evaluator-x-GetType-Bug-tp4658288p4658290.html Sent from the Mono - Dev mailing list archive at Nabble.com.___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
[Mono-dev] names differing only by case in git repo?
I cloned the mono/mono repo to a Windows machine, and no matter what I do, my git status reports thusly: $ git status # On branch master # Changes not staged for commit: # (use git add file... to update what will be committed) # (use git checkout -- file... to discard changes in working directory) # # modified: mcs/class/monodoc/monodoc.dll.sources # modified: mcs/class/monodoc/monodoc_test.dll.sources # no changes added to commit (use git add and/or git commit -a) Signs suggest this is due to files which differ only by case, which can make Windows OS X unhappy. I can commit the bogus change locally, but it reappears when moving to a tag. ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
[Mono-dev] Latest Native Client Mono work - ready for review/pull
Hello Mono friends, I've just put up a pull request for the latest in NaCl Mono changes: https://github.com/mono/mono/pull/538 As mentioned in the description, this does represent two years worth of changes, but it's still relatively small. If it would be easier to review in parts I'm open to it (though I don't know if there is a logical separation to do that), and I can answer any questions here or in the pull request. One thing not explicitly mentioned in the pull request: The NaCl Mono build is unnecessarily onerous and only works on Linux. We're really abusing autotools/configure badly for this target. If we could get this to look more like one of the other cross-target mono builds, could spit out shared libraries, and could run the test suite like NaCl Mono does now, it would be greatly appreciated. See the linked doc for full details: https://docs.google.com/a/google.com/document/d/1Jd_4M7mlmxF8daVbepAy_8RKYcRbhifXanRYyBKkVa4/pub An alternate proposal is that NaCl Mono could build without invoking autotools and roll its own build. This would obviously not be great from a maintenance standpoint, but maybe it could be automated from the normal configure and Makefiles. Any input on improving the build is helpful. We do have a continuous build that tests NaCl Mono and builds release packages that are bundled with the NaCl SDK. See it in action here: http://build.chromium.org/p/client.nacl.sdk.mono/console. I'd really like to see my changes integrated into mono upstream and then target actual Mono releases for release with the NaCl SDK, and also the Mono team could continuously build NaCl targets. If the build system for NaCl Mono is improved, it is entirely possible most people could download the NaCl SDK and compile Mono from source, which would be really great. -Elijah ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] XML Schema compatibility
Hi, That rather sounds like a bug. Could you file a bug with relavant schema (maybe link to that, as it sounds like something you can't share publicly) and something like stack trace if available? (Without the actual program, I'm not sure if it is about System.Xml.dll implementation. If it is about XmlSchema, there are still two ways to parse it - XmlSchema.Read() and XmlSerializer.Deserialize() which are different.) Atsushi Eno Alistair Leslie-Hughes wrote: Hi, I'm using WINE+Mono to install a Microsoft product. However, when it tries to validate the Schema (during the installer) it fails. The cause is a single whitespace when parsing the attribute use, e.g. use='required . Note the space after required. What would be the best solution to ensure compatibility between mono and .NET? Best Regards, Alistair Leslie-Hughes ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list