score:0

Accepted answer

i found the problem was using symbols for the binding identifier. i swapped them out for a solution using bindingids and everything worked :

object bindingkeys {
  object location extends bindingid
}

object servermodule extends newbindingmodule (module => {
  import module._
  import bindingkeys._

  bind[string] idby location tosingle {
    play.current.configuration.getstring("file.location").getorelse (
      throw new illegalstateexception("cannot find file")
    )
  }

  bind[thirdpartylib] toprovider { implicit module =>
      val liblocation = inject [string] (some(location))
      thirdpartylib fromfile liblocation
  }

  bind[controller] toprovider { implicit module => new controller}})

Related Query

More Query from same tag