[Hackage] #932: Add cabal run

#932: Add cabal run ----------------------------+----------------------------------------------- Reporter: tibbe | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: Cabal library | Version: 1.10.2.0 Severity: normal | Keywords: Difficulty: unknown | Ghcversion: Platform: | ----------------------------+----------------------------------------------- It would be have a new command, `cabal run`, that builds and runs the executable defined in the package. If there are several executables the user can specify which one to use as `cabal run foo`. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/932 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#932: Add cabal run ----------------------------+----------------------------------------------- Reporter: tibbe | Owner: Type: enhancement | Status: new Priority: low | Milestone: cabal-install-0.16 Component: Cabal library | Version: 1.10.2.0 Severity: normal | Keywords: Difficulty: unknown | Ghcversion: Platform: | ----------------------------+----------------------------------------------- Changes (by kosmikus): * priority: normal => low * type: defect => enhancement * milestone: => cabal-install-0.16 Old description:
It would be have a new command, `cabal run`, that builds and runs the executable defined in the package. If there are several executables the user can specify which one to use as `cabal run foo`.
New description: It would be nice to have a new command, `cabal run`, that builds and runs the executable defined in the package. If there are several executables the user can specify which one to use as `cabal run foo`. -- Comment: Can you provide motivation why this isn't just added complexity in the cabal tool? Where's the advantage compared to building and running as separate steps? -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/932#comment:1 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#932: Add cabal run ---------------------------------+------------------------------------------ Reporter: tibbe | Owner: Type: enhancement | Status: new Priority: low | Milestone: cabal-install-0.16 Component: cabal-install tool | Version: 1.10.2.0 Severity: normal | Keywords: Difficulty: unknown | Ghcversion: Platform: | ---------------------------------+------------------------------------------ Changes (by kosmikus): * component: Cabal library => cabal-install tool -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/932#comment:2 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#932: Add cabal run ----------------------------+----------------------------------------------- Reporter: tibbe | Owner: Type: enhancement | Status: new Priority: low | Milestone: Cabal-1.16 Component: Cabal library | Version: 1.10.2.0 Severity: normal | Keywords: Difficulty: unknown | Ghcversion: Platform: | ----------------------------+----------------------------------------------- Changes (by kosmikus): * component: cabal-install tool => Cabal library * milestone: cabal-install-0.16 => Cabal-1.16 Comment: Sorry, this is really more about the library, true. If it's added, it should probably be supported by ./Setup run, too. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/932#comment:3 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#932: Add cabal run ----------------------------+----------------------------------------------- Reporter: tibbe | Owner: Type: enhancement | Status: new Priority: low | Milestone: Cabal-1.16 Component: Cabal library | Version: 1.10.2.0 Severity: normal | Keywords: Difficulty: unknown | Ghcversion: Platform: | ----------------------------+----------------------------------------------- Comment(by tibbe): It'd make it more convenient to write little shell scripts in Haskell, but still use Cabal for building (which is almost a necessity today), as described here: http://www.yesodweb.com/blog/2012/03/shelly-for-shell-scripts There's a specific comment towards the end about the extra work one has to go through to run such simple programs using Cabal. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/932#comment:4 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#932: Add cabal run ----------------------------+----------------------------------------------- Reporter: tibbe | Owner: Type: enhancement | Status: new Priority: low | Milestone: Cabal-1.16 Component: Cabal library | Version: 1.10.2.0 Severity: normal | Keywords: Difficulty: unknown | Ghcversion: Platform: | ----------------------------+----------------------------------------------- Comment(by duncan): Note that one use case is when exes have data files they need to find. In this case, it's necessary to set the `pkgname_datadir` env var so that the program can find the data files in the build tree. That said, it may be preferable to generate shell scripts in `./dist/inplace/bin` or something like that, rather than providing a `cabal run` command. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/932#comment:5 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects
participants (1)
-
Hackage