-
Notifications
You must be signed in to change notification settings - Fork 206
Conversation
@@ -67,26 +65,6 @@ baseDescriptor = PluginDescriptor | |||
} | |||
, cmdFunc = commandDetailCmd | |||
} | |||
, Command | |||
{ cmdDesc = CommandDesc | |||
{ cmdName = "pwd" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it may be worthwhile keeping this one, but removing "cwd"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why? pwd is a constant in this case.
@cocreature: Refactored it out to a function. |
There is some logic in setting the initial directory, with a "give up leave it unchanged" option. I do not believe there is any harm in being able to request the current working directory. It is not a stateful operation. |
BTW, I am just working through some ghc-mod commands, in particular the "find" command, which works in the context of the current project, which it detects using the find cradle process. The cradle is defined as the point where the cabal file is found, and the search starts at the current directory. So in the normal (non-HIE) case, ghc-mod is started up in the project directory and can then find the cradle by looking in the current directory or moving up. In the stateless mode, we can work around this by setting the We also need to consider the case where there is more than one HIE instance running at a time, attached to different projects. |
Yes, |
And about having a |
OK, you've worn me down. I'll have to sneak it into a private plugin if I want to debug. Maybe we should just log the directory chosen on startup. Then we are both happy. |
Can you rebase this, then merge? |
Do not suggest or encourage using state in plugins, not in the form of current working directory.
Do not suggest or encourage using state in plugins, not in the form of current working directory.
Reference #45.