-
Notifications
You must be signed in to change notification settings - Fork 347
Run hs2hs on .hsc-files before loading #1238
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
Conversation
Disable by setting haskell-process-do-hsc2hs to nil. Tests only work interactively, TODO
file-name))) | ||
|
||
|
||
(defvar haskell-process-do-hsc2hs t |
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.
We would not want to push the burden on users with this variable due to cost described in https://github.com/haskell/haskell-mode/wiki/Customizable-variables
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.
Note that on our build server there is no hsc installed and in general we would love to not depend on hsc. Lets do this:
So basically we mock hsc on shell level. What do you think? |
Sounds good to me. Do we customise test variables in haskell-hs2hs-tests.el, or is there a central file? |
In |
Added a fake script now; how does it look? I still get |
} | ||
") | ||
|
||
(defmacro with-hsc2hs (contents &rest body) |
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 should always use the hsc2hs.sh
script. I do not want reports from people that accidentally have something strange in their paths and therefore tests accidentally pass or fail.
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.
done
This
|
And also note that this whole external program execution testing is tracked by issue #1206. |
Nice! |
How about inlining the contents of
So this will create a new file with contents given, add executable bit, and set the given variable to the path of what was created. What do you think? |
That'd work, but the macro can't clean up the file because it's running async now. Does |
Yes. No cleanup is okay, we might fix that later as low priority. |
You need to create a script that plays the role of GHCi. |
uses new macro `with-script-path'
process seems to just die, although it works fine interactively on the command line
I haven't been able to get that to work; the process seems to just die before it sends any output at all. Does haskell-repl send any signals or such before interaction happens? Should the output be different from running ghci on the command line? |
I do not think there are any signals involved. If there is an async communication isn't that the tests ends up before fake-ghc? |
I was checking I'm just not getting the output in the REPL. I see the output in the haskell-process-log of the fake-ghci if I, instead of |
Interesting. Communication is somehow preprocessed, maybe something is eating your output? |
Ping? Anything happening here? I find this idea really good, so would be lovely to see this pushed forward! |
Hey; I never figured out how to fix this :( (also, I haven't actually had use for hsc2hs in some months months). I'd love to get it working though. Could you explain what happen (or is supposed to happen) between the haskell-process-log and the REPL? I see haskell-mode at least puts the lambda character in the prompt, presumably some other things happen there as well. Since the log shows the expected output, I'm guessing whatever is parsing my fake-ghci is not seeing what it expects. |
Well, I do know as much as you do at this point. A |
Anyway I plan to steal the part with |
Cool; it'd be great if something useful comes of this :) |
I've remade the testing parts in #1331, no awk, just pure elisp :) If you happen to need hsc again then please use my testing functionality. Thanks for inspiration! |
Disable by setting haskell-process-do-hsc2hs to nil.
Tests only work interactively, TODO.
Fixes #1012.