error: recursive value needs type
See original GitHub issueI have a multi-project build where I have three projects defined: interface
, client
and service
(root project):
lazy val interface = (project in file("interface"))
.settings(...)
lazy val client = (project in file("client"))
.dependsOn(interface, service % "test->test")
.settings(...)
lazy val service = (project in file("."))
.dependsOn(interface)
.settings(...)
As you can see, client
and service
both depend on interface
, and client
test scope also depends on service
test scope. This works fine. However, I would like service, as the root project, to also aggregate
the client
project – however, if I add this line to the service
config:
.aggregate(client)
I get the following error in the client
project definition:
/Users/kflorence/dev/mosaic/utility-service/build.sbt:42: error: recursive value service needs type
.dependsOn(interface, service % "test->test")
Is there any way to make this work?
Issue Analytics
- State:
- Created 8 years ago
- Reactions:3
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Recursive value xxx needs type in Scala - Stack Overflow
I have two classes which depend on each other. When I try to create a new instance of A without a type declaration,...
Read more >Recursive value needs type - Question - Scala Users
I don't understand the compiler error that says the recursive value mt needs type. Is mt really a recursive value? Here's the error....
Read more >Fixing scala error “error: recursive value count needs type”
The reason for this is that the type inference algorithm isn't set up to handle this – while this is a simple example,...
Read more >Unexpected "recursive value needs type" error #5091 - GitHub
So my recursive value x needs type is different from bug's recursive value needs type ? Sorry if it is a different bug,...
Read more >recursive value count needs type - Cumulative Sum
The fix is really simple, just don't name the new variable as count it conflicts with count function. Let's name it count2: scala>...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Related #2104 and #2183. This is because aggregate doesn’t take the by-name parameter. You could try working around this issue by creating a
Ref
value:Yeah you need to either provide the type or use a project reference like
LocalProject
.