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

Make the value of the class private #2614

Merged
merged 3 commits into from
Nov 16, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion binCompatTest/src/main/scala/catsBC/MimaExceptions.scala
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ object MimaExceptions {
cats.data.Kleisli.catsDataCommutativeFlatMapForKleisli[Option, Int],
cats.data.IRWST.catsDataStrongForIRWST[List, Int, Int, Int],
cats.data.OptionT.catsDataMonadErrorMonadForOptionT[List],
FunctionK.lift(headOption)
FunctionK.lift(headOption),
"blah".leftNec[Int],
List(Some(4), None).nested
)

}
5 changes: 4 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,10 @@ def mimaSettings(moduleName: String) =
exclude[DirectMissingMethodProblem]("cats.data.KleisliInstances1.catsDataCommutativeArrowForKleisli"),
exclude[DirectMissingMethodProblem]("cats.data.KleisliInstances4.catsDataCommutativeFlatMapForKleisli"),
exclude[DirectMissingMethodProblem]("cats.data.IRWSTInstances1.catsDataStrongForIRWST"),
exclude[DirectMissingMethodProblem]("cats.data.OptionTInstances1.catsDataMonadErrorMonadForOptionT")
exclude[DirectMissingMethodProblem]("cats.data.OptionTInstances1.catsDataMonadErrorMonadForOptionT"),
//These 2 things are `.value` on a Ops class (which shouldn't have ever been exposed) - See #2514 and #2613.
exclude[DirectMissingMethodProblem]("cats.syntax.EitherIdOpsBinCompat0.value"),
exclude[DirectMissingMethodProblem]("cats.syntax.NestedIdOps.value")
) ++ // Only compile-time abstractions (macros) allowed here
Seq(
exclude[IncompatibleMethTypeProblem]("cats.arrow.FunctionKMacros.lift"),
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/cats/syntax/either.scala
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ trait EitherSyntaxBinCompat0 {
new EitherIdOpsBinCompat0(a)
}

final class EitherIdOpsBinCompat0[A](val value: A) extends AnyVal {
final class EitherIdOpsBinCompat0[A](private val value: A) extends AnyVal {

/**
* Wrap a value to a left EitherNec
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/cats/syntax/nested.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ trait NestedSyntax {
new NestedIdOps[F, G, A](value)
}

final class NestedIdOps[F[_], G[_], A](private[syntax] val value: F[G[A]]) extends AnyVal {
final class NestedIdOps[F[_], G[_], A](private val value: F[G[A]]) extends AnyVal {

/**
* Wrap a value in `Nested`.
Expand Down