-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Include compiler name in the generated warnings #17
Comments
Why is it relevant where the warning is coming from? Even if we add something like "boundary compiler" to the output, the developer doesn't necessarily know that it's a 3rd party library. |
I think it's important so that the user will know where to look in order to resolve the warning. For example if they start searching in https://hexdocs.pm/elixir/ they won't be able to find more information about the warning, and will potentially grow frustrated. Whereas if the compiler name is included in the warning it will be easier to find the boundary repository and documentation. |
I have some doubts about how much adding the compiler name will help, partly because boundary docs are large, and partly because the solution to the warning is not always obvious to a newcomer. For example, fixing a forbidden call from context to web will require moving some part of the code (not necessarily everything) to context. Ultimately I feel that this is something where a more experienced developer on the project will have to assist. That being said, I agree that displaying the compiler name might help. However, I wonder if this would be better done by the |
I agree that all warnings output from a custom compiler should include the compiler name (by being inserted by |
Hi both, as a newcomer to Elixir who discovered this library I just wanted to chime in and say that I agree that having some information that the particular error is related to this library in some way would be quite useful in helping identify that this is not something from elixir itself. I see that the discussion concluded that this should be handled by |
I doubt that this is on the priority list of the Elixir team. So as a relatively simple assistance hack, how about something like this:
The link points to the docs of the boundary compiler, because it provides the concise explanation:
And then in the next sentence the reader is pointed to the WDYT? |
@sasa1977 I think your suggestion is a good balance in terms of addressing the problem and ease of implementation. The only other thing that comes to mind with working with Elixir is that some error messages are often very complete and provide additional detail on how to resolve the problem right in the error. I don't think that is needed in this case though, just mentioning it as something that crossed my mind. |
I think it would be helpful to include the compiler name in the warnings shown by
mix compile
. Currently the compiler name is shown in the VSCode output, but not in the "plain" output. This will help someone understand that the warning isn't coming from Elixir itself, but instead from a library that is installed on the project.The text was updated successfully, but these errors were encountered: