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
Therefore, disabling :debug_info is not recommended as it removes the ability of the Elixir compiler and other tools to provide feedback. If you want to remove the :debug_info while deploying, tools like mix release already do such by default. Additionally, mix test disables it via the :test_elixirc_options project configuration option. This option can also be overridden per module using the @compile directive.
it breaks Dialyzer when used in a project that is subsequently used as a Hex dependency. Examples:
I don't know what the root cause of the "Invalid beam file or no abstract code" error that motivated #188 was, but the only result of the change it suggests is setting debug_info to false when compiling in Mix.env == :prod since the default was already true...
The text was updated successfully, but these errors were encountered:
Probably that README section is not relevant anymore. Since v0.15 which added official support for elixir 1.15 (elixir-lsp/elixir-ls#898), ElixirLS overwrites project settings anyway and sets debug_info, both global and test_elixirc_options, to true. IIRC it was necessary to make debugger work and tests pass.
Would you create a PR removing or updating that section?
The
elixirc_options
setting suggested in #188 has several issues:it's unnecessary, as
debug_info
defaults totrue
. This was incorrectly documented as defaulting tofalse
until the documentation was updated for 1.15 as part of Always adding :debug_info on erlc_options elixir-lang/elixir#9348it's not recommended, per the documentation for
Code.put_compiler_option
it breaks Dialyzer when used in a project that is subsequently used as a Hex dependency. Examples:
I don't know what the root cause of the "Invalid beam file or no abstract code" error that motivated #188 was, but the only result of the change it suggests is setting
debug_info
to false when compiling inMix.env == :prod
since the default was already true...The text was updated successfully, but these errors were encountered: