-
Notifications
You must be signed in to change notification settings - Fork 202
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
Resources file not visible in classes directory #1631
Comments
Thanks for reporting! We might not be correctly copying the results to the client class directories. |
As far as I understand - Bloop intentionally doesn't copy resources into the classes dir. Instead it puts the resources dir on the classpath (and expects it to be on the classpath of dependent projects). I guess this is an optimisation to save on file copying. This works fine for compile/test/run but not packaging. It might be easier to change the package code to include the resources dir. |
Thanks for pointing that out! Bloop wasn't doing any packaging yet, so that would explain it. |
@tgodzik It's worth noting that the issue is not about packaging, @lwronski provided an example with For me, the main issue is that once compiled stuff shouldn't change its behavior. If bloop puts current resources from the working directory on the classpath then after compilation I may do some changes in resources. Suddenly the program is working differently and it could be very hard to spot why. Every build tool which I know is copying resources and I expect that Bloop behaves similarly. |
Bump. This is still an issue. I agree Bloop should copy the files into the classpath directory. |
Actually, coming back to it I don't really see that it's that large an issue. One of the arguments raised before:
If you change resource and do sbt run it will pick up the new changed resources. This might only be an issue if you run from target directory, which seems like a niche case. @crt-31 what kinds of issues are you seeing? I am not too keen to change the behaviour since packaging is outside of Bloop competencies and most tools using Bloop work correctly or can easily work around this. Also, this would be a larger change for not that much benefit. |
To fix the problem with files being included I raised #2553 |
@tgodzik, Thanks for lookaing at this. |
Fixed in #2553 |
Hello, I have an issue with
bloop run
, that resource files are not copied to the classes directory.Using this source:
With SBT:
classes directory
containsinput
fileWith bloop:
After running
sbt bloopInstall
but with
bloop
classes directory doesn't containinput
fileThe text was updated successfully, but these errors were encountered: