{"id":19510079,"url":"https://github.com/frege/frege-lein-plugin","last_synced_at":"2025-04-26T03:32:09.787Z","repository":{"id":27348826,"uuid":"30823953","full_name":"Frege/frege-lein-plugin","owner":"Frege","description":"Support Frege compiler via leiningen","archived":false,"fork":false,"pushed_at":"2016-05-22T23:49:07.000Z","size":51,"stargazers_count":33,"open_issues_count":1,"forks_count":3,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-19T02:28:27.437Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Frege.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-02-15T10:05:02.000Z","updated_at":"2024-10-07T02:30:00.000Z","dependencies_parsed_at":"2022-08-03T17:15:11.397Z","dependency_job_id":null,"html_url":"https://github.com/Frege/frege-lein-plugin","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Frege%2Ffrege-lein-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Frege%2Ffrege-lein-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Frege%2Ffrege-lein-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Frege%2Ffrege-lein-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Frege","download_url":"https://codeload.github.com/Frege/frege-lein-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250926871,"owners_count":21509052,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T23:14:26.279Z","updated_at":"2025-04-26T03:32:09.325Z","avatar_url":"https://github.com/Frege.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"lein-fregec\n===========\n\nA Leiningen plugin to compile Frege (http://www.frege-lang.org) code.\n\nUsage - Simple\n-----\n\nThe easiest way to use Leiningen with Frege (or with Clojure and Frege) is to take advantage of the `frege` template --\n[frege-lein-template](https://github.com/Frege/frege-lein-template) -- to create a new Leiningen project for either a pure Frege project or a mixed Clojure / Frege project (with a Clojure main entry point):\n\n    lein new frege myapp\n\nThis will create a folder called `myapp` containing a Leiningen project with an example of a pure Frege program in it. If you want a mixed Clojure / Frege project:\n\n    lein new frege myapp -- :with-clojure\n\nThe Frege template will always set up a project with the most recent stable version of Frege. If you want to modify the `project.clj` file, read the section below on what settings are available.\n\nUsage - Manual\n-----\n\nIf you already have a Leiningen project, you can add this plugin as follows:\n\nAdd `[lein-fregec \"3.24-7.100\"]` to `:plugins` in your `project.clj`. The version of `lein-fregec` matches the version of the Frege compiler it is compatible with and uses.\n\nUsage - Configuration \u0026 Execution\n-----\n\nSet `: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). The template generates projects that either use `src` (pure Frege) or `src/frege` (mixed Clojure / Frege).\n\nIf you created `project.clj` manually, rather than via the `frege` template -- or you are upgrading an older `project.clj` file -- then you must tell the Frege compiler to target Java 7 explicitly, either in `project.clj`:\n\n```clojure\n:fregec-options [\"-target\" \"1.7\"]\n```\n\nor via the command line (see below for more about Frege compiler options):\n\n```sh\nlein fregec :target 1.7\n```\n\nThat is added to `project.clj` automatically by the 3.24-7.100 version of the `frege` template.\n\nRun `lein fregec` to compile Frege source files to `.class` files.\n\nThe output of compilation will go to the `:compile-path` directory, which defaults to `target/classes/` in Leiningen.\n\nYou may specify additional Frege compiler options via `:fregec-options` in `project.clj` (as a vector of strings) or via the command line. Note that command line options for Leiningen tasks start with `:` (and are converted to `-` options automatically):\n\n```sh\nlein fregec :v\n```\n\nThis will pass `-v` to the Frege compiler (verbose mode). If you want to see the full list of options being passed to the Frege compiler, set the `DEBUG` environment variable to `true`:\n\n```sh\nDEBUG=true lein fregec\n```\n\nThis will also display the exact version of the Frege compiler that the plugin is using.\n\nRun `lein uberjar` to compile Frege source files and create a JAR file in the `target/` folder. You need to ensure that Frege compilation is part of the `:uberjar` profile in `project.clj`:\n\n```clojure\n:profiles {:uberjar {:aot :all\n                     :prep-tasks [\"fregec\" \"compile\"]}}\n```\n\nThis tells Leiningen to run the `fregec` task and the `compile` task before building the JAR file. That will run the Frege compiler and also compile any Clojure code in the project.\n\nAlso, in order to include the Frege runtime in the resulting JAR file, you will need the following dependency in your `project.clj` file:\n\n```clojure\n:dependencies [[org.frege-lang/frege \"3.24-7.100]]\n```\n\nThe version here should exactly match that displayed by `lein-fregec` when you use the `DEBUG=true` environment variable!\n\nThis tells Leiningen that your project depends on Frege, and it will package it into the standalone JAR it produces. The standalone JAR can be run as follows:\n\n```sh\njava -cp target/frege-hello-0.1.0-SNAPSHOT-standalone.jar Hello\n```\n\nThis assumes your `project.clj` starts out like this:\n\n```clojure\n(defproject frege-hello \"0.1.0-SNAPSHOT\"\n  ...)\n```\n\nYou can also run your (pure Frege) code by specifying `:run` and the class name (followed by any arguments for your `main` method):\n\n```sh\nlein fregec :run Hello\n```\n\nArguments to the Frege compiler should come before `:run` (and can use `:` or `-` to introduce them). Arguments to the program being run should come after the class name (and are passed exactly as-is).\n\nIf you have tests, you can run those using `:test`:\n\n```sh\nlein fregec :test HelloTest\n```\n\nThis is equivalent to:\n\n```sh\nlein fregec :run frege.tools.Quick HelloTest\n```\n\nYou can pass flags to QuickCheck like this:\n\n```sh\nlein fregec :test -v HelloTest\n```\n\nwhich is equivalent to:\n\n```sh\nlein fregec :run frege.tools.Quick -v HelloTest\n```\n\nThere will also be a non-standalone JAR will which does not contain the Frege runtime.\n\nAn example of a pure Frege project can be found in the [hello directory](https://github.com/Frege/frege-lein-plugin/tree/master/hello) which is a self-contained Leiningen project with its own README.\n\nAn example of mixed Clojure / Frege usage can be found in the [example directory](https://github.com/Frege/frege-lein-plugin/tree/master/example) which is also a self-contained project.\n\nLicense\n-------\n\nCopyright (c) 2014-2016 Sean Corfield\n\nDistributed under the BSD License, the same as Frege.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrege%2Ffrege-lein-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrege%2Ffrege-lein-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrege%2Ffrege-lein-plugin/lists"}