You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@zookeeper.apache.org by "Damien Diederen (Jira)" <ji...@apache.org> on 2020/10/19 10:27:00 UTC

[jira] [Commented] (ZOOKEEPER-3974) Generated build files from zookeeper-client-c should be in target/ directory

    [ https://issues.apache.org/jira/browse/ZOOKEEPER-3974?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17216608#comment-17216608 ] 

Damien Diederen commented on ZOOKEEPER-3974:
--------------------------------------------

Hi [~ctubbsii],

There are two independent sets of file which contribute to that "pollution":
 # {{zookeeper-client/zookeeper-client-c/generated/}}, built from {{zookeeper-jute/pom.xml}};
 # {{zookeeper-client/zookeeper-client-c/configure}} & friends, generated by Auto(re)conf.

As far as I can tell, the former is "just" a matter of editing the POM and straightening paths everywhere.

The second is a bit more delicate. The build itself is being done 100% out-of-tree (in {{zookeeper-client/zookeeper-client-c/target/c/}}); the only source of impurities being Auto(re)conf—and it is my understanding that that suite of tools does not support out-of-tree writes, as its output is supposed to be included in source release tarballs ([https://stackoverflow.com/a/38551034] seems to agree). Not sure how to work around that, except perhaps by copying the full source tree under {{target/}}—which would probably make debugging a bit harder.

(I don't have an opportunity to work on this right now, but I will keep it in my list, forward any thoughts, and would be happy to review any changes.)

HTH, -D

> Generated build files from zookeeper-client-c should be in target/ directory
> ----------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-3974
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3974
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: build, c client
>            Reporter: Christopher Tubbs
>            Priority: Minor
>
> Currently, the zookeeper-client/zookeeper-client-c generates a bunch of automake files directly in the source tree.
> Placing intermediate build files directly in the source tree can cause problems, such as accidentally checking them in to the source tree using the project's SCM (git). These files are currently in .gitignore, so that issue is somewhat mitigated, but they can still be added accidentally, even if they are ignored.
> The bigger problem is that Maven plugins assume that most everything that is not in a target/ directory is a source file. This can cause the apache-rat-plugin's check to fail except on a clean checkout, and can cause the maven-assembly-plugin to include those files in assemblies it creates, among other problems.
> These files should be generated in the target/ directory during the build, and removed from .gitignore. If they are needed in an assembly, they should be explicitly added with the appropriate assembly descriptor during the build.
> I would work on this, but I'm not adequately familiar with the C parts of the build. If somebody works on this, I'd be happy to help review or consult, as needed to fix this.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)