I want to forbid parsing/compiling of files ending with "_tmp.ex". I have seen in mix.exs, def project, the key "elixirc_paths" but it accepts a list of strings.
Can I set regex?
Can I set negative paths to remove from the compiling paths?
Eg. ["lib", "!lib/something"] will compile all in libs but lib/something.
Eg. ["lib", r~/!.*_tmp\.ex/] will compile all in libs but not files ending with _tmp.ex
If the answer is no, how can I achieve what I want? My use case is when I what to try fast modifications and I clone the file temporarily in the same path, then it should be avoided from compiling. I prefer to avoid changing the original file, because I know I can change the elixir module name and It won’t complain.
@trashyEx: I don’t recommend adding temporary files to lib directory. Instead of I suggest you to move them to for example: priv/lib_tmp and then run them with command: mix run priv/lib_tmp/my_file.ex. Of course you should also add priv/lib_tmp to .gitignore file to avoid mistakes.
Personally, I rely on git for these things. Git branch is so fast and cheap that its great for little experiments, and for really fast / trivial changes, changing in-line is fine as git allows you to very easily and quickly back out changes to files. Unless you have some special need, I would recommend looking at your revision control program for help in these situations.