|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
Namespace nightmareHi all, I've been spending some hours finding out why a class wasn't found in a quite complex project, and after a lot of try-and-errors, I managed to reduce the problem to three really simple files. -- A.StartupClass.boo ------------ namespace A import A.N1 import A.N2 class StartupClass: def Method(): v1 = MyClass() v2 = MyOtherClass() end end -- A.N1.MyClass.boo ------------ namespace A.N1 class MyClass: end -- A.N2.MyOtherClass.boo ------------ namespace A.N2 class MyOtherClass: end ------------------------------------ The compiler says: C:\>booc -wsa "A.StartupClass.boo" "A.N1.MyClass.boo" "A.N2.MyOtherClass.boo" Boo Compiler version 0.9.2.3383 (CLR 2.0.50727.3082) A.StartupClass.boo(1,1): BCW0008: WARNING: Duplicate namespace: 'A.N2'. 1 warning(s). A.StartupClass.boo(1,1): BCE0005: Unknown identifier: 'MyOtherClass'. 1 error(s). If I change the order of the imports in A.StartupClass.boo, then I get: C:\>booc -wsa "A.StartupClass.boo" "A.N1.MyClass.boo" "A.N2.MyOtherClass.boo" Boo Compiler version 0.9.2.3383 (CLR 2.0.50727.3082) A.StartupClass.boo(1,1): BCW0008: WARNING: Duplicate namespace: 'A.N1'. 1 warning(s). A.StartupClass.boo(1,1): BCE0005: Unknown identifier: 'MyClass'. 1 error(s). --------------------------- I do not understand the warnings, and of course I do not agree with the errors. I must be missing something obvious, but I really cannot see what it is... Without imports, or even only with one import, it works - but it's not what I want to do! -- A.StartupClass.boo (modified, it works) ------------ namespace A import A.N1 class StartupClass: def Method(): v1 = MyClass() v2 = A.N2.MyOtherClass() end end ------------------------------------ Any ideas? Is this a known issue? Should I report it somewhere else? Thanks in advance, Fernando Nájera --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Boo Programming Language" group. To post to this group, send email to boolang@... To unsubscribe from this group, send email to boolang+unsubscribe@... For more options, visit this group at http://groups.google.com/group/boolang?hl=en -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: Namespace nightmareOn Tue, Oct 6, 2009 at 5:35 PM, Fernando <fernnaj@...> wrote: Any ideas? Is this a known issue? Should I report it somewhere else? Nice catch! This is indeed looks like a bug. Please open an issue about this in the bug tracker ( http://jira.codehaus.org/browse/BOO ) Hmm, actually it is a regression bug, it works on 0.9, I've not bisected yet but I assume it's been silently introduced (we have no testcase for that) during the TypeSystem refactoring. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Boo Programming Language" group. To post to this group, send email to boolang@... To unsubscribe from this group, send email to boolang+unsubscribe@... For more options, visit this group at http://groups.google.com/group/boolang?hl=en -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: Namespace nightmare> This is indeed looks like a bug. Thanks for the promptly reply! > Please open an issue about this in the bug tracker (http://jira.codehaus.org/browse/BOO) On my way. > Hmm, actually it is a regression bug, it works on 0.9, I've not bisected yet > but I assume it's been silently introduced (we have no testcase for that) > during the TypeSystem refactoring. I will enter that comment in the bug tracker too. Thanks a lot, Fernando Nájera --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Boo Programming Language" group. To post to this group, send email to boolang@... To unsubscribe from this group, send email to boolang+unsubscribe@... For more options, visit this group at http://groups.google.com/group/boolang?hl=en -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: Namespace nightmare> > Please open an issue about this in the bug tracker (http://jira.codehaus.org/browse/BOO) > Done. http://jira.codehaus.org/browse/BOO-1256 I hope I entered it properly... if not, let me know and I'll change whatever it's needed. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Boo Programming Language" group. To post to this group, send email to boolang@... To unsubscribe from this group, send email to boolang+unsubscribe@... For more options, visit this group at http://groups.google.com/group/boolang?hl=en -~----------~----~----~----~------~----~------~--~--- |
| Free embeddable forum powered by Nabble | Forum Help |