Request: Erlang example
https://buck2.build/docs/api/rules/#erlang_app describes use of the erlang_application macro, however this seems to implicity rely on the existence of toolchains//:erlang-default. The @prelude//toolchains directory does not seem to contain any kind of erlang toolchain however. It would be nice to have a complete basic erlang application example for Buck2.
Hi, I'm looking into adding better Erlang support out-of-the box to buck2. In the meantime, you can look at https://github.com/TheGeorge/buck2_erlang_demo which is somewhat complete minimal example for Erlang.
Thanks @TheGeorge , I will check those out
I got it working with your example. Many thanks. Turns out I was close, but when I tried to use erlang_application to create the jsone target, default parameters seemed to cause a circular dependency.
Now that I have that working, it seems there is no rule for eunit tests, only common test? Or am I mistaken?
Yeah, we only added support for Common Test. Though it is possible to wrap eunit tests in CT suites as a workaround by just calling eunit:test(<module>).
Please check https://buck2.build/docs/rule_authors/test_execution/
In the open-source build buck2 ships with a relatively simple test runner.