couchdb icon indicating copy to clipboard operation
couchdb copied to clipboard

Migrate CouchDB to rebar3

Open jiahuili430 opened this issue 2 years ago • 1 comments

Overview

  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 https://github.com/erlang/rebar3/pull/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.

Testing recommendations

./configure --spidermonkey-version 60
make
./dev/run --admin=adm:pass -n 1

make dist
make check
make release

Related Issues or Pull Requests

  • kahsh: https://github.com/apache/couchdb-khash/pull/12

  • hyper: https://github.com/apache/couchdb-hyper/pull/8

  • snappy: https://github.com/apache/couchdb-snappy/pull/19

  • couchdb-config: https://github.com/apache/couchdb-config/pull/38

  • couchdb-documentation: https://github.com/apache/couchdb-documentation/pull/748

  • folsom: https://github.com/apache/couchdb-folsom/pull/3

  • bear: https://github.com/apache/couchdb-bear/pull/2

  • rebar3 fork: https://github.com/erlang/rebar3/compare/main...jiahuili430:82-rebar3

Checklist

  • [x] Code is written and works correctly
  • [x] 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

jiahuili430 avatar Jul 05 '22 14:07 jiahuili430

@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:

  • 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?

Also, it might help to have a description of what the ic plugin does and why we need it.

nickva avatar Jul 15 '22 15:07 nickva