You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@gump.apache.org by Stephen McConnell <mc...@apache.org> on 2004/07/10 23:23:42 UTC
heresy - a controversial or unorthodox opinion or doctrine
Well - maybe its not that bad ... but all the same - this is an early
warning .. I'm thinking about making a copy of AntBuilder
(gump/python/gump/builder/ant.py), renaming it to magic.py, making a
couple of small but significant changes, sorting out what actually does
the builder selection, updating it submitting a patch. And all of this
with zero Python experience and no compiler.
If this sounds like heresy then please yell out now because as I see it
this is the next step in moving the magic gump equation forward. If
anyone wants to shepherd me though the process I'll be very grateful.
Cheers, Steve.
[1] http://dictionary.reference.com/search?r=2&q=heresy
--
|---------------------------------------|
| Magic by Merlin |
| Production by Avalon |
| |
| http://avalon.apache.org |
|---------------------------------------|
---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org
Re: heresy - a controversial or unorthodox opinion or doctrine
Posted by Stefan Bodewig <bo...@apache.org>.
On Mon, 12 Jul 2004, Stephen McConnell <mc...@apache.org> wrote:
> So basically I agree - Magic is exposing a potential for abuse but
> at the same time it is very questionable why someone would invest
> time into setup and usage of magic with that in mind - ant's <exec>
> would be a much quicker solution.
I'm not so much concerned about abuse. I may be using a plain
<javacc> task with no bad intention and point to my checked in JavaCC
2.x using the task - still Gump would love to replace it with its
version of JavaCC.
> <x:property name="antlr" key="antlr" feature="path"/>
OK, I see. This might solve the issue, but only if people intend to
support Gump. Ideally Gump should work transparently.
Stefan
---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org
Re: heresy - a controversial or unorthodox opinion or doctrine
Posted by Stephen McConnell <mc...@apache.org>.
Stefan Bodewig wrote:
> On Sat, 10 Jul 2004, Adam R. B. Jack <aj...@trysybase.com> wrote:
>
>
>>Nothing slightly heretic (unless you are talking about Ant religion
>>not Gump religion).
>
>
> 8-)
>
> In my experience then Ant crew isn't as dogmatic as it gets colored
> sometimes, we tend to embrace heretics.
>
> Humor asside, the main issue I see is thar Magic uses Ant under the
> covers. Anybody using Magic in essence uses Ant. AFAIU I can mix the
> magic antlib with other Ant tasks freely. If I do so without setting
> build.sysclasspath "properly", those other tasks may end up using
> "bad" classpaths. But maybe I'm not understanding Magic completely.
Your assumptions are correct. Magic is an antlib and anyone can
customize build behavior by using pure ant directives. On the
other-hand, the only reason someone will be using magic is to control
over version management. So basically I agree - Magic is exposing a
potential for abuse but at the same time it is very questionable why
someone would invest time into setup and usage of magic with that in
mind - ant's <exec> would be a much quicker solution.
Magic users have two options when dealing with things like external
tasks - they can include a reference to the jar in Magic's index.xml.
The following example (taken from the Directory project) shows the usage
of the antlr preprocessor as an external task:
<target name="grammars" depends="standard.prepare">
<x:property name="antlr" key="antlr" feature="path"/>
<antlr target="target/build/etc/antlr/schema.g"
outputdirectory="target/build/main/org/apache/eve/schema">
<classpath>
<pathelement path="${magic.cache}/${antlr}"/>
</classpath>
</antlr>
</target>
The important line in the above is:
<x:property name="antlr" key="antlr" feature="path"/>
This is retrieving the location of the antlr from magic. Normally Magic
will return the path relative to the centralized index (i.e.
antlr/jars/antlr-2.7.2.jar). In the case of gump magic will ensure that
the filename maps to the gump generated antlr. Magic also includes a
"plugin" notion that allows association of multiple jars with a set of
task definitions that are loaded into a separate classloader at build time.
But the point remains - nothing is stopping someone from doing the
following:
<classpath>
<pathelement path="${magic.cache}/antlr/jars/antlr-2.7.2.jar"/>
</classpath>
Clearly this circumvents the benefits provided by gump and also goes
against the first principals of magic.
Hence our placeholder page:
http://avalon.apache.org/central/tools/magic/spells/dark-arts.html
Nothing there yet but this is where we will be documenting bad practices
in our valiant efforts to hold back evil.
Cheers, Steve.
--
|---------------------------------------|
| Magic by Merlin |
| Production by Avalon |
| |
| http://avalon.apache.org |
|---------------------------------------|
---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org
Re: heresy - a controversial or unorthodox opinion or doctrine
Posted by Stefan Bodewig <bo...@apache.org>.
On Sat, 10 Jul 2004, Adam R. B. Jack <aj...@trysybase.com> wrote:
> Nothing slightly heretic (unless you are talking about Ant religion
> not Gump religion).
8-)
In my experience then Ant crew isn't as dogmatic as it gets colored
sometimes, we tend to embrace heretics.
Humor asside, the main issue I see is thar Magic uses Ant under the
covers. Anybody using Magic in essence uses Ant. AFAIU I can mix the
magic antlib with other Ant tasks freely. If I do so without setting
build.sysclasspath "properly", those other tasks may end up using
"bad" classpaths. But maybe I'm not understanding Magic completely.
Stefan
---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org
Re: heresy - a controversial or unorthodox opinion or doctrine
Posted by Stephen McConnell <mc...@apache.org>.
Adam R. B. Jack wrote:
>>Well - maybe its not that bad ... but all the same - this is an early
>>warning .. I'm thinking about making a copy of AntBuilder
>>(gump/python/gump/builder/ant.py), renaming it to magic.py, making a
>>couple of small but significant changes, sorting out what actually does
>>the builder selection, updating it submitting a patch. And all of this
>>with zero Python experience and no compiler.
>
>
> Nothing slightly heretic (unless you are talking about Ant religion not Gump
> religion). Magic is like Ant (based upon, I believe) but different, so you
> approach seems totally correct given today's Gump codebase. The only (small
> but significant) extras I can think off would be:
>
> 1) Add a <magic element to the project metadata (like <ant, like <maven) and
> update gump/model/builder.py to have such a Magic class (based upon
> Builder), just like the Ant class. [Feel free to update xdocs for site
> documentation.]
>
> 2) Modify gump/model/project.py to create the self.magic member data, and
> hasMagic(), getMagic() beaner methods, and clone that small section in
> complete() (that constructs objects from XML) that constructs a Magic class
> for a <magic DOM element.
>
> 3) Update gump/build/builder to have a self.magic and then if
> project.hasMagic() to call your gump/builder/magic.py.
>
>
>>If this sounds like heresy then please yell out now because as I see it
>>this is the next step in moving the magic gump equation forward. If
>>anyone wants to shepherd me though the process I'll be very grateful.
>
>
> We have ant.py and maven.py, so when not magic.py? Get a few more and we can
> refactor these steps about to allow (1) auto-discovered/auto-loaded plugins
> based upon the element name (2) element name to model/builder auto mappings.
> A few more and we'll have enough experience for a reasonable plug-in
> strategy. (For example, I think the CLASSPATH generation could move into the
> builder, so we could have similar but non-Java such stuff).
>
> BTW: What are the differences between Ant and Magic as far as Gump is
> concerned?
A MagicBuilder would set specific system properties (gump date, probably
a verbose flag, exclusion of build.sysclasspath) and modify the
classpath to be ant, junit and magic. Secondly, the semantics of gump
<depend> would be interpreted as a <depend><noclasspath>.
But in digging around I think this is step one of a two step process.
In effect a MagicBuilder really only reduces the number of lines of gump
information that needs to be read in - the real kicker will come from a
magic module and the interaction between a magic module and a magic
builder - but this is pure thinking ahead and I'm still dealing with the
fact that someone has removed all of the braces from the source code!
:-)
Cheers, Steve.
> regards
>
> Adam
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
> For additional commands, e-mail: general-help@gump.apache.org
>
>
--
|---------------------------------------|
| Magic by Merlin |
| Production by Avalon |
| |
| http://avalon.apache.org |
|---------------------------------------|
---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org
Re: heresy - a controversial or unorthodox opinion or doctrine
Posted by Leo Simons <ls...@jicarilla.org>.
Adam R. B. Jack wrote:
> 4)
5) Document change to the model
- LSD
---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org
Re: heresy - a controversial or unorthodox opinion or doctrine
Posted by "Adam R. B. Jack" <aj...@trysybase.com>.
> The only (small
> but significant) extras I can think off would be:
>
[...]
4) A unit test suite (like gump/test/maven.py) for whatever you tweaks are.
Since we have home grown pyunit, one needs to edit gump/test/pyunit.py to
import the suite and add it to the runner. Once done you can run the tests
using a crude pattern match of the function names (e.g. *Magic).
http://wiki.apache.org/gump/GumpDevelopment#Testing
regards,
Adam
---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org
Re: heresy - a controversial or unorthodox opinion or doctrine
Posted by "Adam R. B. Jack" <aj...@trysybase.com>.
> Well - maybe its not that bad ... but all the same - this is an early
> warning .. I'm thinking about making a copy of AntBuilder
> (gump/python/gump/builder/ant.py), renaming it to magic.py, making a
> couple of small but significant changes, sorting out what actually does
> the builder selection, updating it submitting a patch. And all of this
> with zero Python experience and no compiler.
Nothing slightly heretic (unless you are talking about Ant religion not Gump
religion). Magic is like Ant (based upon, I believe) but different, so you
approach seems totally correct given today's Gump codebase. The only (small
but significant) extras I can think off would be:
1) Add a <magic element to the project metadata (like <ant, like <maven) and
update gump/model/builder.py to have such a Magic class (based upon
Builder), just like the Ant class. [Feel free to update xdocs for site
documentation.]
2) Modify gump/model/project.py to create the self.magic member data, and
hasMagic(), getMagic() beaner methods, and clone that small section in
complete() (that constructs objects from XML) that constructs a Magic class
for a <magic DOM element.
3) Update gump/build/builder to have a self.magic and then if
project.hasMagic() to call your gump/builder/magic.py.
> If this sounds like heresy then please yell out now because as I see it
> this is the next step in moving the magic gump equation forward. If
> anyone wants to shepherd me though the process I'll be very grateful.
We have ant.py and maven.py, so when not magic.py? Get a few more and we can
refactor these steps about to allow (1) auto-discovered/auto-loaded plugins
based upon the element name (2) element name to model/builder auto mappings.
A few more and we'll have enough experience for a reasonable plug-in
strategy. (For example, I think the CLASSPATH generation could move into the
builder, so we could have similar but non-Java such stuff).
BTW: What are the differences between Ant and Magic as far as Gump is
concerned?
regards
Adam
---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org
Re: heresy - a controversial or unorthodox opinion or doctrine
Posted by Antoine Levy-Lambert <an...@gmx.de>.
Hi Steve,
you are not heretic. I also hat no experience, but made a submission of
a Python sync task for Gump which was almost certainly improved by Adam,
but was working from the start. I think that general programming
experience may be more imortant than experience with one specific
language or tool.
Cheers,
Antoine
Stephen McConnell wrote:
>
> Well - maybe its not that bad ... but all the same - this is an early
> warning .. I'm thinking about making a copy of AntBuilder
> (gump/python/gump/builder/ant.py), renaming it to magic.py, making a
> couple of small but significant changes, sorting out what actually
> does the builder selection, updating it submitting a patch. And all
> of this with zero Python experience and no compiler.
>
> If this sounds like heresy then please yell out now because as I see
> it this is the next step in moving the magic gump equation forward.
> If anyone wants to shepherd me though the process I'll be very grateful.
>
> Cheers, Steve.
>
> [1] http://dictionary.reference.com/search?r=2&q=heresy
>
---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org