question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ability to include clj files in resulting jar when AOT'ing a single namespace

See original GitHub issue

Desired Behavior

I have a scenario where I want to AOT a namespace foo.core, but would like to keep all non-AOT’d *.clj files in the resulting jar. As it stands, once you add aotNamespaces = ['foo.core'], clj files get kicked out of the jar.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:15 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
jzwolakcommented, Nov 3, 2022

I’m smiling because your proposed code changes are identical (character per character) to what I already tried. They did not work. It’s not just that the source must appear in the output directory. The checkClojure task must depend on the compileClojure task - similarly the test tasks need to do this. Also, the exported classpaths for composite builds have to change, too. There are many things that must change.

Since your suggestion is exactly what I started with, I’d be happy to spend a few minutes when I have time to play with this code change and see what I can do and create a better report if I can’t figure it out. I have everything setup for testing this use case.

0reactions
jzwolakcommented, Nov 9, 2022

Ah, that was my bad for not clicking the link you gave.

I did try the suggestion you made to modify the Clojurephant plugin. It did not work. I’ll have to go get more information as to why and post it here.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issues · clojurephant/clojurephant - GitHub
Clojure and Clojurescript support for Gradle. ... Ability to include clj files in resulting jar when AOT'ing a single namespace area:clojure enhancement New ......
Read more >
exclude certain clj namespaces from compilation in leiningen
Have a look at leiningen's sample project.clj, which describes how to use :jar-exclusions or :uberjar-exclusions to exclude arbitrary paths when creating ...
Read more >
A deeper understanding of Clojure CLI tools - Practicalli
We saw that Leiningen created a single file that we can use to deploy our application and call from the java command line....
Read more >
clojure 2020-03-13 - Slack Archive
And Clojure Load will see that each namespace on B v2 (whose Jar only has sources) also have a .class on the classpath...
Read more >
tools.namespace 1.1.0-SNAPSHOT API documentation
This namespace is DEPRECATED; most functions have been moved to other namespaces ... DEPRECATED; moved to clojure.tools.namespace.find Searches the JAR file ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found