xpg
Experiences parsing compiler and dialyzer errors and warnings in build system
What are people’s experiences in parsing compiler and dialyzer errors and warnings within their build systems?
I’m using Jenkins myself, and used to use the (now deprecated) Warnings Plugin. I had a small Groovy script setup to collect errors and warnings, but I never got it working perfectly.
Now I’m replacing the deprecated Jenkins plugin with a new one. So now I’m trying to figure out what the best way is to get both errors and warnings from both the Elixir compiler and Dialyzer into Jenkins.
There are many ways to attack this problem, and I guess it’s not unique to Jenkins either. Unfortunately, my Google Search skills have failed me, so I haven’t been able to find anything usable.
What do you guys do?
Trending in Questions
Hello!
Suppose you are building workflow (order / task / payment) processing system with the following requirements:
Each workflow con...
New
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
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
Using Phoenix.LiveView.TagEngine as an EEx.Engine is deprecated!
To compile HEEx, use Phoenix.LiveView.TagEngine.compile/2 instead.
Sta...
New
Before I dive in myself, did anyone successfully sprinkle Hologram into their existing LiveView app?
Looking for hints regarding:
Addi...
New
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
I am using Oban and occasionally, shortly after a deployment, a handful of jobs can fail because of dependency on other parts of the syst...
New
Other Trending Topics
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
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
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
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
I just stumbled on a newly redesigned elixir-lang.org. :tada: It looks like @Software_Mansion did the work, and I think it is generally a...
New
@hugobarauna and I (Alex Koutmos) have been hard at work on writing a book on Nerves that takes you from simply blinking LEDs to building...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #elixirconf-us
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #hex
- #performance










First 8 of 8 Posts
hauleth
You can always call Dialyzer directly and then format it to whatever format you like instead of parsing text output.
xpg
That’s an interesting idea. Seems like a much more stable approach, than parsing the text output.
I wonder if something similar could be done for the Elixir compiler.
hauleth
In theory - yes. In practice it would be much harder, especially as it will not be able to catch all messages anyway due to fact that Elixir compile time is in fact runtime, so you can always use
IO.puts/1to output additional messages.xpg
Yeah, that makes sense. I probably won’t get around parsing the output from the compiler.
It seems that the Jenkins warning plugin has “native” JSON and XML formats. I wonder if there is a more universal format. If that was the case, I could write a script that parses Elixir Compiler output and generates a file that is usable by more systems than just Jenkins.
hauleth
Microsoft and GitHub are pushing for SARIF, GitLab uses CodeClimate format. I am in the process of publishing my GitLab CI pipeline that does all the magic needed with all different reporting components, so far I have:
Parsing compiler output which is produced only in “human friendly” way is PITA even for stuff like Vim quick fix and I was trying to suggest flag for machine readable output for some time now, but never succeeded in any meaningful way.
xpg
I kinda of expected to run into multiple standards for this (but hoped that it would not be the case). Thank you for pointing me in some directions.
I’ll have to look into the details and figure out what makes most sense. We also use TypeScript, so I will see which reporting formats works well with that.
I have previously written parser for “human friendly” compiler outputs. Yeah, it’s a pain
, but it looks like there is no easy way around it.
hauleth
There is to get some messages out of the compiler. This is how ElixirLS is providing diagnostics. Obviously it will not work 100% of the cases (especially with dependencies), but it will provide something. With Dialyzer it will be a little bit harder, but still should be possible to do by “manually” calling Dialyzer instead of relying on the Dialyxir/Dialyzex tasks.
xpg
Thank you for all your comments.
.
You’ve given me quite a bit to think about