Skip to content

Commit

Permalink
change package name
Browse files Browse the repository at this point in the history
  • Loading branch information
mbore committed Oct 21, 2021
1 parent 2bb2a00 commit 53cdea2
Show file tree
Hide file tree
Showing 23 changed files with 47 additions and 22 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.softwaremill.macwire.auto.catssupport
package com.softwaremill.macwire.autocats

import scala.reflect.macros.blackbox
import cats.effect.{IO, Resource => CatsResource}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.softwaremill.macwire.auto
package com.softwaremill.macwire

import cats.effect._

package object catssupport {
package object autocats {
def autowire[T](dependencies: Any*): Resource[IO, T] = macro MacwireCatsEffectMacros.autowire_impl[T]
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import com.softwaremill.macwire.auto.catssupport._
import com.softwaremill.macwire.autocats._

#include commonSimpleClasses
import cats.effect._
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import com.softwaremill.macwire.auto.catssupport._
import com.softwaremill.macwire.autocats._

#include commonSimpleClasses
import cats.effect._
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import com.softwaremill.macwire.auto.catssupport._
import com.softwaremill.macwire.autocats._

#include commonSimpleClasses
import cats.effect._
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import com.softwaremill.macwire.auto.catssupport._
import com.softwaremill.macwire.autocats._

#include commonSimpleClasses
import cats.effect._
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import com.softwaremill.macwire.auto.catssupport._
import com.softwaremill.macwire.autocats._

#include commonSimpleClasses
import cats.effect._
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import com.softwaremill.macwire.auto.catssupport._
import com.softwaremill.macwire.autocats._

#include commonSimpleClasses
import cats.effect._
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import com.softwaremill.macwire.auto.catssupport._
import com.softwaremill.macwire.autocats._

#include commonSimpleClasses
import cats.effect._
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import com.softwaremill.macwire.auto.catssupport._
import com.softwaremill.macwire.autocats._
import cats.effect._

class B(s: String)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import com.softwaremill.macwire.auto.catssupport._
import com.softwaremill.macwire.autocats._
import cats.effect._

class A(s: String)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import com.softwaremill.macwire.auto.catssupport._
import com.softwaremill.macwire.autocats._

import cats.effect._

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import com.softwaremill.macwire.auto.catssupport._
import com.softwaremill.macwire.autocats._

#include commonSimpleClasses
import cats.effect._
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import com.softwaremill.macwire.auto.catssupport._
import com.softwaremill.macwire.autocats._

#include commonSimpleClasses
import cats.effect._
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import com.softwaremill.macwire.auto.catssupport._
import com.softwaremill.macwire.autocats._

#include commonSimpleClasses
import cats.effect._
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import com.softwaremill.macwire.auto.catssupport._
import com.softwaremill.macwire.autocats._
import cats.effect._

object Test {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import com.softwaremill.macwire.auto.catssupport._
import com.softwaremill.macwire.autocats._

import cats.effect._

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import cats.effect._
import com.softwaremill.tagging._
import com.softwaremill.macwire.auto.catssupport._
import com.softwaremill.macwire.autocats._

class Cache {
val state = scala.collection.mutable.HashMap.empty[String, String]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import com.softwaremill.macwire.autocats._

#include commonSimpleClasses
import cats.effect._


val created = scala.collection.mutable.Set[String]()

object Test {
def theA(): Resource[IO, A] = { created.add("a"); Resource.pure(A()) }
def theB(b: A): Resource[IO, B] = { created.add("b"); Resource.pure(B()) }
val theC: Resource[IO, C] = autowire[C](theA _, theB _)
}

val theC: C = {
import cats.effect.unsafe.implicits.global
Test.theC.allocated.unsafeRunSync()._1
}

require(theC.a != null)
require(theC.b != null)

require(created.size == 2)
require(created.contains("a"))
require(created.contains("B"))
Empty file.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import com.softwaremill.macwire.auto.catssupport._
import com.softwaremill.macwire.autocats._

#include commonSimpleClasses
import cats.effect._
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import com.softwaremill.macwire.auto.catssupport._
import com.softwaremill.macwire.autocats._

#include commonSimpleClasses
import cats.effect._
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.softwaremill.macwire.auto.catssupport
package com.softwaremill.macwire.autocats

import com.softwaremill.macwire.CompileTestsSupport

Expand Down

0 comments on commit 53cdea2

Please sign in to comment.