{"action":"created","issue":{"url":"https://api.github.com/repos/esl/MongooseIM/issues/1033","repository_url":"https://api.github.com/repos/esl/MongooseIM","labels_url":"https://api.github.com/repos/esl/MongooseIM/issues/1033/labels{/name}","comments_url":"https://api.github.com/repos/esl/MongooseIM/issues/1033/comments","events_url":"https://api.github.com/repos/esl/MongooseIM/issues/1033/events","html_url":"https://github.com/esl/MongooseIM/pull/1033","id":183051753,"number":1033,"title":"Use Rebar3","user":{"login":"erszcz","id":112145,"avatar_url":"https://avatars.githubusercontent.com/u/112145?v=3","gravatar_id":"","url":"https://api.github.com/users/erszcz","html_url":"https://github.com/erszcz","followers_url":"https://api.github.com/users/erszcz/followers","following_url":"https://api.github.com/users/erszcz/following{/other_user}","gists_url":"https://api.github.com/users/erszcz/gists{/gist_id}","starred_url":"https://api.github.com/users/erszcz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erszcz/subscriptions","organizations_url":"https://api.github.com/users/erszcz/orgs","repos_url":"https://api.github.com/users/erszcz/repos","events_url":"https://api.github.com/users/erszcz/events{/privacy}","received_events_url":"https://api.github.com/users/erszcz/received_events","type":"User","site_admin":false},"labels":[{"id":12261236,"url":"https://api.github.com/repos/esl/MongooseIM/labels/build%20process","name":"build process","color":"5319e7","default":false},{"id":166895362,"url":"https://api.github.com/repos/esl/MongooseIM/labels/WIP","name":"WIP","color":"bfe5bf","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2016-10-14T13:36:29Z","updated_at":"2017-01-11T14:14:19Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/esl/MongooseIM/pulls/1033","html_url":"https://github.com/esl/MongooseIM/pull/1033","diff_url":"https://github.com/esl/MongooseIM/pull/1033.diff","patch_url":"https://github.com/esl/MongooseIM/pull/1033.patch"},"body":"This PR changes the build system in use to Rebar3. **It's a work in progress!**\r\n\r\n`rebar` is stubbed with a script that will shout that's it's not really Rebar and exit with an error, for fast failure in case of tools calling it directly. Travis integration is not touched at all - it won't work. Docker image build scripts might be broken, too.\r\n\r\n`mongooseim` Erlang application and the corresponding `src/mongooseim.app.src` files do not exist at the moment - the `.app.src` file confused Rebar3 and made it behave as though it was operating in a single application project, not in a release-like project. Maybe it can be sidestepped, maybe it can't. Due to the lack of this app:\r\n- it's not possible to include MongooseIM itself as a dependency in other projects\r\n- `mongooseimctl status` code which displays the version had to be modified (version of the `ejabberd` app is taken if `mongooseim` app is not found)\r\n\r\nTop-level `Makefile` was considerably slimmed down - only the basic rules were rewritten to use Rebar3. Honestly, I'd opt for minimizing the number of rules we have in this file and rely on directly calling `rebar3` in the development workflow - all in all, it's ought to be _the standard_ build tool.\r\n\r\nBig tests are moved from `test/` to `test.disabled/`. `disabled` here means that they're disabled from Rebar3's point of view, i.e. `rebar3 ct` won't try to run them (while it would if they were in the `test/` subdirectory). The test runner we have there is custom-wired for our use case and the suites, unfortunately, can't just be picked up and run by Rebar3.\r\n\r\nWhat works?\r\n- `cd $REPO; make; cd _build/prod/rel/mongooseim; ./bin/mongooseimctl ( live | start | stop | status )`\r\n- running small tests with `make ct`; some tests fail though and some are disabled\r\n- running big tests with: `cd test.disabled/ejabberd_tests` and the same procedure as before\r\n  (i.e. there are no Makefile rules to run big tests from the main repo directory), e.g. `make quicktest`; before running the tests, though, `rebar3 compile` has to be run at least once in the top-level of the repository - some deps are reused between small and big tests and have to be fetched and compiled properly\r\n\r\nToDo:\r\n- [x] fix jiffy\r\n- [x] reenable Riak: fix Protocol Buffers support (find the right Rebar3 plugin)\r\n- [ ] check if `alarms` app works: does it start up properly with the correct config?\r\n- [x] check zlib driver load path in `apps/ejabberd/test/zlib_driver_SUITE.erl` - this changed\r\n    in master to something apparently more sensible, but does it really work with rebar3?\r\n- [ ] readd `pubsub_load_SUITE` since it was removed due to amoc using rebar3?\r\n- [x] switch to stringprep with merged rebar3/relx fixes: https://github.com/processone/stringprep/pull/4\r\n- [x] readd Makefile targets which seem convenient?\r\n- [ ] can we include the stub mongooseim app into the release again?\r\n    having the `src/mongooseim.app.src` file in place triggers rebar3 \"app layout\",\r\n    instead of the project release layout that we actually use\r\n- [x] in Makefile reenable 3rd node needed for big tests\r\n- [x] reenable small test suites (suffixed with `apps/ejabberd/test/*_SUITE.erl.disabled`)\r\n- [ ] run big tests with rebar3 too?\r\n- [x] we might need to change the dependency on mustache to bbmustache (the same as used by Rebar3) - it depends on where we actually use mustache\r\n- [x] update relevant pages in doc\r\n- [ ] `grep -i todo` ;)\r\n"},"comment":{"url":"https://api.github.com/repos/esl/MongooseIM/issues/comments/271878552","html_url":"https://github.com/esl/MongooseIM/pull/1033#issuecomment-271878552","issue_url":"https://api.github.com/repos/esl/MongooseIM/issues/1033","id":271878552,"user":{"login":"michalwski","id":705828,"avatar_url":"https://avatars.githubusercontent.com/u/705828?v=3","gravatar_id":"","url":"https://api.github.com/users/michalwski","html_url":"https://github.com/michalwski","followers_url":"https://api.github.com/users/michalwski/followers","following_url":"https://api.github.com/users/michalwski/following{/other_user}","gists_url":"https://api.github.com/users/michalwski/gists{/gist_id}","starred_url":"https://api.github.com/users/michalwski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michalwski/subscriptions","organizations_url":"https://api.github.com/users/michalwski/orgs","repos_url":"https://api.github.com/users/michalwski/repos","events_url":"https://api.github.com/users/michalwski/events{/privacy}","received_events_url":"https://api.github.com/users/michalwski/received_events","type":"User","site_admin":false},"created_at":"2017-01-11T14:14:18Z","updated_at":"2017-01-11T14:14:18Z","body":"> https://github.com/esl/MongooseIM/blob/rebar3/doc/user-guide/Getting-started.md still has outdated release paths.\r\n\r\n@fenek what would you see changed in this file? Both `make` and `make rel` still works."}}
{"actor":{"display_login":"michalwski"}}