Message ID | 87leyr32c8.fsf@reilysiegel.com |
---|---|
State | New |
Headers | show |
Series | Remove limitations on clojure-tools | expand |
Context | Check | Description |
---|---|---|
cbaines/comparison | success | View comparision |
cbaines/git branch | success | View Git branch |
cbaines/applying patch | success | View Laminar job |
cbaines/issue | success | View issue |
cbaines/comparison | success | View comparision |
cbaines/git branch | success | View Git branch |
cbaines/applying patch | success | View Laminar job |
cbaines/issue | success | View issue |
Reily Siegel schreef op do 03-02-2022 om 19:25 [-0500]:
> + (synopsis "Additional jvm-specific passes for @code{tools.analyzer}")
Is it jvm-specific, or Java-specific? Also, isn't Clojure based on
Java, so Java-specific seems a tautology here?
Greeting,
Maxime.
Maxime Devos <maximedevos@telenet.be> writes: > Is it jvm-specific, or Java-specific? This is JVM-specific, as clojure compiles directly to JVM bytecode, without an intermediary Java state. > Also, isn't Clojure based on Java, so Java-specific seems a tautology > here? There are also other implementations of Clojure that run on other platforms, such as the CLR, JavaScript, and BEAM, and one under development for Flutter.
Reily Siegel schreef op ma 07-02-2022 om 13:04 [-0500]: > > Is it jvm-specific, or Java-specific? > This is JVM-specific, as clojure compiles directly to JVM bytecode, > without an intermediary Java state. Compiling to Java bytecode does not imply the JVM -- for example, GCJ can compile Java bytecode to native code, according to <https://gcc.gnu.org/wiki/GCJ_FAQ>. There is no JVM involved in this situation. Greetings, Maxime.
Maxime Devos <maximedevos@telenet.be> writes: > Compiling to Java bytecode does not imply the JVM -- for example, > GCJ can compile Java bytecode to native code, according to > <https://gcc.gnu.org/wiki/GCJ_FAQ>. There is no JVM involved in this > situation. Yes. However, here "Java Bytecode" has nothing to do with the Java programming language. It could have been produced by any programming language that executes on the JVM. The Java, as well as Clojure compilers produce bytecode that is designed to run on the Java Virtual Machine. The fact that other programs can analyze that bytecode and do something else with it doesn't seem super relevant to me. We wouldn't call x86 assembly "C bytecode" because you could theoretically run it in an emulator and not on an x86 processor. I really don't think this is worth a huge debate, but my concern is that changing this to Java implies that it only works with the Java programming language, and not any other programming language or tool that respects JVM bytecode, of which there are several (Scala, Groovy, Kotlin, etc.).
diff --git a/gnu/packages/clojure.scm b/gnu/packages/clojure.scm index 7e188b99b6..4cd50483e3 100644 --- a/gnu/packages/clojure.scm +++ b/gnu/packages/clojure.scm @@ -670,6 +670,34 @@ (define-public clojure-tools-analyzer @code{tools.analyzer.jvm}, @code{tools.analyzer.js}") (license license:epl1.0))) +(define-public clojure-tools-analyzer-jvm + (package + (name "clojure-tools-analyzer-jvm") + (version "1.2.2") + (home-page "https://github.com/clojure/tools.analyzer.jvm") + (source (origin + (method git-fetch) + (uri (git-reference + (url home-page) + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1ibvgvfa4618l5d0pff9gjar1s0fwagi029v4allk7z3swb93ibr")))) + (build-system clojure-build-system) + (arguments + '(#:source-dirs '("src/main/clojure") + #:test-dirs '("src/test/clojure") + #:doc-dirs '("doc"))) + (propagated-inputs (list clojure-core-memoize + clojure-tools-reader + clojure-tools-analyzer + java-asm)) + (synopsis "Additional jvm-specific passes for @code{tools.analyzer}") + (description "An analyzer for Clojure code, written on top of +@code{tools.analyzer}, providing additional jvm-specific passes.") + (license license:epl1.0))) + (define-public clojure-tools-cli (package (name "clojure-tools-cli")