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

Adopt sbt-typelevel #98

Merged
merged 3 commits into from
Nov 17, 2022
Merged
Changes from 1 commit
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: 4 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ lazy val core = crossProject(JVMPlatform, JSPlatform, NativePlatform)
Seq("-Xasync")
},

tlFatalWarnings := {
tlFatalWarnings.value && !tlIsScala3.value
},
Comment on lines +52 to +54
Copy link
Member Author

Choose a reason for hiding this comment

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

idk if it's legit or not, would be ideal to fix this and re-enable fatals.

[warn] -- Warning: /workspace/cats-effect-cps/core/shared/src/test/scala/cats/effect/cps/AsyncAwaitSpec.scala:217:25 
[warn] 217 |        async[OptionTIO](optionT.await).value.await
[warn]     |                         ^^^^^^^^^^^^^
[warn]     |                         unused variable creation, effect may be lost
[warn]     |---------------------------------------------------------------------------
[warn]     |Inline stack trace
[warn]     |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[warn]     |This location contains code that was inlined from AsyncAwaitSpec.scala:217
[warn]      ---------------------------------------------------------------------------
[warn] one warning found

Copy link
Collaborator

Choose a reason for hiding this comment

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

As far as I can tell that one is out of our direct control, most likely happening during the macro expansion carried out by dotty-cps-async.

Maybe @rssh has an idea ? Ruslan, if you lurk, the repro steps are, once this branch is checked out and SBT is started :

> ++ 3.2.1 
> coreJVM/test 

That being said, I don't think this is an impediment to the merging of this PR

Copy link
Contributor

Choose a reason for hiding this comment

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

You can define

implicit val printCode = cps.macros.flags.PrintCode

to see, what's going on

Copy link
Contributor

Choose a reason for hiding this comment

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

The problem that in internal async we materialize monad in var, which is not used (and issue warning about this) because the result is await which translated to argument.


libraryDependencies ++= Seq(
"org.typelevel" %%% "cats-effect-std" % CatsEffectVersion,

Expand Down