jbang-idea
jbang-idea copied to clipboard
sync jars does not pick up changes made to file
trafficstars
I start with afile with:
//DEPS info.picocli:picocli:4.6.2
//FILES 5letterwords.txt
//JAVA 17
I run sync and get picocli in dependencies. Great!
if I then add dependency:
//DEPS info.picocli:picocli:4.6.2
//DEPS com.microsoft.playwright:playwright:1.18.0
//FILES 5letterwords.txt
//JAVA 17
and run sync again it keeps just adding picocli.
even delete all deps and it still add it.
so somehow it does not get dependencies correcly.
p.s. restarting idea or reopen project sync works. So some kind of state is not updated right.
found the culprit - jetbrains save on focus change thus if you don't click into another file or view the content of file is not changed thus when jbang runs it can't yet see the files changes.
We should ensure that the files being editr are actually saved before trying to calculate dependencies.