-
Notifications
You must be signed in to change notification settings - Fork 12
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
Don't restart for removed or renamed modules #290
Don't restart for removed or renamed modules #290
Conversation
78df0b3
to
101cb5a
Compare
101cb5a
to
d02745f
Compare
.await | ||
.expect("ghciwatch loads ghci"); | ||
|
||
session.fs_mut().disable_load_bearing_sleep(); |
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.
This API is clumsy, the load bearing sleep value should be tied to the particular Fs
instance, not shared.
modules | ||
.iter() | ||
.map(|path| { | ||
self.module_import_name(show_paths, path) |
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.
These ModuleSet
APIs are showing some strain, but it's not clear what to replace them with. I tried a few designs and didn't like the results.
d02745f
to
26cf79b
Compare
Ghcid crashes when modules are removed/renamed because all it can do to the underlying GHCi session is `:reload`, and a GHCi bug [1] means that the GHCi session will crash when this happens. Because ghciwatch tracks which files/modules are loaded in the session, it can accurately `:unadd` files from the session when they're removed on disk, without requiring the session be restared. This should speed up development. [1]: https://gitlab.haskell.org/ghc/ghc/-/issues/11596
26cf79b
to
d66522a
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.
LGTM!
Ghcid crashes when modules are removed/renamed because all it can do to the underlying GHCi session is
:reload
, and a GHCi bug means that the GHCi session will crash when this happens.Because ghciwatch tracks which files/modules are loaded in the session, it can accurately
:unadd
files from the session when they're removed on disk, without requiring the session be restared.This should speed up development.
I'm going to cut 1.0 with this while we're at it.
patch
,minor
, ormajor
to request a version bump when it's merged.docs/
.tests/
.