Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Oct 20 19:31
    scala-steward closed #34
  • Oct 20 19:31
    scala-steward commented #34
  • Oct 20 19:31
    scala-steward opened #40
  • Oct 20 15:27
    scala-steward opened #39
  • Oct 13 22:49
    scala-steward opened #38
  • Oct 11 11:34
    scala-steward opened #37
  • Oct 07 01:07
    scala-steward opened #36
  • Oct 06 20:46
    scala-steward opened #35
  • Oct 02 19:21
    scala-steward opened #34
  • Sep 28 13:44

    xerial on main

    Update scalafmt-core to 3.0.5 Reformat with scalafmt 3.0.5 Merge pull request #33 from sca… (compare)

  • Sep 28 13:44
    xerial closed #33
  • Sep 27 17:03

    xerial on main

    Use scheduleWithFixedDelay (compare)

  • Sep 25 19:12
    scala-steward opened #33
  • Sep 24 20:42

    xerial on main

    Fix (compare)

  • Sep 24 06:43

    xerial on main

    Remove parentId, taskTrigger Add context Fix dispatch and 1 more (compare)

  • Sep 23 04:59

    xerial on main

    error code parse test repackage task model classes Add TaskError (compare)

  • Sep 23 01:41

    xerial on main

    reformat (compare)

  • Sep 23 01:41
    xerial closed #32
  • Sep 23 01:41

    xerial on main

    Update trino-cli, trino-jdbc, t… Merge pull request #32 from sca… (compare)

  • Sep 23 01:19
    scala-steward opened #32
Kai Sasaki
@Lewuathe
Sauce
ScalaDI
Taro L. Saito
@xerial
How about airframe?
trait = frame, mixin = composing an aircraft
Taro L. Saito
@xerial
Dependency injection has a history of abuse, so I need a refreshment
Taro L. Saito
@xerial
If we avoid the name of injection, we should use a different keyword for binding objects in trait
Instead of using trait { val a = inject[A] }
inject[A], wire[A], bind[A], load[A], etc.
Kai Sasaki
@Lewuathe
inject[A] seems not confusing even for Guice users. So inject[A] looks good even it is necessary to refreshment.
If we should avoid inject, bind or load seems confusing. wire might be okay? (Though I'm not sure other famous frameworks uses this keyword).
Airframe, Wireframe
Taro L. Saito
@xerial
wire is actually used in macwire for Scala
wvlet/airframe, then use inject[A] :)
Current Inject class, Session class is a bit hard to use. We need to rethink about it.
Especially life time management of objects (e.g., scope of singleton objects, where to define initialization/termination logic, how to manage dependencies of life time)
Taro L. Saito
@xerial
For example, if we create a thread pool, which makes several http connections (using some http client library), we should terminate the thread pool first, so that existing http connections can be safely closed.
Another huge injection library is http://weld.cdi-spec.org/
Macwire is for compile-time injection. We cannot use extended types when injecting objects
And also defining singleton is tricky
We need to create a scope for singleton explicitly in macfore. For example, trait { val a : A = singleton; trait { val useA = wire[A] } }
Kai Sasaki
@Lewuathe
I tried move wvlet-inject to airframe. but I'm not sure we should change the package name or not.
wvlet/airframe#1
And also could you give me admin permission to create PR from wvlet/airframe and integrate CircleCI?
Taro L. Saito
@xerial
@Lewuathe I'm now porting code from wvlet to airframe.
package name should be wvlet.inject since it's easy to remember
Main object to start using it will be Airframe.xxx
I'll give an admin permission to you
You are now the admin of wvlet orgnization
For sonatype release, I'll file a JIRA ticket to enable you to publish new versions to Maven central
Taro L. Saito
@xerial
Let me know your sonatype account name and preferred e-mail address
Taro L. Saito
@xerial
I though using wvlet.airframe might be ok. What user needs to know is just import wvlet.airframe._
Taro L. Saito
@xerial
I'm thinking using bind[A] for singleton injection, and inject[A] for instantiating objects every time
For example, class AirPlane { val w = bind[Wing]; val fuel = inject[Fuel] }
Taro L. Saito
@xerial
This is because injecting singleton is the majority of the use cases.
Taro L. Saito
@xerial
But I also feel managing singleton or not in user-code side is pointless. Let's use only bind[A]
Kai Sasaki
@Lewuathe
I'm now porting code from wvlet to airframe.
Sorry, I should have confirmed first.
My sonatype account is
name: lewuathe
Kai Sasaki
@Lewuathe
sonatype account is same.
Taro L. Saito
@xerial
Filed
Kai Sasaki
@Lewuathe
Thanks!
Taro L. Saito
@xerial
@Lewuathe Now you can release new versions with sbt release command
See also https://github.com/xerial/sbt-sonatype to configure sbt-sonatype plugin
Kai Sasaki
@Lewuathe
:smile:
Taro L. Saito
@xerial
Changed the purpose of the library from just a DI library to Libraries for Building Full-Fledged Scala Applications