netcreateorg / netcreate-itest

Developing the 2.0 version of NetCreate
https://github.com/netcreateorg/netcreate-2018
Other
0 stars 0 forks source link

Server triggers recompile during app interactions #222

Open dsriseah opened 1 month ago

dsriseah commented 1 month ago

Noted in #213 in this comment, the system seems to recompile randomly while playing with the app.

SERVER OUTPUT EXAMPLE 1 While editing an new project with provenance features, these retrigger events were seen in the server console

--- compilation complete - appserver is online ---

SRV_NET  - socket ADD UADDR_01 to network
SRV_NET  - socket DEL UADDR_01 from network
SRV_NET  - socket ADD UADDR_02 to network
ServerDB - AUTOSAVING! 1 NODES / 0 EDGES / 0 COMMENTS / 0 READBY <3
ServerDB - AUTOSAVING! 1 NODES / 0 EDGES / 0 COMMENTS / 0 READBY <3

--- rebuilding _ur_addons ---
    building core...
    building addons...
    triggering recompile...

 [12 dupes]

 13:17:35 - info: Installing packages with npm...

--- rebuilding _ur_addons ---
    building core...
    building addons...
    triggering recompile...

[more dupes]

SERVER OUTPUT EXAMPLE 2 The compiling of jquery is weird; it's somehow detected a change in something that forced a recompile.

SRV_NET  - socket ADD UADDR_01 to network
13:20:33 - info: compiled bootstrap.min.css and 10 cached files into netc-app.css in 131 ms
ServerDB - AUTOSAVING! 2 NODES / 0 EDGES / 0 COMMENTS / 0 READBY <3
ServerDB - AUTOSAVING! 2 NODES / 0 EDGES / 0 COMMENTS / 0 READBY <3
ServerDB - AUTOSAVING! 2 NODES / 0 EDGES / 0 COMMENTS / 0 READBY <3
ServerDB - AUTOSAVING! 2 NODES / 0 EDGES / 0 COMMENTS / 0 READBY <3
ServerDB - AUTOSAVING! 2 NODES / 1 EDGES / 0 COMMENTS / 0 READBY <3
13:24:30 - info: compiled jquery.js and 1205 cached files into netc-lib.js in 1.3 sec
dsriseah commented 1 month ago

Speculation as to the cause of recompile loops

There is a watcher process that brunch-config.js defines: image

If you are writing data into the _ur or _ur_addons directory, you will trigger a recompile. Data should be written to the NetCreate runtime directory.

TO DEBUG

If you notice it happening again, you can console.log the event and path parameters of the on('all' on line 134 of brunch-config.js to see what is getting written.