[
https://issues.apache.org/jira/browse/AVRO-163?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12797215#action_12797215
]
Doug Cutting commented on AVRO-163:
-----------------------------------
> Are you planning to put all the targets for all languages into a single
> top-level ant file?
I was thinking there would be a top-level ant file that has an, e.g., "dist"
target that invokes something like 'make dist' for C and C++, and 'ant dist'
for Java and Python. I was hoping that the top-level build file need not have
targets for, e.g., "package-c", but I also don't think we need a uniform way of
invoking the sub-builds. If we change Python to use something other than Ant
for its build, then we'd also have to update the top-level build file. So the
top-level build.xml might contain something like:
{code}
<target name="dist">
<ant dir="java" target="dist"/>
<ant dir="py" target="dist"/>
<exec dir="c" command="make dist" failonerror="true"/>
<exec dir="c++" command="make dist" failonerror="true"/>
</target>
{code}
Note that we'd like 'cd c; make dist' to create dist/avro-c-X.Y.Z with the
right version. So the version has to be stored to a file somewhere, e.g.,
VERSION.txt at top-level.
> I'd prefer to elide the top-level 'src' directory altogether.
I tried that, and 'ls' looked wrong to me. Aesthetically I preferred seeing at
top-level something like:
CHANGES.txt LICENSE.txt README.txt VERSION.txt build.xml build/ src/
to:
CHANGES.txt LICENSE.txt README.txt VERSION.txt build.xml c/ c++/ dist/ doc/
java/ py/ share/
Is that just me? If so, I can easily change this. As I write this I care less
and less about this distinction.
Note that, if we don't label things 'src' at top-level, then, to my thinking,
each should have its own src/ and build/ within, and we're abandoning the
notion that these are read-only. But we still need a top-level directory where
each sub-build places artifacts for distribution, i.e., dist/.
> Using a simple bash script which does something like...
We'd need a script for each top-level target (package, test, doc & clean), or,
I suppose we could have a single script with something like:
src/$lang/build.sh $target
but I still don't see the advantage of maintaining a build.sh in each directory
over maintaining a top-level build file that performs the same function:
translating from these logical targets to the build system each implementation
uses.
> Each language Avro supports should be a separate package
> --------------------------------------------------------
>
> Key: AVRO-163
> URL: https://issues.apache.org/jira/browse/AVRO-163
> Project: Avro
> Issue Type: Improvement
> Components: c, c++, java, python
> Environment: We currently release Avro as a single monolithic tarball
> with ant being used to build all the languages that Avro supports.
> Reporter: Matt Massie
> Assignee: Doug Cutting
> Priority: Critical
> Fix For: 1.3.0
>
> Attachments: AVRO-163-cpp.patch, AVRO-163.patch, AVRO-163.patch
>
> Original Estimate: 8h
> Remaining Estimate: 8h
>
> *Build Issue*
> While ant is used for building Java projects, it is almost never used to
> build python, c++ or c projects. C and C++ projects are often managed using
> autotools while Python uses setuptools. Forcing these languages to use a
> foreign build system ('ant') is suboptimal and will cause us headaches as we
> move forward.
> *Release issue*
> Releasing a single monolithic package forces users of one language to
> download binary and source for all languages. For example, at this time the
> Avro C distribution is only 384K in size (built using autotools 'make
> distcheck' target). People interested in using the C implementation would be
> forced to download a large monolithic tarball (currently 3.8 MB) that
> includes dozens of third-party jar files for the Java implementation.
> Furthermore, C users would be forced to use 'ant' as the top-level build
> tool. This monolithic approach would also prevent us from submitting Avro
> for inclusion in Linux distribution yum/apt repositories as RPM and Debian
> packages. It's important to allow C/C++ code to have a pristine release
> tarball on which to base Debian and RPM packaging.
> *Solution*
> Create top-level directories: 'java', 'python', 'c++ ' , 'c', 'shared' and
> 'release'. Each language directory would contain the source for that
> language and use the build system natural for that language, e.g. ant,
> autotools, setuptools, gem, etc. The 'shared' directory would have, for
> example, common test schema and data files for interoperability testing
> between each language. A simple top-level bash script would call into each
> language to build a release package, documentation, etc. into the 'release'
> directory. Each Avro release would then be compromised of package(s) for
> each language Avro supports, e.g. avro-java-1.2.3.tar.gz,
> pyavro-1.2.3.tar.gz, avro-c++-1.2.3.tar.gz and avro-c-1.2.3.tar.gz. Later
> on, we'll also likely have libavro-devel-1.2.3-1.x86_64.rpm too.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.