-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Migrate CouchDB to rebar3 #4089
base: main
Are you sure you want to change the base?
Conversation
754abb6
to
181ab8a
Compare
3404c9b
to
8c3ee2f
Compare
-define(TEMPDIR, | ||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we still need this file. I thought we are switching to relx?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seem like an unrelated change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
71492c5
to
4ff7ed2
Compare
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
src
toapps
and 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_umbrella
settings erlang/rebar3#2729Use
configure
script instead ofrebar.config.script
to downloaddependencies:
make eunit
will get dependency cycle error if usingrebar.config.script
rebar3 has no options such as
skip_deps
or-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