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

autospec doesn't pick up new packages in the package database #7

Open
soenkehahn opened this issue Apr 18, 2015 · 3 comments
Open

autospec doesn't pick up new packages in the package database #7

soenkehahn opened this issue Apr 18, 2015 · 3 comments

Comments

@soenkehahn
Copy link

If you install a new package into the used package database while autospec is running it doesn't pick up this new package. I guess this is because ghci has to be restarted to scan the package database anew.

I'm not sure how this could be solved or if it should be solved at all. Restarting autospec seems easy enough. It's just somewhat confusing if you're not aware of the behaviour.

Maybe autospec could monitor the package database through inotify.

@sol
Copy link
Member

sol commented Apr 18, 2015

Do you think there is a reliable way to determine the used package database?

Sent from my iPhone

On 18 Apr 2015, at 3:54 pm, Sönke Hahn [email protected] wrote:

If you install a new package into the used package database while autospec is running it doesn't pick up this new package. I guess this is because ghci has to be restarted to scan the package database anew.

I'm not sure how this could be solved or if it should be solved at all. Restarting autospec seems easy enough. It's just somewhat confusing if you're not aware of the behaviour.

Maybe autospec could monitor the package database through inotify.


Reply to this email directly or view it on GitHub.

@soenkehahn
Copy link
Author

I don't know if there is a 100% reliable way. There is also the issue (as you mentioned offline) of packages installed by package managers. The thing is that it is not harmful to trigger restarts too often. So autospec could just look in the usual places for package databases, i.e. in sandboxes in the current directory and ~/.ghc.

@fisx
Copy link
Contributor

fisx commented Oct 17, 2015

I think I found a way to do this:

liqd/thentos@5b45a6e

It is not pretty, but I think it works:

  1. remove the packages you want to watch from the package database
  2. add cabal Path_* modules as explained in http://neilmitchell.blogspot.de/2008/02/adding-data-files-using-cabal.html
  3. use -i to add source trees to the current package.

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

No branches or pull requests

3 participants