[
https://issues.apache.org/jira/browse/AVRO-146?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12766631#action_12766631
]
Philip Zeyliger commented on AVRO-146:
--------------------------------------
Doug,
I think you're being overly conservative here. Eclipse, once you get past the
learning curve and configuration, is a powerful tool for code exploration and
debugging, and requires relatively few concessions. It has a deep
understanding of Java, so it works best (and is least flakey) when it is the
compiler. Its configuration is roughly made up of two things: (1) what are all
the source files? These Eclipse lets you edit, and it builds them for you.
Because it "understands" them, it builds them continually (if you so choose)
and incrementally. (2) What are the libraries? These are jars or directories
of .class files, and it puts them on the classpath.
The concessions that Eclipse requires are that you separate out the sources
files from the libraries. In Avro's case (and in other systems that use some
generated-code), this means considering generated code as a library, but
considering the source stuff as source. So, I've had to separate the classes/
directory for the generated code away from the classes/ directory for the rest
of the test code. That in itself is probably for the better: collapsing
multiple source trees (src/test/java and build/test/src, I think) into one
classes/ tree feels icky to me in itself.
I totally understand that you don't wish the maintenance hassle of Eclipse.
The ant-eclipse task makes it pretty minor: you certainly don't have to update
the classpath file every time a dependency changes, and that's a win. Every
time you make a structural change--adding new source directories in one way or
another, you'll have to enlist an Eclipse user to help you edit that
configuration. How often, in Java, should that be happening? In its ideal,
Java is dead simple: source trees layed out as packages, and jar files. If
having Eclipse in there makes a push to have the build be simpler, that's a
good thing :) I could probably rig up a system that runs Eclipse in headless
mode and tests that the configuration worked, but it's probably more hassle
than it's worth right now.
BTW, I used the Eclipse stuff for several hours yesterday, and it worked well
for working with Avro. When I ran into something I didn't understand in the
code base, I double-clicked in the margins to set a breakpoint, clicked the
"Debug AllTests" button, and, one second later, I was staring at how the method
I was trying to understand was called, by which test, and with what parameters.
It's a tool, it's not perfect, but it'd good enough that I make concessions to
it.
You should give it a chance in the build file.
> configuration to work on Avro within Eclipse
> --------------------------------------------
>
> Key: AVRO-146
> URL: https://issues.apache.org/jira/browse/AVRO-146
> Project: Avro
> Issue Type: New Feature
> Reporter: Philip Zeyliger
> Assignee: Philip Zeyliger
> Attachments: AVRO-146.patch.txt, AVRO-146.patch.v2.txt,
> AVRO-146.patch.v3.txt
>
>
> The soon-to-be-attached patch lets you work on Avro from within Eclipse, if
> that's your style.
> I've added the following to the README:
> {quote}
> USING ECLIPSE
> To use Eclipse, use the "ant eclipse" target to trigger generating a
> .classpath
> file, and also trigger compilation (to pull in the maven dependencies, etc.)
> You must also make sure that your avro checkout directory is "avro". You
> should then be able to create an Eclipse project pointed to your checkout, and
> run the unit tests from Eclipse's runner.
> Note that the "Eclipse Builder" is configured to compile twice: once with
> Eclipse's built-in compiler, and another time with ant. Eclipse is happier
> this way, though the classpath is configured to ignore Eclipse's compilation.
> {quote}
> Everything here is incomprehensible XML boilerplate. There's a new ant
> target to create the .classpath file.
> I'm able to run all but the interop test that requires a server from within
> Eclipse. I welcome other Eclipse users trying this out to see if it works.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.