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

Rename EitherT.liftT to EitherT.liftF #1947

Merged
merged 6 commits into from
Oct 10, 2017
Merged

Conversation

aeons
Copy link
Member

@aeons aeons commented Oct 3, 2017

To be consistent with OptionT.liftF.

Fixes #1945

@kailuowang
Copy link
Contributor

I like the change. I wonder if we should help migration by providing a deprecated alias, or scalafix?

@aeons
Copy link
Member Author

aeons commented Oct 3, 2017

I think I have a scalafix rule implemented now, but how do I make it run against my locally build cats?

@LukaJCB
Copy link
Member

LukaJCB commented Oct 3, 2017

You go into the scalafix folder and run the tests there :)

@kailuowang
Copy link
Contributor

I loved the scalafix, but can we have the alias as well, it's very cheap.

@codecov-io
Copy link

codecov-io commented Oct 3, 2017

Codecov Report

Merging #1947 into master will increase coverage by 0.14%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1947      +/-   ##
==========================================
+ Coverage   95.57%   95.72%   +0.14%     
==========================================
  Files         248      278      +30     
  Lines        4454     4860     +406     
  Branches      117      125       +8     
==========================================
+ Hits         4257     4652     +395     
- Misses        197      208      +11
Impacted Files Coverage Δ
core/src/main/scala/cats/ApplicativeError.scala 88.23% <ø> (ø) ⬆️
core/src/main/scala/cats/data/EitherT.scala 97.56% <100%> (-0.8%) ⬇️
core/src/main/scala/cats/syntax/flatMap.scala 75% <0%> (-25%) ⬇️
kernel/src/main/scala/cats/kernel/Order.scala 81.08% <0%> (-5.41%) ⬇️
core/src/main/scala/cats/Apply.scala 84.21% <0%> (-4.68%) ⬇️
laws/src/main/scala/cats/laws/discipline/Eq.scala 90.9% <0%> (-2.2%) ⬇️
...in/scala/cats/laws/discipline/CartesianTests.scala 100% <0%> (ø) ⬆️
...el/src/main/scala/cats/kernel/instances/unit.scala 100% <0%> (ø) ⬆️
...rc/main/scala/cats/kernel/instances/function.scala 100% <0%> (ø) ⬆️
...nel/src/main/scala/cats/kernel/instances/int.scala 100% <0%> (ø) ⬆️
... and 65 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0997f43...fa520d7. Read the comment docs.

LukaJCB
LukaJCB previously approved these changes Oct 3, 2017
* res1: cats.data.EitherT[Option,Nothing,Int] = EitherT(None)
* }}}
*/
final def liftF[F[_], A, B](fb: F[B])(implicit F: Functor[F]): EitherT[F, A, B] = right(fb)

@deprecated("Use EitherT.liftF.", "1.0.0-MF")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this version be "1.0.0-RC1"?

@kailuowang
Copy link
Contributor

All looking good. The scalafix should probably go to a different folder altogether. The current set of rules v1_0_0 is for migration from 0.9.0 to 1.0.0-MF, the one you add is from 1.0.0-MF to 1.0.0-RC. We can't merge this as is since it will cause problems when people trying to migrate to 1.0.0-MF. We need a new set of rules for such migration, maybe we can name it v1_0_0_RC1? cc @gabro

@aeons
Copy link
Member Author

aeons commented Oct 3, 2017

Aha, I just mimicked what was there already. Will take a look at fixing it tomorrow.

@kailuowang
Copy link
Contributor

sorry @aeons it was supposed to be a super straightforward PR.

@aeons
Copy link
Member Author

aeons commented Oct 3, 2017

No problem, I don't mind trying out scalafix :)

Copy link
Contributor

@gabro gabro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 for the scalafix part.

If you only want to run the rules that apply to version `1.0.0-MF` run

```sh
sbt scalafix github:typelevel/cats/v1.0.0?sha=c131fe4
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 1.0.0 update on master has not much practical use now since it's not released, how about we reorder the paragraphs to this?

to run the rules that apply to version 1.0.0-MF run

sbt scalafix github:typelevel/cats/v1.0.0?sha=c131fe4

to run all rules that apply to current 1.0.0-SNAPSHOT

sbt scalafix github:typelevel/cats/v1.0.0

We can update it again once we release 1.0.0-RC1

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good

Copy link
Contributor

@kailuowang kailuowang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks very much! Sorry for dragging it for this long for a straightforward change.

@LukaJCB
Copy link
Member

LukaJCB commented Oct 8, 2017

Thanks @aeons :) This is ready to be merged as soon as we merge #1937 I think 👍

@LukaJCB LukaJCB merged commit 5f19814 into typelevel:master Oct 10, 2017
@aeons aeons deleted the eithert-liftf branch October 10, 2017 11:16
@kailuowang kailuowang added this to the 1.0.0-RC1 milestone Oct 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants