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/02/22 16:33:32 UTC

[GitHub] [couchdb] nickva opened a new pull request #3938: Try using rebar3

nickva opened a new pull request #3938:
URL: https://github.com/apache/couchdb/pull/3938


    * Use 3.15.2 version which is compatible with Erlang 20
    * Use Basho's rebar_raw_resource for raw deps
   
   Currently fails with:
   ```
   DIAGNOSTIC=1 ./configure --dev
   ==> configuring couchdb in rel/couchdb.config
   ==> updating dependencies
   ===> Evaluating config script "rebar.config.script"
   ===> Setting paths to [deps]
   ===> Compile (apps)
   ===> Setting paths to [plugins]
   ===> Setting paths to [deps]
   ===> Setting paths to [plugins]
   ===> Setting paths to [plugins]
   ===> Conflicting 'resource' resource definitions
   ===> error: {rebar_raw_resource,{duplicate_res_type,resource}} [{rebar_raw_resource,
                                                                           map_res,
                                                                           2,
                                                                           [{file,
                                                                             "/Users/nvatama/asf-3/_build/default/plugins/rebar_raw_resource/src/rebar_raw_resource.erl"},
                                                                            {line,
                                                                             586}]},
                                                                          {rebar_raw_resource,
                                                                           absorb_resources,
                                                                           2,
                                                                           [{file,
                                                                             "/Users/nvatama/asf-3/_build/default/plugins/rebar_raw_resource/src/rebar_raw_resource.erl"},
                                                                            {line,
                                                                             395}]},
                                                                          {rebar_raw_resource,
                                                                           absorb_state,
                                                                           1,
                                                                           [{file,
                                                                             "/Users/nvatama/asf-3/_build/default/plugins/rebar_raw_resource/src/rebar_raw_resource.erl"},
                                                                            {line,
                                                                             350}]},
                                                                          {rebar_raw_resource,
                                                                           init,
                                                                           1,
                                                                           [{file,
                                                                             "/Users/nvatama/asf-3/_build/default/plugins/rebar_raw_resource/src/rebar_raw_resource.erl"},
                                                                            {line,
                                                                             198}]},
                                                                          {rebar_state,
                                                                           '-create_logic_providers/2-fun-0-',
                                                                           2,
                                                                           [{file,
                                                                             "/Users/nvatama/asf-3/src/rebar3/src/rebar_state.erl"},
                                                                            {line,
                                                                             506}]},
                                                                          {lists,
                                                                           foldl,
                                                                           3,
                                                                           [{file,
                                                                             "lists.erl"},
                                                                            {line,
                                                                             1263}]},
                                                                          {rebar_state,
                                                                           create_logic_providers,
                                                                           2,
                                                                           [{file,
                                                                             "/Users/nvatama/asf-3/src/rebar3/src/rebar_state.erl"},
                                                                            {line,
                                                                             505}]},
                                                                          {rebar_plugins,
                                                                           '-handle_plugins/4-fun-0-',
                                                                           4,
                                                                           [{file,
                                                                             "/Users/nvatama/asf-3/src/rebar3/src/rebar_plugins.erl"},
                                                                            {line,
                                                                             101}]}]
   ===> Failed creating providers. Run with DIAGNOSTIC=1 for stacktrace or consult rebar3.crashdump.
   ```
   


-- 
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 #3938: Try using rebar3

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


   Some progress
    * Basic Erlang app structure in raw dependencies seems to have worked
    * Created initially broken symlink from `src/{docs|fauxton} -> _build/_build/default/lib/{docs|fauxton}`
    * `configure` i.e. download rebar3, get-deps seems to work
    * `make` works as well, but not sure if it all the artifacts end up in the right place
    * eunit starts and runs for a few basic erlang app but chokes on a NIF
   
   ```
      module 'couch_debug'
         link_tree tests
           couch_debug:753: should_have_same_shape...[0.001 s] ok
           couch_debug:761: should_include_extra_info...[0.001 s] ok
           [done in 0.020 s]
         [done in 0.020 s]
       module 'couch_doc'
   undefined
   *** test module not found ***
   **couch_ejson_compare
   ```


-- 
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 edited a comment on pull request #3938: Try using rebar3

Posted by GitBox <gi...@apache.org>.
nickva edited a comment on pull request #3938:
URL: https://github.com/apache/couchdb/pull/3938#issuecomment-1067590688


   Some progress
    * Basic Erlang app structure in raw dependencies seems to have worked (thanks, Tristan!)
    * Created an initially broken symlink from `src/{docs|fauxton} -> _build/_build/default/lib/{docs|fauxton}` which later gets filled in by the `get-deps`. This mainly to avoid altering docs and Fauxton tooling which expects those in deps in those directories.
    * `configure` i.e. download rebar3, get-deps seems to work
    * `make` works as well, but not sure if it all the artifacts end up in the right place
    * eunit starts and runs for a few basic erlang app but chokes on a NIF
   
   ```
      module 'couch_debug'
         link_tree tests
           couch_debug:753: should_have_same_shape...[0.001 s] ok
           couch_debug:761: should_include_extra_info...[0.001 s] ok
           [done in 0.020 s]
         [done in 0.020 s]
       module 'couch_doc'
   undefined
   *** test module not found ***
   **couch_ejson_compare
   ```


-- 
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 edited a comment on pull request #3938: Try using rebar3

Posted by GitBox <gi...@apache.org>.
nickva edited a comment on pull request #3938:
URL: https://github.com/apache/couchdb/pull/3938#issuecomment-1067590688


   Some progress
    * Basic Erlang app structure in raw dependencies seems to have worked (thanks, Tristan!)
    * Created an initially broken symlink from `src/{docs|fauxton} -> _build/_build/default/lib/{docs|fauxton}` which later gets filled in by the `get-deps`. This mainly to avoid altering docs and Fauxton tooling which expects those in deps in those directories.
    * `configure` i.e. download rebar3, get-deps seems to work
    * `make` works as well, but not sure if it all the artifacts end up in the right place
    * eunit starts and runs for a few basic erlang app but chokes on a NIF
   
   ```
      module 'couch_debug'
         link_tree tests
           couch_debug:753: should_have_same_shape...[0.001 s] ok
           couch_debug:761: should_include_extra_info...[0.001 s] ok
           [done in 0.020 s]
         [done in 0.020 s]
       module 'couch_doc'
   undefined
   *** test module not found ***
   **couch_ejson_compare
   ```


-- 
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 #3938: Try using rebar3

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


   Thanks for taking a look, @tsloughter. It's much appreciated.
   
   For raw dependencies, would it be feasible to turn those into empty/no-op erlang apps so they can compile and build like regular dependencies?


-- 
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] tsloughter commented on pull request #3938: Try using rebar3

Posted by GitBox <gi...@apache.org>.
tsloughter commented on pull request #3938:
URL: https://github.com/apache/couchdb/pull/3938#issuecomment-1065921555


   I just looked at `rebar_raw_resource` hasn't been updated in over 6 years, I doubt it works. There may be another raw resource plugin.


-- 
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] tsloughter commented on pull request #3938: Try using rebar3

Posted by GitBox <gi...@apache.org>.
tsloughter commented on pull request #3938:
URL: https://github.com/apache/couchdb/pull/3938#issuecomment-1065984623


   If you are able to control the dependencies then yes, turning them into empty erlang apps should work. They wouldn't be included in the release, so would just be "apps" fetched and kept in `_build`.


-- 
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] jaydoane commented on pull request #3938: Try using rebar3

Posted by GitBox <gi...@apache.org>.
jaydoane commented on pull request #3938:
URL: https://github.com/apache/couchdb/pull/3938#issuecomment-1081991080


   Given that we may be dropping OTP 20 support "soon", what happens when you try a more modern version like [3.18.0](https://github.com/erlang/rebar3/releases/tag/3.18.0) or main? Guessing that won't help with the NIF choke?


-- 
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 #3938: Try using rebar3

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


   > If you are able to control the dependencies then yes, turning them into empty erlang apps should work. They wouldn't be included in the release, so would just be "apps" fetched and kept in `_build`.
   
   Thanks! We do control them and that may be the easiest way to go, then


-- 
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] tsloughter commented on a change in pull request #3938: Try using rebar3

Posted by GitBox <gi...@apache.org>.
tsloughter commented on a change in pull request #3938:
URL: https://github.com/apache/couchdb/pull/3938#discussion_r825325873



##########
File path: configure
##########
@@ -345,7 +345,7 @@ fi
 # only update dependencies, when we are not in a release tarball
 if [ -d .git  -a $SKIP_DEPS -ne 1 ]; then
     echo "==> updating dependencies"
-    ${REBAR} get-deps update-deps
+    ${REBAR3} get-deps update-deps

Review comment:
       There is no `update-deps` command. Also, you can't run multiple commands this way but have to use `do`:
   
   ```
   rebar3 do compile, ct
   ```
   
   You also shouldn't need to run `get-deps` ever. It is a backwards compat command we added after the fact even though it isn't really needed -- though can be useful like when building a docker image to first fetch the deps into a layer. So you may just be wanting `rebar3 upgrade` here.




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