Issue when elixir is installed with .asdf
- Dominant language
- Vim Script
- Stars
- 220
- Forks
- 12
- PR merge metrics
- No merged PRs in 30d
Description
When .asdf is used MixFormat gets a mostly useless error
1 /Users/kenhat/.asdf/shims/mix:3|20| syntax error before: '.'
2 || (elixir 1.12.3) lib/code.ex:1261: Code.require_file/2
Hope someone else might find this useful.
```vim
161 " updated by kenhat to allow use with .asdf
162 " .asdf uses shell shims to abstract language versions
163 " the shim doesn't like the command sequence here and throws
164 " an error when elixir calls mix
165 " fix is to have shell call mix instead of elixir
166 return printf('%s %s %s',
167 \ elixir_bin_path .'/mix format',
168 \ options,
169 \ filename)
170
171 " return printf('%s %s %s %s',
172 " \ elixir_bin_path .'/elixir',
173 " \ elixir_bin_path .'/mix format',
174 " \ options,
175 " \ filename)
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at the MixFormat command-construction entry point and inspect how it invokes the Elixir formatter. Reproduce the reported failure with an asdf-installed Elixir and compare it with the command sequence shown in the issue. Done means MixFormat formats a file successfully through the asdf shim without the syntax error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- elixir, vim
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100