Add spack edit option for build systems#2865
Conversation
|
I doubt the benefit of these specialized edit commands. Is the Spack directory tree too hard to navigate around? |
|
@citibeth: I use these all the time. Why the opposition? |
The same could be said about I use them all the time too. Super useful. |
I will decline to hijack this thread; see #2867 for the full rant.
There's a difference of degree here. |
Yes. Developers make the project happen. I want to keep them happy. |
becker33
left a comment
There was a problem hiding this comment.
Do we want to consider adding options for other subdirectories of lib/spack/spack? We could easily add -p for platforms and -o for operating_systems. Eventually we reach a point at which naming becomes a challenge, maybe at compilers (-c is already taken for cmd) and beyond that I start to doubt the usefulness (I don't spend a lot of time editing files in hooks, schema, or util).
Are you serious, or asking in jest? This is exactly the absurd state we would do well to avoid. If we want a convenience command to edit stuff, how about something general. Something like: Or even better.... if we can manage to flatten the directory hierachy, we just do: Another thing to consider is... how hard would the |
|
On Wed, Jan 18, 2017 at 3:39 PM, Todd Gamblin ***@***.***> wrote:
@citibeth <https://github.com/citibeth>:
spack edit -b is useful only to Spack developers
Yes. Developers make the project happen. I want to keep them happy.
Then developer-only commands should be sectioned off to not clutter things
up for the vast majority of Spack users.
|
I would say whatever you frequently edit and want a shortcut for. I was actually thinking about adding support for |
As is commonly the case, the I use are remote, and shell/X11 connections cause noticeable usability problems with editors. I solve this problem with Emacs TRAMP: the editor runs on my local machine, and I'm editing files on the remote machine where Spack runs. I just don't use In #1537 I suggested a symbolic link be added to provide a shortcut into the Spack directory tree. This was rejected; but maybe we can reconsider? All this For example... suppose we create a directory Now, the command In addition, to improving
|
Rejecting #1537 did nothing to make this developer happy, and beefing up |
|
@citibeth: have you tried |
|
Sorry: should be |
|
It requires Spack's shell integration, which I don't use. More useful would be a command that just prints out the directory. Then I could type: But seriously... what's wrong with #1537? Yes, I can re-read what you wrote there. But is it really so bad compared to the other roads we're considering going down? Moreover, |
|
The options for to: Why would this be beneficial? It's more typing, and the user has to look up whether it's build_systems or build_system. Anyway, neither would help you due to the fact that you use emacs. Vim ftw! |
|
@adamjstewart: I think @citibeth just wants clearer help text and groupings in the argument help, not |
Did you try: Which is what Out of curiosity, why not use the shell integration? |
No, because it's just not very useful. I need to point my editor (on my laptop) to the correct location, not my bash shell (on the supercomputer). Anyway, this is stuff that I could set up very easily in my Or if I liked what All of this is an order of magnitude simpler than creating a new Spack command. But none of it actually makes my life much easier because my EDITOR, not bash shell, needs to find its way around the Spack tree structure.
I'm not sure why it's not working right now; probably has something to do with my efforts to get a good Spack environment of the packages I needed to install, and changes I made to my |
Because it increases the consistency and rationality of the system. Small systems can afford to have crazy idiosyncratic conventions. The larger a system grows, and the more users are involved, simplicity and clarity increasingly becomes more important than saving keystrokes.
That's what bash aliases are for. If you use Alternatively, if one-letter names for these features are good, we could always create one-letter symlinks as shortcuts, instead of the full-word symlinks I suggested. Then you could do
That's not the point. The real issue is these don't help me because I edit files remotely --- a feature that many Spack users likely take advantage of, or would take advantage of if they knew how to do it in an editor they like. The editor is running on my laptop, while Spack runs on a remote computer. This feature is also available in Vim: vim.wikia.com/wiki/Editing_remote_files_via_scp_in_vim But once you try to use it, |
I've been modifying our build systems pretty heavily lately. So I added a convenience option for
spack editto open these files without having to navigate to the directory or specify the entire path. It works the same as the other options for editing modules, commands, and tests. Simply run:to open the
CMakePackagebuild system in your favorite$EDITOR.