Skip to content
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

Reload module on save #178

Closed
vanceism7 opened this issue Aug 5, 2019 · 2 comments

Comments

@vanceism7
Copy link

commented Aug 5, 2019

This is related to #15 -- But I'll describe my problem as the issue may be something deeper than I'm thinking.

So here's the basic setup:
I'm on Archlinux -- manjaro
Using spacemacs with emacs v26.2

I'm working on some purescript file, module A.
Now if I make some change in module A, e.g:

module A where

- getFoo :: String
- getFoo = "Hello"
+ getFoo :: Int
+ getFoo = 12

these changes aren't reflected within psc-ide/flycheck. Using psc-ide-show-type (, h t) will show getFoo's type as getFoo :: String. Any other modules that depend on module A will show flycheck errors if they expect Ints instead of strings. This will remain until I send emacs a , m l or , m L.

After reading through #15, it seems that if I build the code, then the module should reload automatically. I enabled the rebuild on save option, but this doesn't seem to help with bringing module A definitions up to date. I also tried manually building using pulp, this also hasn't helped. I also enabled the reload on rebuild setting as well but no joy there.

It looks like this was also referenced in #51 and followed it here: purescript/purescript#2209.
It doesn't look like the fixes used here have totally fixed up this issue. A good solution I can think of here would be to automatically invoke , m L to reload the module when the file is saved. But I could be missing something here?

Thanks for the help!

@vanceism7

This comment has been minimized.

Copy link
Author

commented Aug 6, 2019

Hmm, after diving around the issues, it looks like my problem may have been that I didn't restart my psc-ide server after toggling on the editor mode option. It might be good to add that to the description of the option in the emacs settings

@vanceism7

This comment has been minimized.

Copy link
Author

commented Aug 7, 2019

Looks like editor mode is the option I was looking for. I'm gonna close this

@vanceism7 vanceism7 closed this Aug 7, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.