ClojureScript

Add a dummy project.clj file for convenience of using Leiningen's checkouts

Details

  • Type: Enhancement Enhancement
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Description

Leiningen has a checkouts feature whereby linking to a Leiningen project's root directory inside the checkouts/ directory at the root of one's own project allows one to use the linked version in preference to the releases available in public repositories. This is very convenient during development.

In ClojureScript's case, this is useful both for using bleeding edge ClojureScript for compiling one's projects and for testing various unreleased ClojureScript features in the context of test projects.

It's already possible to achieve much the same result by adding ClojureScript's source directories to :extra-classpath-dirs in one's project.clj, but the checkouts solution feels cleaner and simpler, in particular in that it does not require cluttering one's project.clj file with such entries. For example, I like to test core.rrb-vector with various tweaks to ClojureScript proper, but of course I don't want to commit project.clj entries specific to my environment. At the same time, I'd rather not add and remove those entries all the time. Checkouts solve this for me very cleanly. Turning them off to test with regular dependencies is a matter of moving the checkouts directory away. Using checkouts, however, requires a project.clj to be present in each linked project, as Leiningen uses it to discover the appropriate directories to put on the classpath.

This ticket proposes to add a project.clj to ClojureScript, with a comment stating that it is only meant to facilitate the use of Leiningen's checkouts feature and is not to be considered as a source of canonical project metadata. The forthcoming patch does as much.

Activity

Hide
David Nolen added a comment -

One small concern I have is that I believe the checkouts feature of Leiningen is deprecated?

Show
David Nolen added a comment - One small concern I have is that I believe the checkouts feature of Leiningen is deprecated?
Hide
Michał Marczyk added a comment -

I don't think so, see e.g. https://github.com/technomancy/leiningen/issues/1190 (recent issue dealing with checkouts with a very fresh comment from Phil without any mention of deprecation); also Lein's tutorial explains checkouts in detail (again, no deprecation notice).

Show
Michał Marczyk added a comment - I don't think so, see e.g. https://github.com/technomancy/leiningen/issues/1190 (recent issue dealing with checkouts with a very fresh comment from Phil without any mention of deprecation); also Lein's tutorial explains checkouts in detail (again, no deprecation notice).
Hide
Jozef Wagner added a comment -

+1 for project.clj. Maybe we should also put all relevant dependencies there, something like in https://github.com/wagjo/clojurescript/blob/master/project.clj

Show
Jozef Wagner added a comment - +1 for project.clj. Maybe we should also put all relevant dependencies there, something like in https://github.com/wagjo/clojurescript/blob/master/project.clj
Hide
David Nolen added a comment -
Show
David Nolen added a comment - see CLJS-578

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: