The direct use of shaded classes

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

The direct use of shaded classes

by Jason van Zyl-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

John,

I am assuming it's a mistake that you are directly using a shaded  
class in the FileProfileActivator? It was never intended that any  
source code actually import processed classes directly. There seems to  
be shaded bits all along the dependency chain now which was never my  
original intention. I was trying to update the ant tasks and I'm  
getting these weird "hidden" package references starting from plexus-
interpolation, in maven-project (where there's a direct reference to a  
hidden package) and then in the final distribution itself.

What's the intent here?

Thanks,

Jason

----------------------------------------------------------
Jason van Zyl
Founder,  Apache Maven
jason at sonatype dot com
----------------------------------------------------------



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


Re: The direct use of shaded classes

by Jason van Zyl-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

John,

I would just put the separated plexus utils in new packages. That  
shading along the way is going to be a nasty problem. Importing  
processed/shaded classes can only be a recipe for trouble.

On 10-Jul-08, at 7:09 AM, Jason van Zyl wrote:

> John,
>
> I am assuming it's a mistake that you are directly using a shaded  
> class in the FileProfileActivator? It was never intended that any  
> source code actually import processed classes directly. There seems  
> to be shaded bits all along the dependency chain now which was never  
> my original intention. I was trying to update the ant tasks and I'm  
> getting these weird "hidden" package references starting from plexus-
> interpolation, in maven-project (where there's a direct reference to  
> a hidden package) and then in the final distribution itself.
>
> What's the intent here?
>
> Thanks,
>
> Jason
>
> ----------------------------------------------------------
> Jason van Zyl
> Founder,  Apache Maven
> jason at sonatype dot com
> ----------------------------------------------------------
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@...
> For additional commands, e-mail: dev-help@...
>

Thanks,

Jason

----------------------------------------------------------
Jason van Zyl
Founder,  Apache Maven
jason at sonatype dot com
----------------------------------------------------------

We know what we are, but know not what we may be.

   -- Shakespeare


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


Re: The direct use of shaded classes

by John Casey-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm not sure what you're talking about, but I'll look into it.

Jason van Zyl wrote:

> John,
>
> I would just put the separated plexus utils in new packages. That
> shading along the way is going to be a nasty problem. Importing
> processed/shaded classes can only be a recipe for trouble.
>
> On 10-Jul-08, at 7:09 AM, Jason van Zyl wrote:
>
>> John,
>>
>> I am assuming it's a mistake that you are directly using a shaded
>> class in the FileProfileActivator? It was never intended that any
>> source code actually import processed classes directly. There seems
>> to be shaded bits all along the dependency chain now which was never
>> my original intention. I was trying to update the ant tasks and I'm
>> getting these weird "hidden" package references starting from
>> plexus-interpolation, in maven-project (where there's a direct
>> reference to a hidden package) and then in the final distribution
>> itself.
>>
>> What's the intent here?
>>
>> Thanks,
>>
>> Jason
>>
>> ----------------------------------------------------------
>> Jason van Zyl
>> Founder,  Apache Maven
>> jason at sonatype dot com
>> ----------------------------------------------------------
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@...
>> For additional commands, e-mail: dev-help@...
>>
>
> Thanks,
>
> Jason
>
> ----------------------------------------------------------
> Jason van Zyl
> Founder,  Apache Maven
> jason at sonatype dot com
> ----------------------------------------------------------
>
> We know what we are, but know not what we may be.
>
>   -- Shakespeare
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@...
> For additional commands, e-mail: dev-help@...
>

--
John Casey
Developer, PMC Member - Apache Maven (http://maven.apache.org)
Blog: http://www.ejlife.net/blogs/buildchimp/


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


Re: The direct use of shaded classes

by Jason van Zyl-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I found two references to classes in Maven like:

import hidden.org.codehaus.plexus...

Maybe your refactoring stuff grabbed hold of it.

If that wasn't intentional I'll check in my changes.

On 10-Jul-08, at 10:34 AM, John Casey wrote:

> I'm not sure what you're talking about, but I'll look into it.
>
> Jason van Zyl wrote:
>> John,
>>
>> I would just put the separated plexus utils in new packages. That  
>> shading along the way is going to be a nasty problem. Importing  
>> processed/shaded classes can only be a recipe for trouble.
>>
>> On 10-Jul-08, at 7:09 AM, Jason van Zyl wrote:
>>
>>> John,
>>>
>>> I am assuming it's a mistake that you are directly using a shaded  
>>> class in the FileProfileActivator? It was never intended that any  
>>> source code actually import processed classes directly. There  
>>> seems to be shaded bits all along the dependency chain now which  
>>> was never my original intention. I was trying to update the ant  
>>> tasks and I'm getting these weird "hidden" package references  
>>> starting from plexus-interpolation, in maven-project (where  
>>> there's a direct reference to a hidden package) and then in the  
>>> final distribution itself.
>>>
>>> What's the intent here?
>>>
>>> Thanks,
>>>
>>> Jason
>>>
>>> ----------------------------------------------------------
>>> Jason van Zyl
>>> Founder,  Apache Maven
>>> jason at sonatype dot com
>>> ----------------------------------------------------------
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@...
>>> For additional commands, e-mail: dev-help@...
>>>
>>
>> Thanks,
>>
>> Jason
>>
>> ----------------------------------------------------------
>> Jason van Zyl
>> Founder,  Apache Maven
>> jason at sonatype dot com
>> ----------------------------------------------------------
>>
>> We know what we are, but know not what we may be.
>>
>>  -- Shakespeare
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@...
>> For additional commands, e-mail: dev-help@...
>>
>
> --
> John Casey
> Developer, PMC Member - Apache Maven (http://maven.apache.org)
> Blog: http://www.ejlife.net/blogs/buildchimp/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@...
> For additional commands, e-mail: dev-help@...
>

Thanks,

Jason

----------------------------------------------------------
Jason van Zyl
Founder,  Apache Maven
jason at sonatype dot com
----------------------------------------------------------

the course of true love never did run smooth ...

  -- Shakespeare


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


Re: The direct use of shaded classes

by Benjamin Bentmann :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Jason van Zyl wrote:

> import hidden.org.codehaus.plexus...

Side note:
The Checkstyle rule "IllegalImport" [0] could help to ban this.


Benjamin


[0] http://checkstyle.sourceforge.net/config_imports.html#IllegalImport

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


Re: The direct use of shaded classes

by John Casey-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Not intentional at all. I have two of the classes revised here to use
plexus interpolation directly, but if you've got the changes on trunk
and 2.0.x already, I'll let you commit it.

-john

Jason van Zyl wrote:

> I found two references to classes in Maven like:
>
> import hidden.org.codehaus.plexus...
>
> Maybe your refactoring stuff grabbed hold of it.
>
> If that wasn't intentional I'll check in my changes.
>
> On 10-Jul-08, at 10:34 AM, John Casey wrote:
>
>> I'm not sure what you're talking about, but I'll look into it.
>>
>> Jason van Zyl wrote:
>>> John,
>>>
>>> I would just put the separated plexus utils in new packages. That
>>> shading along the way is going to be a nasty problem. Importing
>>> processed/shaded classes can only be a recipe for trouble.
>>>
>>> On 10-Jul-08, at 7:09 AM, Jason van Zyl wrote:
>>>
>>>> John,
>>>>
>>>> I am assuming it's a mistake that you are directly using a shaded
>>>> class in the FileProfileActivator? It was never intended that any
>>>> source code actually import processed classes directly. There seems
>>>> to be shaded bits all along the dependency chain now which was
>>>> never my original intention. I was trying to update the ant tasks
>>>> and I'm getting these weird "hidden" package references starting
>>>> from plexus-interpolation, in maven-project (where there's a direct
>>>> reference to a hidden package) and then in the final distribution
>>>> itself.
>>>>
>>>> What's the intent here?
>>>>
>>>> Thanks,
>>>>
>>>> Jason
>>>>
>>>> ----------------------------------------------------------
>>>> Jason van Zyl
>>>> Founder,  Apache Maven
>>>> jason at sonatype dot com
>>>> ----------------------------------------------------------
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe@...
>>>> For additional commands, e-mail: dev-help@...
>>>>
>>>
>>> Thanks,
>>>
>>> Jason
>>>
>>> ----------------------------------------------------------
>>> Jason van Zyl
>>> Founder,  Apache Maven
>>> jason at sonatype dot com
>>> ----------------------------------------------------------
>>>
>>> We know what we are, but know not what we may be.
>>>
>>>  -- Shakespeare
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@...
>>> For additional commands, e-mail: dev-help@...
>>>
>>
>> --
>> John Casey
>> Developer, PMC Member - Apache Maven (http://maven.apache.org)
>> Blog: http://www.ejlife.net/blogs/buildchimp/
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@...
>> For additional commands, e-mail: dev-help@...
>>
>
> Thanks,
>
> Jason
>
> ----------------------------------------------------------
> Jason van Zyl
> Founder,  Apache Maven
> jason at sonatype dot com
> ----------------------------------------------------------
>
> the course of true love never did run smooth ...
>
>  -- Shakespeare
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@...
> For additional commands, e-mail: dev-help@...
>

--
John Casey
Developer, PMC Member - Apache Maven (http://maven.apache.org)
Blog: http://www.ejlife.net/blogs/buildchimp/


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


Re: The direct use of shaded classes

by brettporter :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Is it possible to shade to something that would be illegal to use  
directly, like appending $shade to the class name, and still have it  
all work?

- Brett

On 11/07/2008, at 1:08 AM, Jason van Zyl wrote:

> I found two references to classes in Maven like:
>
> import hidden.org.codehaus.plexus...
>
> Maybe your refactoring stuff grabbed hold of it.
>
> If that wasn't intentional I'll check in my changes.
>
> On 10-Jul-08, at 10:34 AM, John Casey wrote:
>
>> I'm not sure what you're talking about, but I'll look into it.
>>
>> Jason van Zyl wrote:
>>> John,
>>>
>>> I would just put the separated plexus utils in new packages. That  
>>> shading along the way is going to be a nasty problem. Importing  
>>> processed/shaded classes can only be a recipe for trouble.
>>>
>>> On 10-Jul-08, at 7:09 AM, Jason van Zyl wrote:
>>>
>>>> John,
>>>>
>>>> I am assuming it's a mistake that you are directly using a shaded  
>>>> class in the FileProfileActivator? It was never intended that any  
>>>> source code actually import processed classes directly. There  
>>>> seems to be shaded bits all along the dependency chain now which  
>>>> was never my original intention. I was trying to update the ant  
>>>> tasks and I'm getting these weird "hidden" package references  
>>>> starting from plexus-interpolation, in maven-project (where  
>>>> there's a direct reference to a hidden package) and then in the  
>>>> final distribution itself.
>>>>
>>>> What's the intent here?
>>>>
>>>> Thanks,
>>>>
>>>> Jason
>>>>
>>>> ----------------------------------------------------------
>>>> Jason van Zyl
>>>> Founder,  Apache Maven
>>>> jason at sonatype dot com
>>>> ----------------------------------------------------------
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe@...
>>>> For additional commands, e-mail: dev-help@...
>>>>
>>>
>>> Thanks,
>>>
>>> Jason
>>>
>>> ----------------------------------------------------------
>>> Jason van Zyl
>>> Founder,  Apache Maven
>>> jason at sonatype dot com
>>> ----------------------------------------------------------
>>>
>>> We know what we are, but know not what we may be.
>>>
>>> -- Shakespeare
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@...
>>> For additional commands, e-mail: dev-help@...
>>>
>>
>> --
>> John Casey
>> Developer, PMC Member - Apache Maven (http://maven.apache.org)
>> Blog: http://www.ejlife.net/blogs/buildchimp/
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@...
>> For additional commands, e-mail: dev-help@...
>>
>
> Thanks,
>
> Jason
>
> ----------------------------------------------------------
> Jason van Zyl
> Founder,  Apache Maven
> jason at sonatype dot com
> ----------------------------------------------------------
>
> the course of true love never did run smooth ...
>
> -- Shakespeare
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@...
> For additional commands, e-mail: dev-help@...
>

--
Brett Porter
brett@...
http://blogs.exist.com/bporter/


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


Re: The direct use of shaded classes

by John Casey-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

not sure I follow...how would that be different than changing the packaging?

Brett Porter wrote:

> Is it possible to shade to something that would be illegal to use
> directly, like appending $shade to the class name, and still have it
> all work?
>
> - Brett
>
> On 11/07/2008, at 1:08 AM, Jason van Zyl wrote:
>
>> I found two references to classes in Maven like:
>>
>> import hidden.org.codehaus.plexus...
>>
>> Maybe your refactoring stuff grabbed hold of it.
>>
>> If that wasn't intentional I'll check in my changes.
>>
>> On 10-Jul-08, at 10:34 AM, John Casey wrote:
>>
>>> I'm not sure what you're talking about, but I'll look into it.
>>>
>>> Jason van Zyl wrote:
>>>> John,
>>>>
>>>> I would just put the separated plexus utils in new packages. That
>>>> shading along the way is going to be a nasty problem. Importing
>>>> processed/shaded classes can only be a recipe for trouble.
>>>>
>>>> On 10-Jul-08, at 7:09 AM, Jason van Zyl wrote:
>>>>
>>>>> John,
>>>>>
>>>>> I am assuming it's a mistake that you are directly using a shaded
>>>>> class in the FileProfileActivator? It was never intended that any
>>>>> source code actually import processed classes directly. There
>>>>> seems to be shaded bits all along the dependency chain now which
>>>>> was never my original intention. I was trying to update the ant
>>>>> tasks and I'm getting these weird "hidden" package references
>>>>> starting from plexus-interpolation, in maven-project (where
>>>>> there's a direct reference to a hidden package) and then in the
>>>>> final distribution itself.
>>>>>
>>>>> What's the intent here?
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Jason
>>>>>
>>>>> ----------------------------------------------------------
>>>>> Jason van Zyl
>>>>> Founder,  Apache Maven
>>>>> jason at sonatype dot com
>>>>> ----------------------------------------------------------
>>>>>
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: dev-unsubscribe@...
>>>>> For additional commands, e-mail: dev-help@...
>>>>>
>>>>
>>>> Thanks,
>>>>
>>>> Jason
>>>>
>>>> ----------------------------------------------------------
>>>> Jason van Zyl
>>>> Founder,  Apache Maven
>>>> jason at sonatype dot com
>>>> ----------------------------------------------------------
>>>>
>>>> We know what we are, but know not what we may be.
>>>>
>>>> -- Shakespeare
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe@...
>>>> For additional commands, e-mail: dev-help@...
>>>>
>>>
>>> --
>>> John Casey
>>> Developer, PMC Member - Apache Maven (http://maven.apache.org)
>>> Blog: http://www.ejlife.net/blogs/buildchimp/
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@...
>>> For additional commands, e-mail: dev-help@...
>>>
>>
>> Thanks,
>>
>> Jason
>>
>> ----------------------------------------------------------
>> Jason van Zyl
>> Founder,  Apache Maven
>> jason at sonatype dot com
>> ----------------------------------------------------------
>>
>> the course of true love never did run smooth ...
>>
>> -- Shakespeare
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@...
>> For additional commands, e-mail: dev-help@...
>>
>
> --
> Brett Porter
> brett@...
> http://blogs.exist.com/bporter/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@...
> For additional commands, e-mail: dev-help@...
>

--
John Casey
Developer, PMC Member - Apache Maven (http://maven.apache.org)
Blog: http://www.ejlife.net/blogs/buildchimp/


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


Re: The direct use of shaded classes

by brettporter :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

IIRC, you're not able to use them at compile time with that name  
(which is why anonymous inner classes are xxx$1, ...)

On 12/07/2008, at 3:10 AM, John Casey wrote:

> not sure I follow...how would that be different than changing the  
> packaging?
>
> Brett Porter wrote:
>> Is it possible to shade to something that would be illegal to use  
>> directly, like appending $shade to the class name, and still have  
>> it all work?
>>
>> - Brett
>>

--
Brett Porter
brett@...
http://blogs.exist.com/bporter/


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


Re: The direct use of shaded classes

by hilco :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, Jul 11, 2008 at 6:09 PM, Brett Porter <brett@...> wrote:
> IIRC, you're not able to use them at compile time with that name (which is
> why anonymous inner classes are xxx$1, ...)

That's just a convention. You can use $ in your class names. Not
advisable but completely valid.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...

LightInTheBox - Buy quality products at wholesale price