Comments (3)
Ok, so the problem here is that Defaults.baseClasspaths
is being redefined in the DevRuntime
scope for every project many times (the many times is not causing the problem, but it's just unnecessary). This means the update task, which should not be scoped to a configuration, is being redefined in the DevRuntime
configuration, so when externalDependencyClasspath in DevRuntime
is executed, for example, it causes update in DevRuntime
to also be executed, which since it's been defined explicitly at that scope now, is considered by sbt to be a different task to update
, and so sbt runs both update
and update in DevRuntime
, usually concurrently, and they stomp on each other.
We must not redefine all the Defaults.baseClasspaths
in a different scope, it's probably going to break many other things, not just this.
I think the sbt plugin refactoring has to be backed out, I can't see any way to fix it. What I'd really like to see is if we had something like:
val DevRuntime = Config("dev-mode") extends Runtime
Then we can:
libraryDependencies += component("lagom-reloadable-server") % DevRuntime
And then we can just interrogate the update report for the classpath in the DevRuntime
scope, and that should bring in all the project dependencies, not just the dev runtime scoped ones (since dev runtime extends runtime), and then we don't have to use any concatenation anywhere, no need to go and also get the Runtime
classpath. In fact, if you ever do ++
on a classpath, that should be an immediate alarm bell - we should never do that, we should let Ivy work out classpaths. That should be a lot simpler than the current setup.
from lagom.
from lagom.
James, thanks for raising this. I'm not sure what you mean with "I think the sbt plugin refactoring has to be backed out", but having dependencies simply scoped to DevRuntime
, without redefining other tasks, is definitely a good idea to fix this issue.
from lagom.
Related Issues (20)
- Adopt sbt-explicit-dependencies
- lagom-nightly-deploy-master failed HOT 6
- JDK16 compatibility issues HOT 5
- Support sbt 1.4 virtual files when displaying error source
- `mapFuture` with `ec.prepare()`
- Lagom 1.6.5 has conflicting transitive dependencies on other lightbend projects HOT 2
- how to compile lagom service in scala3 HOT 1
- Circuit breaker panel memory leak (?)
- Compilation failed - breakCompilation
- CI fails on master - NoClassDefFoundError: sjsonnew/BasicJsonProtocol HOT 1
- How can I run Lagom service in Prod Mode? HOT 2
- readside and readside offset produce duplicate entry error HOT 1
- [epic] reduce repository maintenance cost HOT 2
- Upgrade to log4j2 2.17 per Apache Log4j vulnerability guidance and security. HOT 2
- Lagom runAll failing because of semver check HOT 1
- Lagom bom-pom includes transitive dependencies HOT 1
- Make it easier to independently init SlickProvider HOT 1
- `atLeastOnce` Kafka Consumer not restarting on error
- At-most-once for Read Side Processor HOT 1
- Kafka client upgrade
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lagom.