Skip to content

Commit

Permalink
Fix #9 by updating to latest Frege version
Browse files Browse the repository at this point in the history
  • Loading branch information
seancorfield committed Oct 22, 2015
1 parent fc81998 commit a12b288
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ A Leiningen plugin to compile Frege (http://www.frege-lang.org) code.
Usage
-----

Add `[lein-fregec "3.23.288"]` to `:plugins` in your `project.clj`. The version of `lein-fregec` matches the version of the Frege compiler it is compatible with and uses.
Add `[lein-fregec "3.23.370"]` to `:plugins` in your `project.clj`. The version of `lein-fregec` matches the version of the Frege compiler it is compatible with and uses.

Set `:frege-source-paths` to the location(s) of your Frege source files. Default is the current directory but I highly recommend using `src/frege` and structuring your projects that way (although the `hello` example relies on current directory).

Expand Down Expand Up @@ -40,7 +40,7 @@ This tells Leiningen to run the `fregec` task and the `compile` task before buil
Also, in order to include the Frege runtime in the resulting JAR file, you will need the following dependency in your `project.clj` file:

```clojure
:dependencies [[org.frege-lang/frege "3.23.288-gaa3af0c"]]
:dependencies [[org.frege-lang/frege "3.23.370-g898bc8c]]
```
The version here should exactly match that displayed by `lein-fregec` when you use the `DEBUG=true` environment variable!
Expand Down
6 changes: 3 additions & 3 deletions example/project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
:url "http://example.com/FIXME"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.6.0"]
:dependencies [[org.clojure/clojure "1.7.0"]
;; need to depend on Frege for runtime:
[org.frege-lang/frege "3.23.288-gaa3af0c"]]
:plugins [[lein-fregec "3.23.288"]]
[org.frege-lang/frege "3.23.370-g898bc8c"]]
:plugins [[lein-fregec "3.23.370"]]
:frege-source-paths ["src/frege"]
:main example.core
:profiles {:uberjar {:aot :all
Expand Down
2 changes: 1 addition & 1 deletion hello/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Run the application:

Note that you can also run the application without creating a JAR file after `lein fregec` if you specify the classpath that includes the Frege runtime:

java -cp ~/.m2/repository/org/frege-lang/frege/3.23.288-gaa3af0c/frege-3.23.288-gaa3af0c.jar:target/classes Hello
java -cp ~/.m2/repository/org/frege-lang/frege/3.23.370-g898bc8c/frege-3.23.370-g898bc8c.jar:target/classes Hello

A simpler, but slower way to achieve that is to rely on Leiningen to retrieve the necessary classpath:

Expand Down
4 changes: 2 additions & 2 deletions hello/project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [;; need to depend on Frege for uberjar:
[org.frege-lang/frege "3.23.288-gaa3af0c"]]
:plugins [[lein-fregec "3.23.288"]]
[org.frege-lang/frege "3.23.370-g898bc8c"]]
:plugins [[lein-fregec "3.23.370"]]
:profiles {:uberjar {:prep-tasks ["fregec"]}})
2 changes: 1 addition & 1 deletion project.clj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(defproject lein-fregec "3.23.288"
(defproject lein-fregec "3.23.370"
:description "Leiningen plugin to compile Frege source code"
:url "https://github.com/Frege/frege-lein-plugin"
:license {:name "Eclipse Public License"
Expand Down
2 changes: 1 addition & 1 deletion src/leiningen/fregec.clj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
(:import java.io.File
(java.nio.file Files Paths)))

(def ^:private fregec-version "3.23.288-gaa3af0c")
(def ^:private fregec-version "3.23.370-g898bc8c")

(defn- stale-frege-sources
"Returns a lazy seq of file paths: every Frege source file within dirs modified
Expand Down

0 comments on commit a12b288

Please sign in to comment.