-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
After first SBT compile, subsequent compiles fail with "[etlas] copyFile: permission denied (Access is denied.)" #4
Comments
I should add that quitting and reloading SBT allows the project to compile again, but only a single time before the issue above occurs again. |
@harveywi Apologise for the late response. Can you go to |
Thanks! I get I ran |
Whoops - see my updated comment. Accidentally, added an extra |
Thanks again! I ran it five times, each time obtaining identical output:
|
@jneira, do you have any thoughts on what may be causing this? Can an open file handle prevent |
I think I may have an idea. Interestingly, I can't do a
If I look at Resource Monitor to find the files that are open by SBT (java.exe), I find that the compiled jar file remains open even after compilation:
If I try to delete that file manually while SBT is still running, Windows won't let me do it. So, maybe that file needs to be closed after compilation. Thank you for all your help with this! |
Cool, thanks for looking into it. Do you have an idea of how to go about a fix? This was my first SBT plugin so I may have done something wrong in terms of file handling. |
I think it may have to do with resource management of the created
Looking at the Process API, it looks like there is a I will see if I can compile and run the SBT plugin to see if I can resolve the issue. Wish me luck! |
Good luck! :) The |
Ok, I think (with the usual caveats) I understand what is going on. It doesn't appear to be a resource leak. Etlas produces a linked jar file that is then added to the SBT project as an unmanaged jar after the initial compile. When the second compile is attempted, SBT has the file open (since it's an unmanaged jar), and etlas is unable to write over the top of the jar. So, to fix it, there probably needs to be a way to temporarily remove the linked jar file from I'll see if I can get a fix, even if it is not pretty. |
@harveywi Were you able to get a fix? |
@rahulmutt Unfortunately, not yet. I have limited experience writing SBT plugins, but based on my assessment I think the changes required to fix the problem may be substantial. I have not tried to use this plugin on a linux machine yet, so I am not sure if the problem persists there. If I have time this afternoon I will give it a whirl. |
Ok great. If you can share the details of the assessment (beyond what you provided earlier) I can try to implement a fix and you can test it out. |
@rahulmutt Wow, that would be cool! So, I could be wrong, but I think that running Having never written an SBT plugin, I can only guess about a solution that SBT might expect. However, after thinking about this for a while, if I were to give it another try I might take a look at the I will let you know when I get a chance to jump in and help. |
@Romastyi Do you think your changes may have fixed this? |
On Windows 7 Enterprise, the initial SBT compilation of the example project works great. However, changing the
Transform.hs
file and recompiling will result in an etlas errorcopyFile: permission denied (Access is denied.)
. Here is some sample console output:Running
last compile:etaCompile
gives the following stack trace:The text was updated successfully, but these errors were encountered: