[purs ide] Tracks the cache-db.json timestamp#3799
[purs ide] Tracks the cache-db.json timestamp#3799kritzcreek merged 4 commits intopurescript:masterfrom
Conversation
This allows us to trigger a full reload when someone other than the IDE invoked the compiler
Are you talking about something other than |
That's what I'm talking about, yeah. Though if you're starting the ide-server from within emacs it'll immediately issue a |
So this change will only trigger a full reload if there's a change from outside the IDE? I thought you meant it would do a full reload when it detects any change, even inside the IDE. |
|
Oh no, for reloads after ide rebuilds it only reloads the module that was just changed. |
|
Cool. Sorry for the noise 😅 |
|
No worries, I appreciate people making me explain what I did. Usually uncovers some stupid stuff 😆 |
|
I've been using this for a bit on my own and so far it seems to be working well, didn't have to reload once, even after adding new packages to the project. I'll remove all the flags apart from the |
The editor mode functionality is the default now, and we're checking the cache-db.json timestamp to invalidate our externs store instead. This means we can get rid of the flaky file watcher
|
The |
makes the formatting consistent within this file at least
|
I've added a formatting commit that you might want to ignore during the review, but the various inconsistencies were growing on me, sorry :D |
hdgarrood
left a comment
There was a problem hiding this comment.
Thanks - this looks good to me!
|
@nwolverson I'll merge this, if you'd like me to summarize the changes just let me know, I think looking at the changes in |
* [purs ide] Tracks the cache-db.json timestamp This allows us to trigger a full reload when someone other than the IDE invoked the compiler * fixes tests * [purs ide] removes editor mode flag and the file watcher The editor mode functionality is the default now, and we're checking the cache-db.json timestamp to invalidate our externs store instead. This means we can get rid of the flaky file watcher * Formats the Ide.Types module into how I'd write Haskell today makes the formatting consistent within this file at least
* [purs ide] Tracks the cache-db.json timestamp This allows us to trigger a full reload when someone other than the IDE invoked the compiler * fixes tests * [purs ide] removes editor mode flag and the file watcher The editor mode functionality is the default now, and we're checking the cache-db.json timestamp to invalidate our externs store instead. This means we can get rid of the flaky file watcher * Formats the Ide.Types module into how I'd write Haskell today makes the formatting consistent within this file at least
This allows us to trigger a full reload when someone other than the IDE invoked the compiler. Together with --editor-mode this should be a good enough default to not file watching anymore (if we agree that's the case I'll merge #3776 into this PR).
The one thing that is a bit off is that this triggers a full load when it detects a change, which kind of defeats the Load command allowing the clients to selectively load modules, but none of the editor plugins are doing that as far as I know.