You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@etch.apache.org by Keith Hankin <kh...@shutterfly.com> on 2009/10/10 07:27:07 UTC

Mixin not working

I have one service that uses another as a mixin. The service that uses the mixin defines structs that extend structs in the mixin. However the generated ValueFactory does not compile, as it is missing all of the public static declarations of the types that are inherited from the mixin. Is this a known problem?


RE: Mixin not working

Posted by Keith Hankin <kh...@shutterfly.com>.
Sorry, I forgot to specify the module declarations:

Contents of FooService.etch:

	module foo
	service FooService {
		struct Test1 (
			string hello
		)
	}

Contents of BarService.etch:

	module bar
	service BarService {
		mixin FooService
		struct Test2 (
			string world
		) extends Test1
	}

The resulting ValueFactoryBarService.java, when setting the super type of the Test2 class, refers to _mt_foo_FooService_Test1, which it cannot resolve, since this is declared in a file in a different package.

-----Original Message-----
From: scott comer [mailto:wert1y@mac.com] 
Sent: Saturday, October 10, 2009 6:38 AM
To: etch-user@incubator.apache.org
Subject: Re: Mixin not working

sorry you're having trouble, keith. i have no knowledge of such a 
problem. can you post your etch files, or
perhaps a trimmed down example which demonstrates the problem? i'll look 
into it.

scott out

Keith Hankin wrote:
> I have one service that uses another as a mixin. The service that uses the mixin defines structs that extend structs in the mixin. However the generated ValueFactory does not compile, as it is missing all of the public static declarations of the types that are inherited from the mixin. Is this a known problem?
>
>   


RE: Mixin not working

Posted by Keith Hankin <kh...@shutterfly.com>.
Contents of FooService.etch:

	service FooService {
		struct Test1 (
			string hello
		)
	}

Contents of BarService.etch:

	Service BarService {
		mixin FooService
		struct Test2 (
			string world
		) extends Test1
	}

The resulting ValueFactoryBarService.java, when setting the super type of the Test2 class, refers to _mt_foo_FooService_Test1, which it cannot resolve, since this is declared in a file in a different package.

-----Original Message-----
From: scott comer [mailto:wert1y@mac.com] 
Sent: Saturday, October 10, 2009 6:38 AM
To: etch-user@incubator.apache.org
Subject: Re: Mixin not working

sorry you're having trouble, keith. i have no knowledge of such a 
problem. can you post your etch files, or
perhaps a trimmed down example which demonstrates the problem? i'll look 
into it.

scott out

Keith Hankin wrote:
> I have one service that uses another as a mixin. The service that uses the mixin defines structs that extend structs in the mixin. However the generated ValueFactory does not compile, as it is missing all of the public static declarations of the types that are inherited from the mixin. Is this a known problem?
>
>   


Re: Mixin not working

Posted by scott comer <we...@mac.com>.
sorry you're having trouble, keith. i have no knowledge of such a 
problem. can you post your etch files, or
perhaps a trimmed down example which demonstrates the problem? i'll look 
into it.

scott out

Keith Hankin wrote:
> I have one service that uses another as a mixin. The service that uses the mixin defines structs that extend structs in the mixin. However the generated ValueFactory does not compile, as it is missing all of the public static declarations of the types that are inherited from the mixin. Is this a known problem?
>
>