jbangdev / jbang-idea

IntelliJ IDEA plugin for JBang
https://plugins.jetbrains.com/plugin/18257-jbang
MIT License
20 stars 9 forks source link

sync jars does not pick up changes made to file #30

Open maxandersen opened 2 years ago

maxandersen commented 2 years ago

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 commented 2 years ago

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

maxandersen commented 2 years ago

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.