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

Call .value outside of lambda #588

Merged
merged 1 commit into from
Jun 18, 2019
Merged

Call .value outside of lambda #588

merged 1 commit into from
Jun 18, 2019

Conversation

fthomas
Copy link
Member

@fthomas fthomas commented Jun 18, 2019

To prevent errors like this:

.sbt/1.0/plugins/StewardPlugin.scala:38:49: The evaluation of `scalaVersion` inside an anonymous function is prohibited.
[error]
[error] Problem: Task invocations inside anonymous functions are evaluated independently of whether the anonymous function is invoked or not.
[error]
[error] Solution:
[error]   1. Make `scalaVersion` evaluation explicit outside of the function body if you don't care about its evaluation.
[error]   2. Use a dynamic task to evaluate `scalaVersion` and pass that value as a parameter to an anonymous function.
[error]
[error]             CrossVersion(moduleId.crossVersion, scalaVersion.value, scalaBinaryVersion.value)
[error]                                                 ^

To prevent errors like this:
```
.sbt/1.0/plugins/StewardPlugin.scala:38:49: The evaluation of `scalaVersion` inside an anonymous function is prohibited.
[error]
[error] Problem: Task invocations inside anonymous functions are evaluated independently of whether the anonymous function is invoked or not.
[error]
[error] Solution:
[error]   1. Make `scalaVersion` evaluation explicit outside of the function body if you don't care about its evaluation.
[error]   2. Use a dynamic task to evaluate `scalaVersion` and pass that value as a parameter to an anonymous function.
[error]
[error]             CrossVersion(moduleId.crossVersion, scalaVersion.value, scalaBinaryVersion.value)
[error]                                                 ^
```
@codecov
Copy link

codecov bot commented Jun 18, 2019

Codecov Report

Merging #588 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #588   +/-   ##
=======================================
  Coverage   59.04%   59.04%           
=======================================
  Files          67       67           
  Lines         857      857           
  Branches       39       39           
=======================================
  Hits          506      506           
  Misses        351      351

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 288c35d...b5d81ba. Read the comment docs.

@fthomas fthomas merged commit bce2178 into master Jun 18, 2019
@fthomas fthomas deleted the topic/value-outside-lambda branch June 18, 2019 10:08
@fthomas fthomas added the bug Something isn't working label Jun 22, 2019
@fthomas fthomas added this to the 0.3.0 milestone Jun 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant