Code Monkey home page Code Monkey logo

Comments (3)

jroper avatar jroper commented on May 18, 2024

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.

jroper avatar jroper commented on May 18, 2024

@dotta

from lagom.

dotta avatar dotta commented on May 18, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.