Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

acyclic.skipped not working with chained packages #27

Open
jibbers42 opened this issue Apr 19, 2018 · 0 comments
Open

acyclic.skipped not working with chained packages #27

jibbers42 opened this issue Apr 19, 2018 · 0 comments

Comments

@jibbers42
Copy link

A.scala:

package skip
package a

import acyclic.skipped

trait A {
  val b: B
}

B.scala:

package skip
package a

import acyclic.skipped

trait B {
  val a: A
}

build.sbt:

organization in ThisBuild := "skip"
version in ThisBuild := "1.0-SNAPSHOT"
scalaVersion in ThisBuild := "2.12.5"

val acyclicVersion = "0.1.7"
val acyclicDep = "com.lihaoyi" %% "acyclic" % acyclicVersion % Provided
lazy val acyclicCompilerPlugin = addCompilerPlugin("com.lihaoyi" %% "acyclic" % acyclicVersion)

autoCompilerPlugins in ThisBuild := true

lazy val `acyclic` = (project in file("."))
  .settings(settings)

lazy val settings = Seq(
  libraryDependencies ++= Seq(
    acyclicDep
  ),
  acyclicCompilerPlugin
)

scalacOptions in ThisBuild ++= Seq(
  "-P:acyclic:force",                  // Run cyclic dependencies check on all files
)

If you change

package skip
package a

to
package skip.a
in both files, then it compiles fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant