-
Notifications
You must be signed in to change notification settings - Fork 97
Conversation
The |
b130f7a
to
e31f089
Compare
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.
Changes look good to me. Can we have a test too?
I'm not sure how to test this change. |
Hmmm I cannot think of a nice way either. Why do we want to write interface files on save? Is that for hiedb? |
Yes, it is useful for hiedb Reading the comment again, it doesn't have much to do with the concerns you raised in that comment, but it will make cached interface files available in slightly more scenarios, for faster startups. |
A way to test this might be to check if the interface file exists after saving. But I don't think we can get the path the the ghcide cache directory currently. Maybe we should also introduce unit tests? |
I was thinking that maybe it would become easier to test this when the hiedb changes land |
@wz1000 are you planning to add tests to this? You can know find the location of the cache directory for a given module |
I think this is ready |
* Write ifaces on save * Move isFileOfInterestRule to FileStore.hs and use real mtime for saved files * hlint * Add test * fix flaky tests * Only check for hie file in >= 8.6
* Write ifaces on save * Move isFileOfInterestRule to FileStore.hs and use real mtime for saved files * hlint * Add test * fix flaky tests * Only check for hie file in >= 8.6
* Write ifaces on save * Move isFileOfInterestRule to FileStore.hs and use real mtime for saved files * hlint * Add test * fix flaky tests * Only check for hie file in >= 8.6
To achieve this we augment the FileOfInterest store with a flag that indicates whether a file is saved on disk or not.