You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by "rnewson (via GitHub)" <gi...@apache.org> on 2026/02/11 16:41:28 UTC

[PR] Build dev improvements [couchdb]

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

   ## Overview
   
   Some small tweaks to make building/development easier.
   
   ## Testing recommendations
   
   N/A
   
   ## Related Issues or Pull Requests
   
   None
   
   ## Checklist
   
   - [x] This is my own work, I did not use AI, LLM's or similar technology
   - [x] Code is written and works correctly
   - [ ] Changes are covered by tests
   - [ ] Any new configurable parameters are documented in `rel/overlay/etc/default.ini`
   - [ ] Documentation changes were made in the `src/docs` folder
   - [ ] Documentation changes were backported (separated PR) to affected branches
   


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


Re: [PR] Build dev improvements [couchdb]

Posted by "nickva (via GitHub)" <gi...@apache.org>.
nickva commented on code in PR #5885:
URL: https://github.com/apache/couchdb/pull/5885#discussion_r2794819208


##########
mise.toml:
##########
@@ -0,0 +1,9 @@
+[env]
+NODE_ENV = 'production'
+
+[tools]

Review Comment:
   Ah nice, that works!



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


Re: [PR] Build dev improvements [couchdb]

Posted by "rnewson (via GitHub)" <gi...@apache.org>.
rnewson commented on code in PR #5885:
URL: https://github.com/apache/couchdb/pull/5885#discussion_r2794813582


##########
mise.toml:
##########
@@ -0,0 +1,9 @@
+[env]
+NODE_ENV = 'production'
+
+[tools]

Review Comment:
   you can make a `mise.local.toml` (but don't commit it) to override this one (https://mise.jdx.dev/configuration.html)



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


Re: [PR] Build dev improvements [couchdb]

Posted by "rnewson (via GitHub)" <gi...@apache.org>.
rnewson commented on code in PR #5885:
URL: https://github.com/apache/couchdb/pull/5885#discussion_r2794886032


##########
src/couch_quickjs/build_js.escript:
##########
@@ -74,7 +74,7 @@ compile_bytecode(Js, CBytecode) ->
     Tmp = CBytecode ++ ".tmp",
     {ok, Cwd} = file:get_cwd(),
     CompileCmd = Cwd ++ "/quickjs/qjsc -c -N bytecode -o c_src/" ++ Tmp ++ " priv/" ++ Js,
-    os:cmd(CompileCmd),
+    os:cmd(CompileCmd, #{exception_on_failure => true}),

Review Comment:
   context here is that it failed when I tried a vsc Dev Container. I had compiled `qjsc` locally on my mac, then that binary was copied into the dev container. The makefile considered it 'up to date' but it was obviously build for macos and not linux, so executing got a 'bad exec format' result, which we ignored and continued with the rest, which crashed with `{error, enoent}` as the output file didn't exist and `fread` crashes if it doesn't.



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


Re: [PR] Build dev improvements [couchdb]

Posted by "nickva (via GitHub)" <gi...@apache.org>.
nickva commented on code in PR #5885:
URL: https://github.com/apache/couchdb/pull/5885#discussion_r2794656662


##########
src/couch_quickjs/build_js.escript:
##########
@@ -74,7 +74,7 @@ compile_bytecode(Js, CBytecode) ->
     Tmp = CBytecode ++ ".tmp",
     {ok, Cwd} = file:get_cwd(),
     CompileCmd = Cwd ++ "/quickjs/qjsc -c -N bytecode -o c_src/" ++ Tmp ++ " priv/" ++ Js,
-    os:cmd(CompileCmd),
+    os:cmd(CompileCmd, #{exception_on_failure => true}),

Review Comment:
   This doesn't seem to work in 26 and 27, only 28.
   
   It won't hurt to have in 26 and 27, it just won't do what the option says, it gets silently ignored so it's not worse than before.



##########
mise.toml:
##########
@@ -0,0 +1,9 @@
+[env]
+NODE_ENV = 'production'
+
+[tools]

Review Comment:
   Would this make it difficult to switch to other erlang versions? Not sure if there is a priority mechanism in play where my global or shell set erlang would take precedence over mise.toml?



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


Re: [PR] Build dev improvements [couchdb]

Posted by "rnewson (via GitHub)" <gi...@apache.org>.
rnewson commented on code in PR #5885:
URL: https://github.com/apache/couchdb/pull/5885#discussion_r2794814804


##########
mise.toml:
##########
@@ -0,0 +1,9 @@
+[env]
+NODE_ENV = 'production'
+
+[tools]

Review Comment:
   in fact I'll add that path 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


Re: [PR] Build dev improvements [couchdb]

Posted by "rnewson (via GitHub)" <gi...@apache.org>.
rnewson commented on code in PR #5885:
URL: https://github.com/apache/couchdb/pull/5885#discussion_r2794825590


##########
src/couch_quickjs/build_js.escript:
##########
@@ -74,7 +74,7 @@ compile_bytecode(Js, CBytecode) ->
     Tmp = CBytecode ++ ".tmp",
     {ok, Cwd} = file:get_cwd(),
     CompileCmd = Cwd ++ "/quickjs/qjsc -c -N bytecode -o c_src/" ++ Tmp ++ " priv/" ++ Js,
-    os:cmd(CompileCmd),
+    os:cmd(CompileCmd, #{exception_on_failure => true}),

Review Comment:
   ah shame. I am using 26 and it didn't crash, so I guess it's silently ignored. I see it was added in otp source some time ago.



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


Re: [PR] Build dev improvements [couchdb]

Posted by "nickva (via GitHub)" <gi...@apache.org>.
nickva commented on code in PR #5885:
URL: https://github.com/apache/couchdb/pull/5885#discussion_r2794834361


##########
src/couch_quickjs/build_js.escript:
##########
@@ -74,7 +74,7 @@ compile_bytecode(Js, CBytecode) ->
     Tmp = CBytecode ++ ".tmp",
     {ok, Cwd} = file:get_cwd(),
     CompileCmd = Cwd ++ "/quickjs/qjsc -c -N bytecode -o c_src/" ++ Tmp ++ " priv/" ++ Js,
-    os:cmd(CompileCmd),
+    os:cmd(CompileCmd, #{exception_on_failure => true}),

Review Comment:
   Let's still set it, we'll get to 28 eventually 



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


Re: [PR] Build dev improvements [couchdb]

Posted by "rnewson (via GitHub)" <gi...@apache.org>.
rnewson commented on code in PR #5885:
URL: https://github.com/apache/couchdb/pull/5885#discussion_r2794886032


##########
src/couch_quickjs/build_js.escript:
##########
@@ -74,7 +74,7 @@ compile_bytecode(Js, CBytecode) ->
     Tmp = CBytecode ++ ".tmp",
     {ok, Cwd} = file:get_cwd(),
     CompileCmd = Cwd ++ "/quickjs/qjsc -c -N bytecode -o c_src/" ++ Tmp ++ " priv/" ++ Js,
-    os:cmd(CompileCmd),
+    os:cmd(CompileCmd, #{exception_on_failure => true}),

Review Comment:
   context here is that it failed when I tried a vsc Dev Container. I had compiled `qjsc` locally on my mac, then that binary was copied into the dev container. The makefile considered it 'up to date' but it was obviously built for macos and not linux, so executing got a 'bad exec format' result, which we ignored and continued with the rest, which crashed with `{error, enoent}` as the output file didn't exist and `fread` crashes if it doesn't.



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


Re: [PR] Build dev improvements [couchdb]

Posted by "rnewson (via GitHub)" <gi...@apache.org>.
rnewson merged PR #5885:
URL: https://github.com/apache/couchdb/pull/5885


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