{"action":"created","issue":{"url":"https://api.github.com/repos/commercialhaskell/stack/issues/2959","repository_url":"https://api.github.com/repos/commercialhaskell/stack","labels_url":"https://api.github.com/repos/commercialhaskell/stack/issues/2959/labels{/name}","comments_url":"https://api.github.com/repos/commercialhaskell/stack/issues/2959/comments","events_url":"https://api.github.com/repos/commercialhaskell/stack/issues/2959/events","html_url":"https://github.com/commercialhaskell/stack/issues/2959","id":203867889,"number":2959,"title":"The stack config.yaml on Windows systems","user":{"login":"CMCDragonkai","id":640797,"avatar_url":"https://avatars.githubusercontent.com/u/640797?v=3","gravatar_id":"","url":"https://api.github.com/users/CMCDragonkai","html_url":"https://github.com/CMCDragonkai","followers_url":"https://api.github.com/users/CMCDragonkai/followers","following_url":"https://api.github.com/users/CMCDragonkai/following{/other_user}","gists_url":"https://api.github.com/users/CMCDragonkai/gists{/gist_id}","starred_url":"https://api.github.com/users/CMCDragonkai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CMCDragonkai/subscriptions","organizations_url":"https://api.github.com/users/CMCDragonkai/orgs","repos_url":"https://api.github.com/users/CMCDragonkai/repos","events_url":"https://api.github.com/users/CMCDragonkai/events{/privacy}","received_events_url":"https://api.github.com/users/CMCDragonkai/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-01-29T12:49:34Z","updated_at":"2017-01-31T22:34:55Z","closed_at":null,"body":"According to https://github.com/commercialhaskell/stack/blob/master/doc/yaml_configuration.md there's nothing about the configuration file's location in Windows, in fact most of the docs seem to imply that `~/.stack/config.yaml` should also work on Windows. However I found that the configuration file is located here: `%APPDATA%\\stack\\config.yaml`. If I create `%USERPROFILE%\\.stack\\config.yaml`, will this be read by stack? And if not, why not? GHCI supports reading `%USERPROFILE%\\.ghci` on Windows. I work on both Windows, Cygwin and Linux, and would prefer to have the configuration files in a standardised location (makes my .dotfiles simpler)."},"comment":{"url":"https://api.github.com/repos/commercialhaskell/stack/issues/comments/276515425","html_url":"https://github.com/commercialhaskell/stack/issues/2959#issuecomment-276515425","issue_url":"https://api.github.com/repos/commercialhaskell/stack/issues/2959","id":276515425,"user":{"login":"Blaisorblade","id":289960,"avatar_url":"https://avatars.githubusercontent.com/u/289960?v=3","gravatar_id":"","url":"https://api.github.com/users/Blaisorblade","html_url":"https://github.com/Blaisorblade","followers_url":"https://api.github.com/users/Blaisorblade/followers","following_url":"https://api.github.com/users/Blaisorblade/following{/other_user}","gists_url":"https://api.github.com/users/Blaisorblade/gists{/gist_id}","starred_url":"https://api.github.com/users/Blaisorblade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Blaisorblade/subscriptions","organizations_url":"https://api.github.com/users/Blaisorblade/orgs","repos_url":"https://api.github.com/users/Blaisorblade/repos","events_url":"https://api.github.com/users/Blaisorblade/events{/privacy}","received_events_url":"https://api.github.com/users/Blaisorblade/received_events","type":"User","site_admin":false},"created_at":"2017-01-31T22:34:55Z","updated_at":"2017-01-31T22:34:55Z","body":"First, it'd be good to fix the docs—a PR would be great!\r\n\r\nSecond, the location of `~/.stack` can be set via STACK_ROOT (which the docs recommend anyway for other reasons). But most of it is data that doesn't belong in dotfiles (though maybe that can be fixed via a `.gitignore`). I'd maybe take a look at Windows symlinks, even though they can only be created by root?\r\n\r\nThird: changing the default location read would be awkward, but adding a new path might be an option if there's sufficient demand for the extra code complexity and testing — though it's not obvious this qualifies. However, `%USERPROFILE%\\.stack\\config.yaml` seems a bit inconsistent with other programs. Also, I'm afraid, stack seems to assume all its data is in the same `.stack`.\r\n\r\nAbout the GHCi behavior: So, I'm not sure why GHCi does that, or which GHC version that is: Is yours, by any chance, a Cygwin-based GHCi? That might make a difference.\r\n\r\nStack uses a somewhat standard Haskell API to determine the location, and its docs specify using %APPDATA% on Windows. I'm not sure that would apply to Cygwin. *Also*, this is an API for folder locations, not for files...\r\nhttps://www.stackage.org/haddock/lts-7.0/path-io-1.2.0/Path-IO.html#v:getAppUserDataDir\r\nhttps://hackage.haskell.org/package/directory-1.3.0.1/docs/System-Directory.html#v:getAppUserDataDirectory\r\n\r\nApparently, a better API for this purpose might be `getXdgDirectory`, but since `~/.stack` mixes config and data it'd be awkward to use."}}
{"actor":{"display_login":"Blaisorblade"}}