Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deleting of dependent files after aot compile #43

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

vitalyper
Copy link

When clojure compiler compiles namespace with gen-class directive it recursively pulls all dependent classes. See CLJ-322

In some maven build environments such behavior could be redundant. The following configuration will delete dependent class files from outputDirecotry after clojure's AOT compile step.

<configuration> <keepNamespaces> <keepNamespace>foo.bar</keepNamespace> </keepNamespaces> </configuration>
Multiple keepNamespace elements are supported and clojure's namespace mangling rules are expected:

  1. at least to parts separated by '.'
  2. last part becomes a start of class file
  3. '-' is translated into '_'

@laurentpetit
Copy link
Contributor

For Counterclockwise's needs, I've written another flavor of this. It adds a config parameter to activate the feature, and just uses what is already configured via <namespaces/>.

I will create a PR and we can talk about the merits of one and the other and hopefully come up with something that will be integrated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants