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

Using multiple files with same htdevtools instance #18

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nh2
Copy link

@nh2 nh2 commented Aug 21, 2013

I am currently trying:

hdevtools check file1.hs
hdevtools check file2.hs
hdevtools check file1.hs

and realized that all benefits of hdevtools are lost: Checking file1.hs the second time creates a lot of CPU usage, not using any cached results.

Why is that?

It is also interesting that despite losing the hdevtools benefits, hdevtools still uses a lot of RAM: Loading a few hundred files easily eats up 10 GB RAM. So there seems to be some caching going on, but not actually being used.

How am I supposed to use hdevtools with multiple files?

@nh2
Copy link
Author

nh2 commented Aug 21, 2013

I've implemented this for ghc-mod; it seems quite easy to do!

nh2/ghc-mod@3f9c1c2

All that's needed is replacing GHC.setTargets [target] with GHC.setTargets targets`.

@nh2
Copy link
Author

nh2 commented Aug 21, 2013

I'm implementing this.

Using this, full projects can be quickly typechecked, e.g. using

    find . -type f -name "*.hs" | xargs hdevtools check

or in shells that support it:

    hdevtools check **/*.hs
@bitc
Copy link
Owner

bitc commented Aug 26, 2013

Hi @nh2, thanks for this.

I'm not quite sure why you were originally having problems. As you observed, hdevtools is using lots of memory, and so it should be caching file1.hs and the second call should finish immediately.

I think it would be worth investigating what's going on here...

@nh2 nh2 mentioned this pull request Sep 3, 2013
dan-t pushed a commit to dan-t/hdevtools that referenced this pull request Oct 19, 2015
Add support for passing extra options to Cabal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants