Hello,
I'm using bloop and VSCode to build a fairly big scala project at the University Hospital Essen. Thanks for the great work - bloop is a really nice tool :-)
Unfortunately I ran into an issue regarding resources: One of our projects tries load a resource from the classpath - which usually works fine and never caused issues in any other project.
I'm loading the resource /fhir/r4/search-parameters.json via
Using(getClass.getResource(resourceName).openConnection.getInputStream)(...)
The file is located in src/main/resources/fhir/r4/search-parameters.json in the project and is also found after compilation in target/classes/fhir/....
When I run this project via bloop run, getResource fails to find the resource. Running it either manually via java -cp target/classes/ ... or from a jar (packaged via mvn package) works fine.
Looking at .bloop/<project>.json shows /absolute/path/to/target/classes and all dependency-jars in the project.classpath entry. Most notably the project.resources entry in the configuration is completely empty.
Adding /absolute/path/to/target/classes to project.resources fixes the issue when running the application bloop run.
Now I'm trying to figure out if the project generator fails to add the entry or if something else in my project configuration is wrong.
We have a pretty complex project setup (including parent-poms with various settings), so it's hard to create a minimal project reproducing the issue.
bloop 1.4.0-RC1-69-693de22aopenjdk version "13.0.2" 2020-01-14Scala 2.13.1Please let me know if you need anything else - if necessary I can try to build a minimal project to reproduce the issue without any dependencies :-)
Ah, I just found #1199. I'll try to build bloop from source and see if my issue is fixed.
Hi @the-kenny, thanks for reporting and the kind words.
Instead of building from source you can also depend on the latest release from master, it's in the installation page https://scalacenter.github.io/bloop/setup
It suffices to change your bloop version in the build to 1.4.0-RC1-105-118a551b and you might want to change it as well in Metals too.
I'm going to close this ticket operating on the assumption that this is a dupe of #1199, if it isn't we'll reopen and look into this.
Can confirm that setting metals.bloopVersion to 1.4.0-RC1-105-118a551b and using the internal server seems to fix the issue.