You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2022/07/05 14:35:37 UTC

[GitHub] [couchdb] jiahuili430 opened a new pull request, #4089: Try using rebar3

jiahuili430 opened a new pull request, #4089:
URL: https://github.com/apache/couchdb/pull/4089

   <!-- Thank you for your contribution!
   
        Please file this form by replacing the Markdown comments
        with your text. If a section needs no action - remove it.
   
        Also remember, that CouchDB uses the Review-Then-Commit (RTC) model
        of code collaboration. Positive feedback is represented +1 from committers
        and negative is a -1. The -1 also means veto, and needs to be addressed
        to proceed. Once there are no objections, the PR can be merged by a
        CouchDB committer.
   
        See: http://couchdb.apache.org/bylaws.html#decisions for more info. -->
   
   ## Overview
   
   <!-- Please give a short brief for the pull request,
        what problem it solves or how it makes things better. -->
   
   ## Testing recommendations
   
   <!-- Describe how we can test your changes.
        Does it provides any behaviour that the end users
        could notice? -->
   
   ## Related Issues or Pull Requests
   
   <!-- If your changes affects multiple components in different
        repositories please put links to those issues or pull requests here.  -->
   
   ## Checklist
   
   - [ ] Code is written and works correctly
   - [ ] Changes are covered by tests
   - [ ] Any new configurable parameters are documented in `rel/overlay/etc/default.ini`
   - [ ] A PR for documentation changes has been made in https://github.com/apache/couchdb-documentation
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [couchdb] iilyak commented on a diff in pull request #4089: Try using rebar3

Posted by GitBox <gi...@apache.org>.
iilyak commented on code in PR #4089:
URL: https://github.com/apache/couchdb/pull/4089#discussion_r920210474


##########
build-aux/couchdb-build-release.sh:
##########
@@ -18,17 +18,17 @@ CURRENT_BRANCH=`git rev-parse --abbrev-ref HEAD`
 
 # copy sources over
 git archive ${CURRENT_BRANCH} | tar -xC ${REL_DIR}/ -f -
-cd src/
+cd _build/default/lib/
 for repo in *; do
   cd ${repo}
   if [ -d ".git" ]; then
-    mkdir -p ../../${REL_DIR}/src/${repo}
+    mkdir -p ../../../../${REL_DIR}/apps/${repo}

Review 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. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [couchdb] nickva commented on a diff in pull request #4089: Migrate CouchDB to rebar3

Posted by GitBox <gi...@apache.org>.
nickva commented on code in PR #4089:
URL: https://github.com/apache/couchdb/pull/4089#discussion_r922283899


##########
rel/overlay/etc/default.ini:
##########
@@ -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

Review Comment:
   Wonder why we had to uncomment it?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [couchdb] iilyak commented on a diff in pull request #4089: Migrate CouchDB to rebar3

Posted by GitBox <gi...@apache.org>.
iilyak commented on code in PR #4089:
URL: https://github.com/apache/couchdb/pull/4089#discussion_r922276672


##########
rel/reltool.config:
##########
@@ -11,7 +11,7 @@
 % the License.
 
 {sys, [
-    {lib_dirs, ["../src"]},

Review Comment:
   Why do we still need this file. I thought we are switching to relx?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [couchdb] jiahuili430 commented on a diff in pull request #4089: Migrate CouchDB to rebar3

Posted by GitBox <gi...@apache.org>.
jiahuili430 commented on code in PR #4089:
URL: https://github.com/apache/couchdb/pull/4089#discussion_r922300790


##########
rel/reltool.config:
##########
@@ -11,7 +11,7 @@
 % the License.
 
 {sys, [
-    {lib_dirs, ["../src"]},

Review Comment:
   Because `./dev/run` is using `reltool`. I'll look for a solution later, thanks for the review.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [couchdb] jiahuili430 commented on pull request #4089: Try using rebar3

Posted by GitBox <gi...@apache.org>.
jiahuili430 commented on PR #4089:
URL: https://github.com/apache/couchdb/pull/4089#issuecomment-1182197299

   In order to use the rebar3 local plugins, we need to use `apps` instead of `src`.
   Related Issue: https://github.com/erlang/rebar3/issues/2712
   Demo: https://github.com/jiahuili430/local-plugins


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [couchdb] jiahuili430 commented on a diff in pull request #4089: Migrate CouchDB to rebar3

Posted by GitBox <gi...@apache.org>.
jiahuili430 commented on code in PR #4089:
URL: https://github.com/apache/couchdb/pull/4089#discussion_r922315735


##########
rel/overlay/etc/default.ini:
##########
@@ -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

Review Comment:
   `APPDIR` and this one are used to pass `make eunit`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [couchdb] iilyak commented on a diff in pull request #4089: Migrate CouchDB to rebar3

Posted by GitBox <gi...@apache.org>.
iilyak commented on code in PR #4089:
URL: https://github.com/apache/couchdb/pull/4089#discussion_r922266904


##########
apps/couch/include/couch_eunit.hrl:
##########
@@ -28,11 +28,11 @@
     filename:join([?BUILDDIR(), "tmp", "etc", "local_eunit.ini"]),
     filename:join([?BUILDDIR(), "tmp", "etc", "eunit.ini"])]).
 -define(FIXTURESDIR,
-    filename:join([?BUILDDIR(), "src", "couch", "test", "eunit", "fixtures"])).
+    filename:join([?BUILDDIR(), "apps", "couch", "test", "eunit", "fixtures"])).
 -define(TEMPDIR,
     filename:join([?BUILDDIR(), "tmp", "tmp_data"])).
 
--define(APPDIR, filename:dirname(element(2, file:get_cwd()))).
+-define(APPDIR, element(2, file:get_cwd())).

Review Comment:
   Why this change? I think it forces you to update all places where `?ABS_PATH` macro is used.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [couchdb] iilyak commented on a diff in pull request #4089: Migrate CouchDB to rebar3

Posted by GitBox <gi...@apache.org>.
iilyak commented on code in PR #4089:
URL: https://github.com/apache/couchdb/pull/4089#discussion_r922277548


##########
rel/overlay/etc/default.ini:
##########
@@ -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

Review Comment:
   This seem like an unrelated change



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [couchdb] nickva commented on pull request #4089: Migrate CouchDB to rebar3

Posted by GitBox <gi...@apache.org>.
nickva commented on PR #4089:
URL: https://github.com/apache/couchdb/pull/4089#issuecomment-1185663418

   @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 fixes up or whitespace changes or eunit fixups that would make sense even without switching to rebar3.
   
   Some examples could be:
      * app dependency updates like adding the `couch_tests`, 'config' dependencies to `*.app.src` files
      * Updating descriptions in app.src files
      * removing `crypto` from `couch_epi` app.src.script
      * some whitespace changes to `httpd_global_handlers`
      * `test_util:stop_applications([config, couch_log]).`
      * `application:ensure_started(couch_epi).`
   
   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?
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org