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

Exclude tmp file created by Emacs #72

Closed
kisp opened this issue Apr 6, 2017 · 6 comments
Closed

Exclude tmp file created by Emacs #72

kisp opened this issue Apr 6, 2017 · 6 comments

Comments

@kisp
Copy link

kisp commented Apr 6, 2017

Hi,

I'm having trouble excluding a tmp file created by Emacs.

The file is actually a symbolic link that looks similiar to

.#post_test.exs -> user@machine.local.762

I have in my config/config.exs

if Mix.env == :dev do
  config :mix_test_watch, clear: true
  config :mix_test_watch, exclude: [~r/\.#/, ~r/~/]
end

Could you help me debug this?

It's really annoying, because this tmp file gets created very often (after saving and then changing a buffer), so I accidentally trigger more test runs than needed.

@lpil
Copy link
Owner

lpil commented Apr 6, 2017

I'd recommend going inside your deps folder, putting in some logging, and then recompiling the deps. See what's happening in there :)

@cdegroot
Copy link
Contributor

I have exclude: [~r/\.#/] and it works. However, it's mildly annoying to have to specify it in every project. With Git, I have global exclusions in my home directory - might it be an idea to have something similar for this?

@lpil
Copy link
Owner

lpil commented Apr 22, 2017

I'm happy for this to be added to the default ignored patterns. Would you like to make a PR?

@cdegroot
Copy link
Contributor

cdegroot commented Apr 22, 2017

I'd be happy to, but do know that you'll end up with an ever-expanding list of editor/IDE specific patterns that way ;)

(what if there'd be a switch "use .gitignores" or something like that, default to true?)

@lpil
Copy link
Owner

lpil commented Apr 22, 2017

I'm happy to add patterns that cover the most common editors to provide a good out the box experience for most people. I don't think many editors create files that end with .ex anyway.

cdegroot pushed a commit to cdegroot/mix-test.watch that referenced this issue Apr 22, 2017
See lpil#72. I propose adding excludes one commit at a time so it's easier to trace back what editor it is for.
@cdegroot
Copy link
Contributor

cdegroot commented Apr 22, 2017

Like that? (or do you want a test with that?)

cdegroot pushed a commit to cdegroot/mix-test.watch that referenced this issue Apr 22, 2017
See lpil#72. I propose adding excludes one commit at a time so it's easier to trace back what editor it is for.
lpil pushed a commit that referenced this issue Apr 22, 2017
See #72. I propose adding excludes one commit at a time so it's easier to trace back what editor it is for.
@lpil lpil closed this as completed Jul 30, 2018
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