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 2023/01/03 16:10:08 UTC

[GitHub] [couchdb-rebar] big-r81 opened a new pull request, #4: Move rebar.app out of ebin

big-r81 opened a new pull request, #4:
URL: https://github.com/apache/couchdb-rebar/pull/4

   Calling 'make clean' from CouchDB wipes all ebin-directories in the source tree. 
   Afterwards it is not possible to build rebar again. 
   
   Modifying the bootstrap script and moving 'rebar.app' one directory-level up.


-- 
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-rebar] jaydoane commented on pull request #4: Copy rebar.app before bootstrapping

Posted by GitBox <gi...@apache.org>.
jaydoane commented on PR #4:
URL: https://github.com/apache/couchdb-rebar/pull/4#issuecomment-1374570472

   It appears that you've added a new copy of ebin/rebar.app in the top level while leaving the original in place.
   
   Did you mean to do e.g. `git mv ebin/rebar.app .` instead?


-- 
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-rebar] big-r81 commented on pull request #4: Copy rebar.app before bootstrapping

Posted by GitBox <gi...@apache.org>.
big-r81 commented on PR #4:
URL: https://github.com/apache/couchdb-rebar/pull/4#issuecomment-1377652218

   Maybe a final tribute before moving to rebar3... ๐Ÿ˜‰


-- 
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-rebar] big-r81 commented on a diff in pull request #4: Copy rebar.app before bootstrapping

Posted by GitBox <gi...@apache.org>.
big-r81 commented on code in PR #4:
URL: https://github.com/apache/couchdb-rebar/pull/4#discussion_r1064195184


##########
bootstrap:
##########
@@ -49,6 +49,12 @@ main(Args) ->
                           false -> undefined
                       end,
 
+    %% Ensure, that the ebin folder exists after "make clean"
+    ok = filelib:ensure_dir("ebin/"),
+
+    %% Copy rebar.app into ebin
+    {ok, _} = file:copy("rebar.app", "ebin/rebar.app"),

Review Comment:
   Added your suggestion and added ebin/ to .gitignore.



-- 
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-rebar] jaydoane commented on pull request #4: Copy rebar.app before bootstrapping

Posted by GitBox <gi...@apache.org>.
jaydoane commented on PR #4:
URL: https://github.com/apache/couchdb-rebar/pull/4#issuecomment-1373951639

   > I think about that too, but then the ebin dirs are not removed, but empty.
   
   I thought more about this as well. They would not quite be empty, but still contain the .app files generated by rebar from the .app.src files, which I think could be a problem since I think we'd want `make clean` to remove those as well.


-- 
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-rebar] big-r81 commented on pull request #4: Copy rebar.app before bootstrapping

Posted by GitBox <gi...@apache.org>.
big-r81 commented on PR #4:
URL: https://github.com/apache/couchdb-rebar/pull/4#issuecomment-1373977970

   I think the PR is ready. On bootstrapping it checks if beim exists (create it if not) and copy the rebar.app into it. In combination with https://github.com/apache/couchdb/pull/4340 itโ€™s now possible to rebuild rebar if missing in bin/


-- 
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-rebar] jaydoane commented on pull request #4: Move rebar.app out of ebin

Posted by GitBox <gi...@apache.org>.
jaydoane commented on PR #4:
URL: https://github.com/apache/couchdb-rebar/pull/4#issuecomment-1373163533

   According to [the docs](https://www.erlang.org/doc/man/app.html#file-syntax):
   
   > The file is to be located in directory ebin for the application
   
   Maybe a better solution would be to fix `make clean`? What if we changed [this line](https://github.com/apache/couchdb/blob/main/Makefile#L442) to e.g.
   ```
   	@rm -rf src/*/ebin/*.beam
   ```
   ?


-- 
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-rebar] big-r81 commented on pull request #4: Move rebar.app out of ebin

Posted by GitBox <gi...@apache.org>.
big-r81 commented on PR #4:
URL: https://github.com/apache/couchdb-rebar/pull/4#issuecomment-1373612899

   > According to [the docs](https://www.erlang.org/doc/man/app.html#file-syntax):
   > 
   > > The file is to be located in directory ebin for the application
   
   Okay, then let's follow the docs.
   
   > Maybe a better solution would be to fix `make clean`? What if we changed [this line](https://github.com/apache/couchdb/blob/main/Makefile#L442) to e.g.
   > 
   > ```
   > 	@rm -f src/*/ebin/*.beam
   > ```
   
   I think about that too, but then the `ebin` dirs are not removed, but empty.
   I will update the PR, that the `rebar.app` is copied to `ebin` before building. 


-- 
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-rebar] big-r81 commented on pull request #4: Move rebar.app out of ebin

Posted by GitBox <gi...@apache.org>.
big-r81 commented on PR #4:
URL: https://github.com/apache/couchdb-rebar/pull/4#issuecomment-1372901586

   I have an open PR on the main repo too. Can you test this PR with the combination of https://github.com/apache/couchdb/pull/4340


-- 
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-rebar] big-r81 merged pull request #4: Copy rebar.app before bootstrapping

Posted by GitBox <gi...@apache.org>.
big-r81 merged PR #4:
URL: https://github.com/apache/couchdb-rebar/pull/4


-- 
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-rebar] jaydoane commented on pull request #4: Move rebar.app out of ebin

Posted by GitBox <gi...@apache.org>.
jaydoane commented on PR #4:
URL: https://github.com/apache/couchdb-rebar/pull/4#issuecomment-1372893555

   I ran into this issue today, so appreciate that it could be improved!
   
   However, moving rebar.app file to the top level looks weird, even though it seems to build that way.
   
   What if we moved it to src/rebar.app and then in bootstrap ensure ebin exists then copy it there from src/rebar.app?


-- 
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-rebar] big-r81 commented on pull request #4: Copy rebar.app before bootstrapping

Posted by GitBox <gi...@apache.org>.
big-r81 commented on PR #4:
URL: https://github.com/apache/couchdb-rebar/pull/4#issuecomment-1374573919

   Oh yes, it's a leftover of the changes. Since we now always copy rebar.app when building, it is of course sufficient to leave it in the top-level directory.


-- 
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-rebar] jaydoane commented on a diff in pull request #4: Copy rebar.app before bootstrapping

Posted by GitBox <gi...@apache.org>.
jaydoane commented on code in PR #4:
URL: https://github.com/apache/couchdb-rebar/pull/4#discussion_r1064044623


##########
bootstrap:
##########
@@ -49,6 +49,12 @@ main(Args) ->
                           false -> undefined
                       end,
 
+    %% Ensure, that the ebin folder exists after "make clean"
+    ok = filelib:ensure_dir("ebin/"),
+
+    %% Copy rebar.app into ebin
+    {ok, _} = file:copy("rebar.app", "ebin/rebar.app"),

Review Comment:
   maybe we can add something like e.g. ?
   ```
       %% CouchDB's `make clean` clobbers all ebin directories, so protect rebar.app by
       %%  moving it out of harm's way, and copying it into ebin before building.
   ```



##########
bootstrap:
##########
@@ -49,6 +49,12 @@ main(Args) ->
                           false -> undefined
                       end,
 
+    %% Ensure, that the ebin folder exists after "make clean"
+    ok = filelib:ensure_dir("ebin/"),
+
+    %% Copy rebar.app into ebin
+    {ok, _} = file:copy("rebar.app", "ebin/rebar.app"),

Review Comment:
   maybe we can add something like e.g. ?
   ```
       %% CouchDB's `make clean` clobbers all ebin directories, so protect rebar.app by
       %% moving it out of harm's way, and copying it into ebin before building.
   ```



-- 
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-rebar] jaydoane commented on pull request #4: Copy rebar.app before bootstrapping

Posted by GitBox <gi...@apache.org>.
jaydoane commented on PR #4:
URL: https://github.com/apache/couchdb-rebar/pull/4#issuecomment-1377654293

   > Maybe a final tribute before moving to rebar3...
   
   We've tried migrating several times, but maybe we'll get there :)


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