sbt / sbt/website

Type mismatch in Task Graph examples

Open
#501 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug help wanted
Dominant language
Scala
Stars
73
Forks
351
Avg merge
5h 21m
Merged PRs (30d)
9

Description

The Task Graph page http://www.scala-sbt.org/1.x/docs/Task-Graph.html contains three examples containing the expression ur.allConfigurations.take(3) which all seem broken:

$ cat build.sbt 
scalacOptions := {
  val ur = update.value  // update task happens-before scalacOptions
  val x = clean.value    // clean task happens-before scalacOptions
  // ---- scalacOptions begins here ----
  ur.allConfigurations.take(3)
}

$ sbt 
[info] Updated file /home/kelemen/temp/sbt-started/project/build.properties: set sbt.version to 1.0.2
[info] Loading project definition from /home/kelemen/temp/sbt-started/project
[info] Updating {file:/home/kelemen/temp/sbt-started/project/}sbt-started-build...
[info] Done updating.
/home/kelemen/temp/sbt-started/build.sbt:5: error: type mismatch;
 found   : scala.collection.immutable.Vector[sbt.librarymanagement.ConfigRef]
 required: Seq[String]
  ur.allConfigurations.take(3)
                           ^
[error] Type error in expression
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? 

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open the Task Graph page and locate the three examples containing ur.allConfigurations.take(3). Check the expression's current type against the surrounding scalacOptions setting and identify the intended example value. Update all three examples so they are type-correct, then verify the shown build succeeds with sbt.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.