commercialhaskell / commercialhaskell/stack

Consider how stack plugins should work with global options and docker re-exec

Open
#1,782 0 comments 0 reactions 0 assignees View on GitHub
component: docker component: options parsing type: enhancement
Dominant language
Haskell
Stars
4.1k
Forks
850
Avg merge
10h 37m
Merged PRs (30d)
4

Description

Currently, stack plugins need to be the first argument, like `stack run`. If you use `stack --stack-yaml ... run`, it won't work - see this [FIXME](https://github.com/commercialhaskell/stack/blob/280c5d443d47afd72e6746c87d85ff90cc437903/src/main/Main.hs#L472).

Ideally, we'd parse global options before invoking the plugin, so that:
- We can re-exec in docker
- We can use a PATH variable that includes the project's bin dir and the snapshot's bin dir. This way stack plugins can be installed to these locations.

We might also consider doing something similar to stack's current behavior with docker, where it will copy the stack binary into the docker container. Should it also copy the plugin binary?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.