haskell / haskell/cabal

multi-repl: Should a target imply loading it's download closure?

Open
#8,862 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

In the multi-repl if you specify a single library target then it will *just* load that target. For example, specifying `lib:pkg` will just load `lib:pkg` into the repl.

If you want to everything you can use the `all` selector.

If you want to load `lib:pkg` and all its dependencies into the repl then you have to list all the dependencies (or at least the root dependencies). This can be a bit awkward as it's not clear exactly what the dependency structure is sometimes in big mono-repos. For example in `cabal` repo you have to start a repl with `lib:Cabal-syntax lib:cabal-install` in order to load the 5 library components which you care about.

Would it be better if `cabal repl --enable-multi-repl lib:pkg` loaded `lib:pkg` and all its dependencies into the repl?

Perhaps another solution is to add a new selector type which can express this property?

Contributor guide

Open the contributing guide

Research direction

Start by reproducing `cabal repl --enable-multi-repl lib:pkg` and compare it with the `all` selector and explicit dependency selectors. The issue needs a decided behavior—implicit download-closure loading or a new selector—before implementation scope and completion criteria can be established.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
cli, developer-experience
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.