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

Spack --dirty in configuration #1925

Closed
citibeth opened this issue Oct 5, 2016 · 11 comments
Closed

Spack --dirty in configuration #1925

citibeth opened this issue Oct 5, 2016 · 11 comments
Labels

Comments

@citibeth
Copy link
Member

citibeth commented Oct 5, 2016

There needs to be a way to configure Spack so when you say spack install, spack diy, etc. --- it does it in "dirty" mode, but without you having to write spack install --dirty on every command line.

The configuration should probably be taken out of one of the files in the .spack directory.

@adamjstewart
Copy link
Member

Users should be able to set default flags for any command. I would personally love to tell spack install to always be verbose.

@citibeth
Copy link
Member Author

citibeth commented Oct 6, 2016

You are absolutely right. Any proposals on the UI for this? I'll throw
one out... suppose I create ~/.spack/defaults.yaml like:

defaults:
    install: [-v --dirty]
    diy: [--dirty]
    setup: [--dirty]

I suppose this might get a bit verbose because certain flags are used again
and again for multiple commands. But I still like it... simple,
straightforward, flexible.

Any sketches on how to go about doing this?

On Wed, Oct 5, 2016 at 10:37 PM, Adam J. Stewart notifications@github.com
wrote:

Users should be able to set default flags for any command. I would
personally love to tell spack install to always be verbose.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#1925 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AB1cd5GV7eqVEN-2cs3-XFZaFkIZREx_ks5qxF7pgaJpZM4KPXgW
.

@tgamblin
Copy link
Member

tgamblin commented Oct 6, 2016

@adamjstewart: Just out of curiosity did you know you can hit v when you type spack install without -v and it'll become verbose?

@adamjstewart
Copy link
Member

@tgamblin Yeah, I think I discovered that by accident forever ago, or you told it to me, I don't remember. But now I just compulsively add the -v

@adamjstewart
Copy link
Member

@citibeth I wouldn't call it defaults.yaml, since packages.yaml is basically defaults as well. I would add it to a generic configuration.yaml with all of the other things that we've been talking about adding global configurations for.

@tgamblin
Copy link
Member

tgamblin commented Oct 6, 2016

@citibeth @adamjstewart: do you know of any tool that has this feature? I suppose ls and grep have *_OPTIONS env vars. I'd put it in the nice-to-have category but there are a lot of other things that need adding...

@tgamblin
Copy link
Member

tgamblin commented Oct 6, 2016

Clarification: I think it's fine to have this for --dirty. I am not so sure that it's worth implementing generally for everything.

@citibeth
Copy link
Member Author

citibeth commented Oct 6, 2016

Git has this feature, you can set things in ~/.gitconfig. For example, see:

citibeth@fabeaa8#diff-3987f26e56771d3a4a844a6990abc25a

@tgamblin
Copy link
Member

tgamblin commented Oct 6, 2016

Git has this implemented for particular features. The part that scares me is "all commands".

I don't think all features map neatly to command options -- e.g. for this one do you really want to have to write 3 lines in your config file to enable dirty builds? Why not a single option for dirty installs in the config?

Same for verbose -- why not a single default verbose flag?

@adamjstewart
Copy link
Member

I agree that it isn't very crucial. I'd rather fix bugs than add new features. I don't think the implementation matters too much. I like the way .gitconfig works.

One thing that will be problematic is that the option flags might change, meaning Spack won't be able to read your configuration file any more until it is updated.

@tgamblin tgamblin mentioned this issue Oct 27, 2016
10 tasks
@tgamblin
Copy link
Member

Fixed by #2152

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

No branches or pull requests

3 participants