halostatue

halostatue

I’m using some asynchronous linting plug-ins for Vim8 and I’m finding myself annoyed by the fact that they compile to _build/ which breaks Phoenix reload, etc. I found this comment by José:

It is best if editors run their commands on a separate _build directory. It that is not easily doable today, let’s find a way to make it so.

The only way that I can see that this might work right now is if I modify my mix.exs so that the project build_path is something like System.get_env("EDITOR_MIX_BUILD_PATH", "build_path") and remembering to set (either directly or through something like direnv) the EDITOR_MIX_BUILD_PATH variable to something like .vim_build instead of _build.

Is there any other way to do this (e.g., mix compile --build-path .vim_build), because the Vim plug-ins I’m using aren’t really using the mix configuration except the build tools.

I’m currently using Neomake for those interested. It’s similar to Ale, but Ale’s linter policy—run everything by default—combined with a stated non-desire to make it easy to find out what linters are available and active, means that if you have dialixir installed, your computer will be brought to its knees with twenty instances of mix dialyzer. Neomake doesn’t currently have a dialixir plug-in, but it offers a relatively simple way to discover what’s available (neomake#ft#makers#elixir#EnabledMakers()) and then remove the ones you don’t want. (If a dialyzer plug-in does show up, I’m going to argue very heavily that it should not be enabled by default—and that it should explicitly be opt-in.)

Marked As Solved

halostatue

halostatue OP

For anyone who is looking for this later: this has been fixed in Elixir 1.9 or later with the introduction of MIX_BUILD_PATH. There is a pending fix in Elixir 1.10 that ensures that the MIX_BUILD_PATH still has the environment appended. See PR#9189.

NOTE: I found my post here while looking for something else, because I want to be able to add the Elixir and/or Erlang version to the build path, and the apparent recommendation is to set the env_path, not the build_path. This will make it possible for me to build the same application under multiple versions of Elixir so that I can test newer versions before I want to upgrade or during development. I have to test this, but I think that I will be setting env_path to be something like Pathname.join(["_build", System.version()]).

Where Next? Top

Trending in Questions Top

stjefim
Hello! Suppose you are building workflow (order / task / payment) processing system with the following requirements: Each workflow con...
New
jonnycharles
I’m in search of an Elixir library that offers PDF generation capabilities similar to Ruby’s Prawn. While there have been discussions abo...
New
spammy
I’m looking to build a personal workflow to quickly deploy web applications written in elixir/phoenix, for local consumption (ie not on t...
New
dli
Before I dive in myself, did anyone successfully sprinkle Hologram into their existing LiveView app? Looking for hints regarding: Addi...
New
roeland
Kia ora, We have been using elixir-google-api to connect to Google Drive. However, with the updates to Tesla due to CVEs this is now bro...
New
bottlenecked
Hi all, I wanted to ask how the community is dealing with post-release steps. Today we have Ecto migrations, which make sure that the db...
New
rahultumpala
Hello, I have an Elixir backend that implements a custom protocol over TCP. I want to load test the backend and assess the performance o...
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
ausimian
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews