Skip to content

Conversation

@isovector
Copy link
Collaborator

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.

)
Right mp -> ([], Just mp)
define $ \GetMetaprogramCache _ -> do
files <- liftIO getKnownFiles
Copy link
Collaborator

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.

Copy link
Collaborator Author

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?

Copy link
Collaborator

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.

Copy link
Collaborator

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?

Copy link
Collaborator

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.

@Ailrun
Copy link
Member

Ailrun commented May 24, 2021

@isovector Is this PR still relevant? If not, could you close this PR?

@isovector
Copy link
Collaborator Author

@Ailrun yes, it's still relevant.

@isovector isovector closed this Oct 12, 2021
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

Successfully merging this pull request may close these issues.

4 participants