New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stack path #95

Closed
snoyberg opened this Issue May 28, 2015 · 10 comments

Comments

Projects
None yet
4 participants
@snoyberg
Contributor

snoyberg commented May 28, 2015

I closed an issue about this previously, but after discussing with @chrisdone we should implement it. Will have information about:

  • Which GHC is being used
  • Where log files are stored
  • Package databases

@snoyberg snoyberg added this to the Second release milestone May 28, 2015

@DanBurton DanBurton added ready and removed ready labels Jun 1, 2015

@DanBurton

This comment has been minimized.

Contributor

DanBurton commented Jun 3, 2015

@snoyberg @chrisdone the implementation was not obvious to me, so I stubbed it out. I presume you two probably have the knowledge to trivially implement it from here, or give me some pointers on how to go about discovering these values?

Also, I believe the code as written will create a project file if it doesn't exist, and that's probably not what we want it to do. But I don't see any other way to get a BuildConfig, which I presume has the necessary components to determine these paths.

@snoyberg snoyberg assigned snoyberg and unassigned DanBurton Jun 3, 2015

@snoyberg

This comment has been minimized.

Contributor

snoyberg commented Jun 3, 2015

@DanBurton Reassigning to you actually. Please ping me on Slack to ask whatever questions you have about where to get this information.

@snoyberg snoyberg assigned DanBurton and unassigned snoyberg Jun 3, 2015

@snoyberg snoyberg modified the milestones: Third release, Second release Jun 7, 2015

@snoyberg snoyberg assigned DanBurton and snoyberg and unassigned DanBurton Jun 9, 2015

@snoyberg snoyberg added ready and removed in progress labels Jun 15, 2015

@snoyberg snoyberg assigned chrisdone and unassigned snoyberg Jun 16, 2015

@3noch

This comment has been minimized.

Member

3noch commented Jun 17, 2015

Also would be nice to know the path to built binaries.

@3noch

This comment has been minimized.

Member

3noch commented Jun 18, 2015

I'm just one person, but I'd really like to have this, at least for GHC. I tried to figure it out, but it's over my head. I'd be happy to take some pointers.

@3noch

This comment has been minimized.

Member

3noch commented Jun 18, 2015

For now I can just do stack exec -- which ghc.

@chrisdone chrisdone removed the in progress label Jun 21, 2015

chrisdone added a commit that referenced this issue Jun 21, 2015

chrisdone added a commit that referenced this issue Jun 21, 2015

@chrisdone chrisdone assigned snoyberg and unassigned chrisdone Jun 21, 2015

@chrisdone

This comment has been minimized.

Member

chrisdone commented Jun 21, 2015

Done. Passing over to @snoyberg to review. Here's how it looks:

chris@retina:~/Work/stack$ stack path --help
Usage: stack path [--global-stack-root] [--project-root] [--config-location]
                  [--bin-path] [--ghc-paths] [--local-bin-path]
                  [--extra-include-dirs] [--extra-library-dirs]
                  [--snapshot-pkg-db] [--local-pkg-db] [--snapshot-install-root]
                  [--local-install-root] [--dist-dir]
  Print out handy path information

Available options:
  --global-stack-root      Global stack root directory
  --project-root           Project root (derived from stack.yaml file)
  --config-location        Configuration location (where the stack.yaml file is)
  --bin-path               PATH environment variable
  --ghc-paths              Installed GHCs (unpacked and archives)
  --local-bin-path         Local bin path where stack installs executables
  --extra-include-dirs     Extra include directories
  --extra-library-dirs     Extra library directories
  --snapshot-pkg-db        Snapshot package database
  --local-pkg-db           Local project package database
  --snapshot-install-root  Snapshot installation root
  --local-install-root     Local project installation root
  --dist-dir               Dist work directory
chris@retina:~/Work/stack$ stack path 
Caching build plan
Populated index cache.
global-stack-root: /home/chris/.stack/
project-root: /home/chris/Work/stack/
config-location: /home/chris/Work/stack/stack.yaml
bin-path: /home/chris/.stack/snapshots/x86_64-linux/lts-2.9/7.8.4/bin:/home/chris/.local/bin/:/opt/firefox/:/opt/ghc/7.8.4/bin:/home/chris/Projects/xmonad-chrisdone/dist/build/xmonad-chrisdone:/home/chris/.local/bin/:/opt/firefox/:/opt/ghc/7.8.4/bin:/home/chris/Projects/xmonad-chrisdone/dist/build/xmonad-chrisdone:/home/chris/.cabal/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
ghc-paths: /home/chris/.stack/programs/x86_64-linux/
local-bin-path: /home/chris/.local/bin/
extra-include-dirs: 
extra-library-dirs: 
snapshot-pkg-db: /home/chris/.stack/snapshots/x86_64-linux/lts-2.9/7.8.4/pkgdb/
local-pkg-db: /home/chris/Work/stack/.stack-work/install/x86_64-linux/lts-2.9/7.8.4/pkgdb/
snapshot-install-root: /home/chris/.stack/snapshots/x86_64-linux/lts-2.9/7.8.4/
local-install-root: /home/chris/Work/stack/.stack-work/install/x86_64-linux/lts-2.9/7.8.4/
dist-dir: .stack-work/dist/x86_64-linux/Cabal-1.18.1.5/
chris@retina:~/Work/stack$ stack path --snapshot-pkg-db 
snapshot-pkg-db: /home/chris/.stack/snapshots/x86_64-linux/lts-2.9/7.8.4/pkgdb/
chris@retina:~/Work/stack$ 
@snoyberg

This comment has been minimized.

Contributor

snoyberg commented Jun 22, 2015

LGTM. Can you update the ChangeLog about this?

@snoyberg snoyberg closed this Jun 22, 2015

chrisdone added a commit that referenced this issue Jun 22, 2015

@chrisdone

This comment has been minimized.

Member

chrisdone commented Jun 22, 2015

Done!

@3noch

This comment has been minimized.

Member

3noch commented Jun 22, 2015

Can we add an option that shows the path to the version of GHC that will actually be used to build?

@chrisdone

This comment has been minimized.

Member

chrisdone commented Jun 23, 2015

Yeah, that can be included.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment