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

should be more robust about unexpected files #30

Open
mwotton opened this issue Apr 12, 2015 · 10 comments
Open

should be more robust about unexpected files #30

mwotton opened this issue Apr 12, 2015 · 10 comments
Labels

Comments

@mwotton
Copy link
Collaborator

mwotton commented Apr 12, 2015

Emacs tends to litter the directory with lockfiles if you don't turn it off (which is not recommended anyway, as you could end up editing the same file in different buffers.)

unfortunately this conflicts with arion: when i start arion with one of these files, I get this:

arion: app/.#SmokeMain.hs: canonicalizePath: does not exist (No such file or directory)

orb ➜  ~/projects/meanpath/smokesignal git:(master) ✗ ls -alrt app/.\#SmokeMain.hs
lrwxrwxrwx 1 mark mark 24 Apr 12 12:14 app/.#SmokeMain.hs -> mark@orb.4645:1427791825

Instead of bombing out on these files, could we just ignore them (or issue a complaint but continue)?

@karun012 karun012 added the bug label Apr 12, 2015
@karun012
Copy link
Owner

I'll look at this. I am a vi user so I don't know much about lockfiles that emacs creates. Is there a pattern to those file names? May be once we find all the haskell files using filemanip's find function we can filter out the lockfiles before computing the canonicalized paths.

@mwotton
Copy link
Collaborator Author

mwotton commented Apr 12, 2015

I think it might be more robust to just catch the exception on opening,
have a bit of a whinge on stdout and continue.

On Mon, 13 Apr 2015 12:17 am Karun notifications@github.com wrote:

I'll look at this. I am a vi user so I don't know much about lockfiles
that emacs creates. Is there a pattern to those file names? May be once we
find all the haskell files using filemanip's find function we can filter
out the lockfiles before computing the canonicalized paths.


Reply to this email directly or view it on GitHub
#30 (comment).

@marcelbuesing
Copy link

Currently experiencing the same problem. Lock files seem to start with ".#". I tried the following but still had the same issues... Although the pattern seems to fit.

findHaskellFiles :: String -> IO [String]
findHaskellFiles = find always ((extension ==? ".hs" ||? extension ==? ".lhs") &&? predEmacsFiles)

predEmacsFiles :: FilterPredicate
predEmacsFiles = fileName /~? ".#?"

@karun012
Copy link
Owner

@marcelbuesing @mwotton May be this will fix it 2a2b88c

@marcelbuesing
Copy link

@karun012 awesome, that seems to solve the problem!

@mwotton
Copy link
Collaborator Author

mwotton commented Jun 22, 2015

hm. still getting this:

/home/mark/projects/meanpath/Perspective/src/Net/Perspective/.#Meanpath.hs changed
/home/mark/projects/meanpath/Perspective/src/Net/Perspective/.#Meanpath.hs does not have any associated tests...

@karun012
Copy link
Owner

I'll take a look.

@karun012
Copy link
Owner

@mwotton ff8dacb - The event processor ignores emacs lock files now.

@karun012
Copy link
Owner

If this is good, can we close the issue?

@mwotton
Copy link
Collaborator Author

mwotton commented Jun 24, 2015

Yes

On Wed, 24 Jun 2015 4:36 pm Karun notifications@github.com wrote:

If this is good, can we close the issue?


Reply to this email directly or view it on GitHub
#30 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants