00:07:07  * dbeveniusjoined
00:11:34  * dbeveniusquit (Ping timeout: 246 seconds)
00:51:10  * dbeveniusjoined
00:55:19  * dbeveniusquit (Ping timeout: 246 seconds)
01:30:15  * dbeveniusjoined
01:34:36  * dbeveniusquit (Ping timeout: 250 seconds)
01:51:05  * dbeveniusjoined
01:55:31  * dbeveniusquit (Ping timeout: 258 seconds)
02:11:05  * dbeveniusjoined
02:15:28  * dbeveniusquit (Ping timeout: 246 seconds)
02:29:13  * dbeveniusjoined
02:33:51  * dbeveniusquit (Ping timeout: 258 seconds)
02:52:16  * dbeveniusjoined
02:56:30  * dbeveniusquit (Ping timeout: 250 seconds)
03:11:18  * dbeveniusjoined
03:15:34  * dbeveniusquit (Ping timeout: 250 seconds)
03:49:18  * dbeveniusjoined
03:53:42  * dbeveniusquit (Ping timeout: 250 seconds)
05:59:24  * dbeveniusjoined
06:04:18  * dbeveniusquit (Ping timeout: 268 seconds)
06:19:04  * dbeveniusjoined
06:23:38  * dbeveniusquit (Ping timeout: 250 seconds)
06:38:26  * dbeveniusjoined
06:42:52  * dbeveniusquit (Ping timeout: 246 seconds)
07:33:08  * dbeveniusjoined
07:49:04  <joyee>Is it possible to use gyp to: build executable A with a variable set to one thing, use A to generate some output, and then build A again with the variable set to that output, all in one file? It seems error prone to me...
08:32:20  * dbeveniusquit (Ping timeout: 250 seconds)
09:30:28  * dbeveniusjoined
09:34:44  * dbeveniusquit (Ping timeout: 250 seconds)
09:50:15  * dbeveniusjoined
09:55:01  * dbeveniusquit (Ping timeout: 246 seconds)
10:04:25  <refack>No, gyp in linear. But you could parameterize everything and compose two targets from the parameters.
10:05:02  <refack>That's what I did for the code cache draf
10:05:04  <joyee>refack: yeah, that's what I suppose a better way to solve that
10:05:08  <refack>T
10:05:40  <joyee>refack: which one is that?
10:07:03  <refack>It's in some way PR I closed after the ban.
10:07:20  <refack>But I'm working on it again
10:07:55  <joyee>refack: cool. Just a heads up, I am rewriting the generator as mkcodecache
10:08:01  <refack>https://github.com/nodejs/node/pull/27108
10:09:34  <joyee>WIP is here, if you are interested, the GYP changes there are pretty small https://github.com/joyeecheung/node/tree/mkcodecache
10:10:32  * dbeveniusjoined
10:10:36  <joyee>I think you are probably onto something similar to my TODO left here https://github.com/joyeecheung/node/commit/e56441d0bf0277f38bf2122eca6d000984525adf
10:14:11  <refack>I'll see what I can do to make mkcodecache easier to create...
10:14:53  * dbeveniusquit (Ping timeout: 252 seconds)
10:15:22  <refack>It's just VERY hard to test, million platform dependant conditions. Only our CI cluster can cover them
10:15:33  <joyee>hm, I think it's already pretty easy now? Without a smaller base lib, I can still just link to the node_lib, but it would be ideal that it's smaller
10:16:24  <joyee>So it's now like a regular Node.js embedder...that only uses something from node_native_module.h with NODE_WANT_INTERNALS
10:16:29  <refack>Need to move the cachestub to the exe target
10:16:54  <joyee>The hard part is, to integrate whatever mkcodecache generate into the executable
10:17:13  <joyee>Within GYP
10:17:56  <joyee>tools/generate_code_cache.js -> tools/mkcodecache is not too difficult and is what I have so far
10:19:45  <refack>I think I have an idea how to do it. I'll try to write something when I'm back near keyboard, and I'll ping you
10:20:13  <joyee>cool, I will be around for another couple of hours
10:20:29  <joyee>(wait, that's a wrong expression)
10:49:33  * dbeveniusjoined
10:53:49  * dbeveniusquit (Ping timeout: 246 seconds)
11:39:34  * dbeveniusjoined
11:43:47  * dbeveniusquit (Ping timeout: 245 seconds)
12:01:30  * dbeveniusjoined
12:05:55  * dbeveniusquit (Ping timeout: 246 seconds)
12:40:36  * dbeveniusjoined
12:45:02  * dbeveniusquit (Ping timeout: 245 seconds)
12:59:40  * dbeveniusjoined
13:04:02  * dbeveniusquit (Ping timeout: 250 seconds)
13:20:24  * dbeveniusjoined
13:24:40  * dbeveniusquit (Ping timeout: 246 seconds)
13:41:24  * dbeveniusjoined
13:45:53  * dbeveniusquit (Ping timeout: 245 seconds)
13:59:41  * dbeveniusjoined
14:03:47  * dbeveniusquit (Ping timeout: 240 seconds)
14:20:51  * dbeveniusjoined
14:25:19  * dbeveniusquit (Ping timeout: 252 seconds)
14:40:38  * dbeveniusjoined
14:43:12  * dbeveniusquit (Remote host closed the connection)
14:43:24  * dbeveniusjoined
15:46:15  * dbeveniusquit (Remote host closed the connection)
15:51:56  * dbeveniusjoined
15:56:34  * dbeveniusquit (Ping timeout: 246 seconds)
16:09:47  * dbeveniusjoined
16:14:16  * dbeveniusquit (Ping timeout: 250 seconds)
16:29:49  * dbeveniusjoined
16:34:37  * dbeveniusquit (Ping timeout: 268 seconds)
17:09:50  * dbeveniusjoined
17:14:22  * dbeveniusquit (Ping timeout: 258 seconds)
17:29:47  * dbeveniusjoined
17:34:26  * dbeveniusquit (Ping timeout: 268 seconds)
17:51:34  <refack>joyee: https://github.com/nodejs/node/commit/358a3ea7ae513e050cc1ed595b5cedc4ce8fb5a1
17:51:59  <refack>That's a draft of what's should happen... I'm testing it now
17:53:53  * dbeveniusjoined
17:58:27  * dbeveniusquit (Ping timeout: 258 seconds)
18:11:54  * dbeveniusjoined
18:16:17  * dbeveniusquit (Ping timeout: 245 seconds)
18:30:50  * dbeveniusjoined
18:35:14  * dbeveniusquit (Ping timeout: 252 seconds)
18:49:53  * dbeveniusjoined
18:54:30  * dbeveniusquit (Ping timeout: 264 seconds)
19:03:37  <refack>https://github.com/nodejs/node/pull/27108/commits/6fb35c7d7430bfc48374820ffa9e2c156e05232c
19:03:52  <refack>This one works on windows based on `master`
19:09:54  * dbeveniusjoined
19:14:13  * dbeveniusquit (Ping timeout: 245 seconds)
19:14:51  <refack>And this will get the tests to pass https://github.com/nodejs/node/pull/27108/commits/1c1db69b3eda2ca8bdf07a3113e2d198d7e6b9ce
19:32:55  * dbeveniusjoined
19:37:07  * dbeveniusquit (Ping timeout: 250 seconds)
19:49:54  * dbeveniusjoined
19:54:13  * dbeveniusquit (Ping timeout: 245 seconds)
20:10:57  * dbeveniusjoined
20:15:55  * dbeveniusquit (Ping timeout: 268 seconds)
20:30:00  * dbeveniusjoined
20:34:35  * dbeveniusquit (Ping timeout: 244 seconds)
20:50:49  * dbeveniusjoined
20:55:03  * dbeveniusquit (Ping timeout: 245 seconds)
21:10:01  * dbeveniusjoined
21:14:34  * dbeveniusquit (Ping timeout: 250 seconds)
21:29:58  * dbeveniusjoined
21:34:30  * dbeveniusquit (Ping timeout: 250 seconds)
21:50:57  * dbeveniusjoined
21:55:21  * dbeveniusquit (Ping timeout: 258 seconds)
22:10:06  * dbeveniusjoined
22:14:37  * dbeveniusquit (Ping timeout: 245 seconds)
22:26:26  <joyee>refack: um, mkcodecache can just be run with a path of output as argument, the tools script is not useful anymore
22:27:26  <refack>I couldn't get it to compile, so I used the code in master. It works
22:28:25  <refack>Only thing needs changing is how to build `mkcodecache` in https://github.com/nodejs/node/commit/358a3ea7ae513e050cc1ed595b5cedc4ce8fb5a1#diff-259e627be3fafed9e9c10a7fcb26879eR1144
22:28:40  <refack>and how to call it in https://github.com/nodejs/node/commit/358a3ea7ae513e050cc1ed595b5cedc4ce8fb5a1#diff-259e627be3fafed9e9c10a7fcb26879eR403
22:29:49  <joyee>Oh you are using node_main
22:30:14  <joyee>But don’t you have to copy all the stuff used to build the main executable?
22:30:25  <refack>Yeah, just bacause it works
22:30:42  <refack>No, I based it more on `cctest`
22:31:27  <refack>it's essentialy the same as the main exe, it even has a REPL 🤣
22:31:41  <refack>Then you can remove stuff
22:31:51  <joyee>I wonder what’s the difference is there...
22:32:20  <joyee>Probably the flags does not matter if you are not building the final product
22:33:05  <refack>my `mkcodecache` uses `src/node_code_cache_stub.cc`
22:33:26  <refack>and the real binary uses the generated `<(SHARED_INTERMEDIATE_DIR)/node_code_cache.cc`
22:34:01  * dbeveniusjoined
22:34:07  <refack>I'm fighting with the V8 inspector, then I'll migrate your changes
22:34:21  <joyee>I think the rewrite does not compile because I split it into a library and an executable
22:34:38  <joyee>So that I can write cctest with cache_builder
22:34:49  <refack>I think I had some old artifacts that messed stuff up
22:35:30  <joyee>Maybe it compiles if you fuse the two targets into one..
22:35:57  <joyee>I don’t have a windows machine at hand so I can just guess and CI
22:36:02  <refack>I tried that, but was missing symbols
22:36:05  <refack>https://www.irccloud.com/pastebin/S60Smgpt/
22:37:35  <refack>after I reverted everything I found I had a weird `node_native_module.h` in the root of the repo, that probably messed everything up
22:38:27  * dbeveniusquit (Ping timeout: 240 seconds)
22:44:33  <joyee>Can you run it with the target toolchain though
22:45:08  <refack>No, but mksnapshot runs with the host toolset
22:45:40  <joyee>That one has less platform dependent code than node_lib, I think
22:45:53  <joyee>But maybe it does not matter?
22:46:04  <refack>I think hashseed said if they are both 64 with same endiness it should work
22:46:34  <refack>It's more about how V8 compiles the code...
22:46:52  <joyee>The binary needs to be able to run on the host machine with the emulator at least
22:48:45  <joyee>I am not sure the ifdefs matter enough for the ARM builds
22:49:09  <refack>ATM we do cross-compile for ARM, so if CI will fail we will know
22:49:43  <refack>We are soon going to cross compile for Windows/ARM64 as well
23:19:05  <joyee>https://ci.nodejs.org/job/node-test-commit/27587/ The CI seems to be alright if I fuse the targets into one mkcodecache..
23:20:03  <refack>I'll try it next
23:20:57  <joyee>It's https://github.com/nodejs/node/commit/5cbc0095211a99849d971ba5e68882217f4c95ea BTW
23:51:05  * dbeveniusjoined
23:56:09  * dbeveniusquit (Ping timeout: 268 seconds)