tdb-alcorn / chisel-formal

Other
23 stars 3 forks source link

Compilation failure: value foreach is not a member of java.util.stream.Stream[String] #2

Closed danielkasza closed 4 years ago

danielkasza commented 4 years ago

I cannot compile ae3a437bdbbbdeb6891c7d40ab14f78e106126f2.

Commands I used:

Result:

[error] /home/dkasza/projects/chisel-formal/src/main/scala/chisel3/formal/FormalSpec.scala:47:34: value foreach is not a member of java.util.stream.Stream[String]
[error]       for (line <- result.output.lines) {
[error]                                  ^
[error] /home/dkasza/projects/chisel-formal/src/main/scala/chisel3/formal/FormalSpec.scala:48:27: type mismatch;
[error]  found   : Array[Object]
[error]  required: Array[String]
[error] Note: Object >: String, but class Array is invariant in type T.
[error] You may wish to investigate a wildcard type such as `_ >: String`. (SLS 3.2.10)
[error]         checkLine(result, rtlLines, line)
[error]                           ^
[error] two errors found
[error] (Compile / compileIncremental) Compilation failed
[error] Total time: 3 s, completed Sep 16, 2020, 11:25:46 PM

I tried to build earlier revisions, but got similar errors.

Am I doing something wrong?

danielkasza commented 4 years ago

I think this is caused by scala/bug#11125 and can be fixed by using linesIterator.

danielkasza commented 4 years ago

With linesIterator, the example in the readme works.

Martoni commented 4 years ago

Have you got a patch for compile it with linesIterator ?

[edit]

Ok, found it. https://github.com/tdb-alcorn/chisel-formal/pull/6