GithubHelp home page GithubHelp logo

emacs-flycheck-elixir's People

Contributors

dparnell avatar lbolla avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

emacs-flycheck-elixir's Issues

Issue - Flycheck checker elixir returned non-zero exit code 1, but its output contained no errors

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.

Check unsaved files

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.

Checker fails on test files

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)

Dependencies are not found for umbrella applications

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

Checker fails on mix.exs file

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

Umbrella app support

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.