lbolla / emacs-flycheck-elixir Goto Github PK
View Code? Open in Web Editor NEWFlycheck checker for Elixir files
Flycheck checker for Elixir files
Try installing a more recent version of elixir, and please open a bug report if the issue persists in the latest release. Thanks!
Suspicious state from syntax checker elixir: Flycheck checker elixir returned non-zero exit code 1, but its output contained no errors:
== Compilation error on file flycheck_config.exs ==
** (exit) exited in: GenServer.call(Mix.State, {:get, {Map, :get, [:env, :dev]}}, 5000)
** (EXIT) no process
(elixir) lib/gen_server.ex:596: GenServer.call/3
flycheck_config.exs:27: (file)
(elixir) lib/kernel/parallel_compiler.ex:115: anonymous fn/4 in Kernel.ParallelCompiler.spawn_compilers/1
Try installing a more recent version of elixir, and please open a bug report if the issue persists in the latest release. Thanks!
user-error: Minibuffer window is not active
I constantly see this while editing Elixir projects in Emacs. How to get rid of this error? Thanks.
Currently this checker only reports errors when the file is saved, which can be pretty confusing if you aren't used to that (most Flycheck checkers I've used work on unsaved files).
I've heard that elixirc
doesn't support compiling from stdin. However, is it possible to check files using Flycheck's temporary files (e.g. source
or source-inplace
)? I tried changing this package's :command
to (... source-inplace)
and it seemed to work on a single file.
Running the checker on test files fails with a message like:
== Compilation error on file bucket_test.exs ==
** (RuntimeError) cannot use ExUnit.Case without starting the ExUnit application, please call ExUnit.start() or explicitly start the :ex_unit app
expanding macro: ExUnit.Case.using/1
bucket_test.exs:2: KVBucketTest (module)
(elixir) expanding macro: Kernel.use/2
bucket_test.exs:2: KVBucketTest (module)
Umbrella applications by default store their built dependencies at the umbrella root rather than per-project, which is making Flycheck emit "module X is not loaded and could not be found" for any external dependencies.
I'm not sure if it's feasible to read mix.exs
inside elixirc-params
but there's a build_path
in there which would help.
Here's an umbrella app to illustrate:
.
├── apps
│ └── bar # There's no _build in here.
│ ├── config
│ │ └── config.exs
│ ├── lib
│ │ └── bar.ex
│ ├── mix.exs
│ ├── README.md
│ └── test
│ ├── bar_test.exs
│ └── test_helper.exs
├── _build # Here it is!
│ └── dev
│ ├── consolidated
│ │ ├── Elixir.Collectable.beam
│ │ ├── Elixir.Enumerable.beam
│ │ ├── Elixir.IEx.Info.beam
│ │ ├── Elixir.Inspect.beam
│ │ ├── Elixir.List.Chars.beam
│ │ └── Elixir.String.Chars.beam
│ └── lib
│ └── bar
│ └── ebin
│ ├── bar.app
│ └── Elixir.Bar.beam
├── config
│ └── config.exs
├── mix.exs
└── README.md
Running on mix.exs
fails with:
== Compilation error on file mix.exs ==
** (exit) exited in: GenServer.call(Mix.State, {:get, {Map, :get, [:env, :dev]}}, 5000)
** (EXIT) no process
(elixir) lib/gen_server.ex:564: GenServer.call/3
mix.exs:8: KV.Mixfile.project/0
Mix.Project.get_project_config/1
lib/mix/project.ex:60: Mix.Project.push/3
(stdlib) lists.erl:1262: :lists.foldl/3
Hi,
I noticed this checker doesn't work properly for umbrella apps, as the project-path
is set to the inner app and thus the deps are searched at a wrong place ($PROJECT_ROOT/apps/xxx/_deps
instead of $PROJECT_ROOT/_deps
).
I made my effort to fix this at https://github.com/Coffei/emacs-flycheck-elixir by checking if the mix found by locate-dominating-file
is not in fact inside an umbrella app. Works great for my project.
Would you be interested in a PR for this?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.