-
-
Notifications
You must be signed in to change notification settings - Fork 367
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
[WIP] Metaprogramming interface to tactics #524
Conversation
… into metaprogramming
) | ||
Right mp -> ([], Just mp) | ||
define $ \GetMetaprogramCache _ -> do | ||
files <- liftIO getKnownFiles |
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.
GetMetaprogramCache
won't be recomputed when the result of getKnownFiles
changes.
Also, there's already a function called getKnownFiles
in ghcide, you should rename it to avoid confusion.
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.
Good catch. What's the right way to discover new files in shake?
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.
Create an early cutoff rule for getKnownFiles
, and use alwaysRerun
.
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.
Although that might not be such a good idea, since it would call ls
every time a codeaction is generated, right?
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 guess you need to register a file watcher with the client, like we were discussing earlier on IRC.
66ada8c
to
d4f5d43
Compare
@isovector Is this PR still relevant? If not, could you close this PR? |
@Ailrun yes, it's still relevant. |
This PR introduces a tactic metaprogramming language for creating new code actions and extending
Attempt to fill hole
. It will automatically find scripts under$XDG_CONFIG_HOME/hls-tactics-plugin
and load them into the tactics plugin.