You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please feel free to steal from our Puppet Mode. It also has some other nice utilities for strings added by @bbatsov. Also, don't hesitate to ask me, via mail, Github, or Twitter.
* remove elixir 1.6 code as 1.7 is required
replace deprecated Code.load_file/1 with Code.require_file/1
* remove not used param
* fix dialyzer error: The test binary() == nil can never evaluate to 'true'
J3RN
pushed a commit
to J3RN/emacs-elixir
that referenced
this issue
Apr 24, 2021
* Fix the debugger
The debugger was inadvertantly broken in elixir-editors#93 which the change from the
deprecated ([2]) `Code.load_file/1` to `Code.require_file/1`. The compatability
docs for 1.10 [1] list both `Code.require_file/1` and `Code.compile_file/1` as
possible replacements for `Code.load_file/1`. In our case we need
`Code.compile_file/1` instead of `Code.require_file/1` since
`Code.require_file/1` tracks which files have been required and compiled and
does not compile them more than once. Specifically the docs state:
> If require_file/2 is called more than once with a given file, that file will
> be compiled only once
So since `Code.load_file/1` would always compile the file we need to use
`Code.compile_file/1` rather than `Code.require_file/1`. When
`Code.require_file/1` was used, the call in
`ElixirLS.Debugger.Server.change_env/1` would have no effect because the file
was previously required. By changing to `Code.compile_file/1` the project will
always be reloaded by compiling it's `mix.exs` file.
[1] https://hexdocs.pm/elixir/1.10.2/compatibility-and-deprecations.html#table-of-deprecations
[2] elixir-lang/elixir#7201
* Add comments about usage of compile_file vs require_file
Currently, interpolated variables do not have any special syntax highlighting. This is bad.
@lunaryorn has an excellent guide here that could help immensely in getting this done.
The text was updated successfully, but these errors were encountered: