You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[error] /Users/dwalend/projects/an/ONADemoScalaCSV/ScalaCSV/src/main/scala/activatenetworks/ona/LoadNodes.scala:82: value filter is not a member of resource.ManagedResource[com.googlecode.jcsv.reader.CSVReader[activatenetworks.tools.csvtable.CSVReaderCreator.CSVTableRow]]
CSVReader does implement Closable. It also implements Iterable, which is what I really want to think about.
Thanks for taking this up, Josh. That's exactly it.
It smells like a good place for higher kinded types. Even my spell checker balks at "kinded". ManagedResource needs to take something that's Closable, and still give back that something's API. Nasty puzzle.
I'm 18 months deeper into Scala, and have finally accepted just how easy it is to write my own CSV parser to match my data's quirks in this language.
Also I needed a good fifteen minutes to recall the bug. It's been a good 18 months.
I'm following the example on https://github.com/jsuereth/scala-arm/wiki/Basic-Usage , but with a jcsv com.googlecode.jcsv.reader.CSVReader ( from http://jcsv.googlecode.com/svn/trunk/apidocs/index.html ) . It didn't work as advertised with CSVReader and it took my writing this bug report to figure out why.
With
I get
[error] /Users/dwalend/projects/an/ONADemoScalaCSV/ScalaCSV/src/main/scala/activatenetworks/ona/LoadNodes.scala:82: value filter is not a member of resource.ManagedResource[com.googlecode.jcsv.reader.CSVReader[activatenetworks.tools.csvtable.CSVReaderCreator.CSVTableRow]]
CSVReader does implement Closable. It also implements Iterable, which is what I really want to think about.
compiles fine.
doesn't work either.
An example with Iterable would have saved me (and maybe others) some time.
Also, is for() the right name to use? It can't do everything that for() does with Iterable. Would with() be better? (Or did that ship already sail?)
Thanks,
Dave
The text was updated successfully, but these errors were encountered: