Migrate CouchDB to rebar3#4089
Conversation
754abb6 to
181ab8a
Compare
fa438c6 to
dc73196
Compare
| for repo in *; do | ||
| cd ${repo} | ||
| if [ -d ".git" ]; then | ||
| mkdir -p ../../${REL_DIR}/src/${repo} | ||
| mkdir -p ../../../../${REL_DIR}/apps/${repo} |
There was a problem hiding this comment.
To improve readability let's set a variable and use that instead.
SELF_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
COUCHDB_ROOT="${SELF_DIR}/.."
You would need to update #!/bin/sh -e in the begining of the script to use bash in order to make it work.
b5e2e5a to
21828be
Compare
| filename:join([?BUILDDIR(), "tmp", "tmp_data"])). | ||
|
|
||
| -define(APPDIR, filename:dirname(element(2, file:get_cwd()))). | ||
| -define(APPDIR, element(2, file:get_cwd())). |
There was a problem hiding this comment.
Why this change? I think it forces you to update all places where ?ABS_PATH macro is used.
| @@ -11,7 +11,7 @@ | |||
| % the License. | |||
|
|
|||
| {sys, [ | |||
| {lib_dirs, ["../src"]}, | |||
There was a problem hiding this comment.
Why do we still need this file. I thought we are switching to relx?
There was a problem hiding this comment.
Because ./dev/run is using reltool. I'll look for a solution later, thanks for the review.
| @@ -14,7 +14,7 @@ view_index_dir = {{view_index_dir}} | |||
| ; The actual limit may be slightly lower depending on how | |||
| ; many schedulers you have as the allowance is divided evenly | |||
| ; among them. | |||
| ;max_dbs_open = 500 | |||
| max_dbs_open = 500 | |||
There was a problem hiding this comment.
This seem like an unrelated change
There was a problem hiding this comment.
APPDIR and this one are used to pass make eunit.
| @@ -14,7 +14,7 @@ view_index_dir = {{view_index_dir}} | |||
| ; The actual limit may be slightly lower depending on how | |||
| ; many schedulers you have as the allowance is divided evenly | |||
| ; among them. | |||
| ;max_dbs_open = 500 | |||
| max_dbs_open = 500 | |||
There was a problem hiding this comment.
Wonder why we had to uncomment it?
|
@jiahuili430 quite impressive, well done! I wonder if it would make it easier to review if we could extract some the changes into a preliminary PR so to speak. Basically any fixups like whitespace changes, app dependencies, etc which could make sense even without switching to rebar3. Some examples could be:
So then with those changes out of the way, and everything working as is, we'd have a second PR more focused on just switching from src to apps. What do you think? Also, it might help to have a description of what the ic plugin does and why we need it. |
1. Change `src` to `apps` and all symlinks: In order to use the local plugins `rebar3 ic setup_eunit [-f]`, we need to use correct umbrella project structure. See erlang/rebar3#2729 2. Use `configure` script instead of `rebar.config.script` to download dependencies: `make eunit` will get dependency cycle error if using `rebar.config.script` 3. rebar3 has no options such as `skip_deps` or `-r`, so they were removed.
Overview
Change
srctoappsand all symlinks: In order to use thelocal plugins
rebar3 ic setup_eunit [-f], we need to use correctumbrella project structure.
See Support local plugins with
is_umbrellasettings erlang/rebar3#2729Use
configurescript instead ofrebar.config.scriptto downloaddependencies:
make eunitwill get dependency cycle error if usingrebar.config.scriptrebar3 has no options such as
skip_depsor-r, so they were removed.Testing recommendations
Related Issues or Pull Requests
kahsh: Migrate to rebar3 couchdb-khash#12
hyper: Migrate to rebar3 couchdb-hyper#8
snappy: Migrate to rebar3 couchdb-snappy#19
couchdb-config: Migrate to rebar3 couchdb-config#38
couchdb-documentation: Migrate to rebar3 couchdb-documentation#748
folsom: Migrate to rebar3 couchdb-folsom#3
bear: Migrate to rebar3 couchdb-bear#2
rebar3 fork: erlang/rebar3@main...jiahuili430:82-rebar3
Checklist
rel/overlay/etc/default.ini