Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request: Erlang example #437

Open
pjk25 opened this issue Oct 3, 2023 · 5 comments
Open

Request: Erlang example #437

pjk25 opened this issue Oct 3, 2023 · 5 comments

Comments

@pjk25
Copy link

pjk25 commented Oct 3, 2023

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.

@TheGeorge
Copy link
Contributor

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.

@pjk25
Copy link
Author

pjk25 commented Oct 5, 2023

Thanks @TheGeorge , I will check those out

@pjk25
Copy link
Author

pjk25 commented Oct 5, 2023

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.

@pjk25
Copy link
Author

pjk25 commented Oct 5, 2023

Now that I have that working, it seems there is no rule for eunit tests, only common test? Or am I mistaken?

@TheGeorge
Copy link
Contributor

TheGeorge commented Oct 5, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants