Skip to content
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

extra-include-dirs in stack.yaml in implicit global config ignored from outside of a project #964

Closed
mpilgrem opened this issue Sep 9, 2015 · 7 comments

Comments

@mpilgrem
Copy link
Member

mpilgrem commented Sep 9, 2015

I am not sure if this is supposed to happen: I am using stack version 0.1.4.0 on Windows 10 (64 bit). I have set extra-include-dirs and extra-lib-dirs in stack.yaml but those settings seem to be ignored when I run stack from outside a project. For example, if I run stack path the corresponding items are shown as empty in the output unless I run stack path in the folder which is the config-location (or a sub-folder).

@borsboom
Copy link
Contributor

borsboom commented Sep 9, 2015

What is the path where you put this stack.yaml?

@mpilgrem
Copy link
Member Author

mpilgrem commented Sep 9, 2015

It is at: (config-location:) C:\Users\[My User Name]\AppData\Roaming\stack\global\stack.yaml.

@borsboom
Copy link
Contributor

borsboom commented Sep 9, 2015

Try moving it up a level, to C:\Users\[My User Name]\AppData\Roaming\stack\stack.yaml. The "global project" is the default project used when you not inside another project, and its stack.yaml will be ignored if you are in a project with its own stack.yaml. On the other hand, stack\stack.yaml sets the defaults that apply to all projects.

@mpilgrem
Copy link
Member Author

mpilgrem commented Sep 9, 2015

Thank you. That works.

@rvion
Copy link
Contributor

rvion commented Sep 10, 2015

how about adding small Readme.md in those folder ?
Having specific documentation about those fodlers scope directly in them would prevent future bug report like this one.

The content could be:

the `stack.yaml` file in this folder is for xxxx
for more details, see the full documentation here: https://yyyy

@borsboom
Copy link
Contributor

I just added a bit of clarifying text to the stack.yaml documentation (which was already pretty clear), and also opened #969 to make ~/.stack/global/stack.yaml self-document its use.

Since the user's original problem is resolved, closing this issue.

@mpilgrem
Copy link
Member Author

I agree that the stack.yaml documentation was already pretty clear but, as a Windows user, it was borsboom's suggestion above that caused me to understand it better. Perhaps if I explain my own confusion, it will help design documentation that will help others. I do so below.

First, non-Windows paths are unfamilar to me. It would help to have the equivalent Windows paths, for a plain vanilla Windows installation of stack, added in parentheses to the stack.yaml documentation (where there is an equivalent).

Second, I understood that there could be project-specific stack.yaml files (in the folder from which stack was run, or its parent if not there, and so on) and that that project-specific file could contain options that were classified as 'project-specific' and options that were classified as 'non-project specific'.

However, I did not understand that there were two 'default' stack.yaml files in the absence of a project-specific one:

(1) one default file in \stack\global\ for options that are classified as 'project-specific' (which file already existed and is often referred to in messages produced by stack itself - I think I must have misunderstood also what 'config-location' means in the output of stack path; I am not sure that meaning is documented); and

(2) one default file in \stack\ for options that are not classified as 'project-specific' (which file did not already exist in my installation).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants