RN
aloha y'all. Dev123 is requesting voice in here. They have a new SAM library and would like to discuss and request review.
mesh
git.idk.i2p is really slow
mesh
even slower than the bbc
HaruCode
did anyone here use intellij idea for building i2p?
HaruCode
I want a debug configuration for it if possible
mesh
HaruCode: building or running?
HaruCode
debugging
zlatinb
HaruCode: yes I do
mesh
HaruCode: you could in theory run i2p from the IDE and debug it using the IDE debugger
zlatinb
use the build.gradle
HaruCode
you mean it has genintellijruns task?
mesh
HaruCode: at the end of the day I2P is just a plain old java program. there's some... iffyness around the jbigi stuff but you should be able to run it from your ide. The other problem that comes up is timing where time-sensitive operations might not play well with a pausing debugger
HaruCode
ban him someone please
zlatinb
no, use build.gradle to import the project into intellij, then debug the main class RouterLaunch
zlatinb
net.i2p.router.RouterLaunch
mesh
not sure you want to use RouterLaunch
mesh
I tend to just run it using net.i2p.router.Router
mesh
does RouterLaunch do stuff with the wrapper?
zlatinb
I don't think so
zlatinb
the wrapper madness is around WrapperSimpleApp
mesh
what is the purpose of RouterLaunch? It does nothing but call Router.main according to github.com/i2p/i2p.i2p/blob/master/router/java/src/net/i2p/router/RouterLaunch.java
mesh
perhaps it's just maintained for backwards compatibility
zlatinb
runplain.sh uses it
zlatinb
platforms that the wrapper doesn't support, easy-install bundles too
mesh
I guess, but the code does nothing but call Router.main.
HaruCode
zlatinb, any specific options?
zlatinb
if you're running it as the same user as your current router you should change the home directory
mesh
HaruCode: iirc the problem you'll run into is jbigi
zlatinb
if not you will need to create a full deployment of the router package with reseed certificates and such
zlatinb
the hard part is getting all those files in the right place, after that you just pass two options to the jvm
zlatinb
easiest thing is to copy everything from your current router home somewhere else (except the lockfile), then pass i2p.dir.config=/absolute/path/to/new/dir
mesh
I would recommend separating the concept of the I2P_INSTALL_DIR from the I2P_WORKSPACE_DIR
mesh
then you can do this:
mesh
$JAVA_HOME/bin/java -Di2p.dir.base=$I2P_INSTALL_DIR/ -Di2p.dir.pid=$I2P_WORKSPACE_DIR/data/tmp/ -Di2p.dir.config=$I2P_WORKSPACE_DIR/data/config/ -Djava.library.path=$I2P_INSTALL_DIR\lib -cp "$I2P_INSTALL_DIR\lib\*" -XX:+UseZGC -XX:SoftMaxHeapSize=4g -XX:+UseNUMA -XX:+UseStringDeduplication net.i2p.router.Router
mesh
if you're running from an IDE you can set I2P_WORKSPACE_DIR to some directory in temp and even tell java to delete it at jvm exit
mesh
at some point I had this working in the Eclipse IDE so that I could launch an embedded router, launch some services, run some tests, and then have everything blown away at exit
mesh
but the problem with using such a new, embedded router is that such routers have little to no connectivity
HaruCode
using localizable message values for unit test is bad idea
HaruCode
and why it's said in the docs that gradle builds are not supported?
zlatinb
they are not used for anything other than setting uo an ide
zlatinb
although I did some work on a reproducible gradle build and it sort-of-works
mesh
a reproducible gradle build sounds really nice
mesh
that would let people build their own i2p router for a well-known version
zlatinb
well it's there in the "reproducible" sub-project
mesh
interesting
mesh
zlatinb: right now ant is the supported way to build i2p, is that the idea?
zlatinb
basically yes
zlatinb
a lot of other projects depend on ant outputs
mesh
but the ant build isn't reproducible?
zlatinb
the debian task supposedly is
zlatinb
in that it passes the checks by the debian bot
zlatinb
except that it really isn't - the bot isn't checking one edge case lol
zlatinb
but I'm not getting into that quarrel again
mesh
heh, the build.xml includes the word 'reproducible' ... that's always a good sign