[jira] Created: (BOO-1256) Class not found after importing two similar namespaces

View: New views
3 Messages — Rating Filter:   Alert me  

[jira] Created: (BOO-1256) Class not found after importing two similar namespaces

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Class not found after importing two similar namespaces
------------------------------------------------------

                 Key: BOO-1256
                 URL: http://jira.codehaus.org/browse/BOO-1256
             Project: Boo
          Issue Type: Bug
          Components: Compiler
    Affects Versions: 0.9.2
            Reporter: Fernando Nájera


Given three classes, in namespaces "A", "A.N1" and "A.N2", it's not possible to import namespaces A.N1 and A.N2 and reference classes inside both of them.

From the discussion at <http://groups.google.com/group/boolang/browse_thread/thread/38a135d8c587f71a>:

Cedric Vivier: 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.  In 0.9.0 it works.

-- 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

------------------------------------

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).

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



[jira] Assigned: (BOO-1256) Class not found after importing two similar namespaces

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ http://jira.codehaus.org/browse/BOO-1256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rodrigo B. de Oliveira reassigned BOO-1256:
-------------------------------------------

    Assignee: Rodrigo B. de Oliveira

> Class not found after importing two similar namespaces
> ------------------------------------------------------
>
>                 Key: BOO-1256
>                 URL: http://jira.codehaus.org/browse/BOO-1256
>             Project: Boo
>          Issue Type: Bug
>          Components: Compiler
>    Affects Versions: 0.9.2
>            Reporter: Fernando Nájera
>            Assignee: Rodrigo B. de Oliveira
>
> Given three classes, in namespaces "A", "A.N1" and "A.N2", it's not possible to import namespaces A.N1 and A.N2 and reference classes inside both of them.
> From the discussion at <http://groups.google.com/group/boolang/browse_thread/thread/38a135d8c587f71a>:
> Cedric Vivier: 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.  In 0.9.0 it works.
> -- 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
> ------------------------------------
> 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).

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



[jira] Resolved: (BOO-1256) Class not found after importing two similar namespaces

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ http://jira.codehaus.org/browse/BOO-1256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rodrigo B. de Oliveira resolved BOO-1256.
-----------------------------------------

       Resolution: Fixed
    Fix Version/s: 0.9.3

Fixed in rev. 3403. Thanks for the report!

> Class not found after importing two similar namespaces
> ------------------------------------------------------
>
>                 Key: BOO-1256
>                 URL: http://jira.codehaus.org/browse/BOO-1256
>             Project: Boo
>          Issue Type: Bug
>          Components: Compiler
>    Affects Versions: 0.9.2
>            Reporter: Fernando Nájera
>            Assignee: Rodrigo B. de Oliveira
>             Fix For: 0.9.3
>
>
> Given three classes, in namespaces "A", "A.N1" and "A.N2", it's not possible to import namespaces A.N1 and A.N2 and reference classes inside both of them.
> From the discussion at <http://groups.google.com/group/boolang/browse_thread/thread/38a135d8c587f71a>:
> Cedric Vivier: 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.  In 0.9.0 it works.
> -- 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
> ------------------------------------
> 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).

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email