lambdaisland / lambdaisland/classpath

Enhancement request: fn to add deps map to the classpath

Open
#1 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

documentation
Dominant language
Clojure
Stars
90
Forks
7
PR merge metrics
No merged PRs in 30d

Description

I realise update-classpath! can be used to achieve this, but it would be handy to have a dedicated fn in the lambdaisland.classpath ns that took a "deps map" (i.e. just the :deps portion of a deps.edn file), and added any missing dependencies described there to the active REPL classpath.

In effect this would emulate what pomegranate does, but with direct support for tda's "deps map" format (as well as things like git/sha coordinates), rather than leiningen's style of coordinates.

In my use case I'm running a clj initiated REPL outside the context of a "project", so there's no deps.edn file present to watch for changes. Instead, I want to try out different libraries by first finding them (e.g. using things like find-deps), downloading them from within the REPL, (requireing them, and then discovering and experimenting with their features. Only afterwards might a deps.edn file come out of that work.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with update-classpath! in src/lambdaisland/classpath.clj around line 263, then trace the existing dependency and classpath handling. The requested result is a public function in the lambdaisland.classpath namespace that accepts a deps.edn :deps map, supports the described coordinate forms, and adds missing dependencies to the active REPL classpath.

Written by the indexing model from the issue text.

Assessment

Tech stack
clojure
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.