jbang-idea icon indicating copy to clipboard operation
jbang-idea copied to clipboard

sync jars does not pick up changes made to file

Open maxandersen opened this issue 3 years ago • 2 comments
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.

maxandersen avatar Jan 27 '22 23:01 maxandersen

p.s. restarting idea or reopen project sync works. So some kind of state is not updated right.

maxandersen avatar Jan 27 '22 23:01 maxandersen

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.

maxandersen avatar Jan 29 '22 00:01 maxandersen