cursive icon indicating copy to clipboard operation
cursive copied to clipboard

Unquoting in AOT settings causes inconsistencies between Cursive and Leiningen

Open liamclarkedev opened this issue 1 year ago • 0 comments

Description

Cursive appears to have an issue with correctly compiling ahead-of-time settings when unquoting the expression. This results in an inconsistency between Cursive and lein uberjar, making Cursive fail to load Leiningen projects with a syntax error.

Steps to reproduce

  1. Create a new project.
  2. Unquote an AOT value.
(defproject unquote-test "0.1.0-SNAPSHOT"
  :dependencies [[org.clojure/clojure "1.11.1"]]
  :profiles {:uberjar {:aot ~(clojure.edn/read-string "[unquote-test.core]")}}
  :repl-options {:init-ns unquote-test.core})
  1. Refresh Leiningen projects in Cursive IDE.

Expected outcome

The project is loaded without syntax error.

Actual outcome

Running lein uberjar compiles successfully.

Compiling unquote-test.core
Created .../unquote-test/target/unquote-test-0.1.0-SNAPSHOT.jar
Created .../unquote-test/target/unquote-test-0.1.0-SNAPSHOT-standalone.jar

Cursive IDE results in the following error:

Error loading .../unquote-test/project.clj Syntax error compiling at (.../unquote-test/project.clj:3:30). clojure.edn

Environment

Cursive Version: 1.13.0-2023.2 Leiningen Version Test 1: 2.10.0 on Java 20.0.1 OpenJDK 64-Bit Server VM Leiningen Version Test 2: 2.9.10 on Java 11.0.16 OpenJDK 64-Bit Server VM

liamclarkedev avatar Oct 12 '23 09:10 liamclarkedev