Skip to content

Adopt sbt-typelevel#98

Merged
Baccata merged 3 commits intotypelevel:mainfrom
armanbilge:topic/sbt-typelevel
Nov 17, 2022
Merged

Adopt sbt-typelevel#98
Baccata merged 3 commits intotypelevel:mainfrom
armanbilge:topic/sbt-typelevel

Conversation

@armanbilge
Copy link
Copy Markdown
Member

No description provided.

Comment on lines +52 to +54
tlFatalWarnings := {
tlFatalWarnings.value && !tlIsScala3.value
},
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

@armanbilge armanbilge marked this pull request as ready for review November 17, 2022 16:23
Copy link
Copy Markdown
Collaborator

@Baccata Baccata left a comment

Choose a reason for hiding this comment

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

Thanks for this !

@rssh
Copy link
Copy Markdown
Contributor

rssh commented Nov 19, 2022

Warning can be reenabled after #99

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

Successfully merging this pull request may close these issues.

3 participants