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

Scala Native support #214

Open
david-bouyssie opened this issue Jul 31, 2021 · 1 comment
Open

Scala Native support #214

david-bouyssie opened this issue Jul 31, 2021 · 1 comment

Comments

@david-bouyssie
Copy link

I would like to discuss here the possibility of building the library for Scala Native.
Do you see any clear obstacle?
Thanks.

@ex0ns
Copy link

ex0ns commented Mar 13, 2023

In case anyone is interested in this issue, I have started a draft on my fork (commit ex0ns@1c7ca2a)

The main issue is the usage of java file in the repository (LineReader and SourceLineReader in the java/com/github/totoshi/csv folder),

In the current state, the build for the JVM should be exactly the same as before, however the build for scala native fails with a

[error] /home/ex0ns/Projects/scala-csv/src/main/scala/com/github/tototoshi/csv/CSVReader.scala:24:52: not found: type LineReader
[error] class CSVReader protected (private val lineReader: LineReader)(implicit format: CSVFormat) extends Closeable with CSVReaderCompat {
[error]                                                    ^
[error] /home/ex0ns/Projects/scala-csv/src/main/scala/com/github/tototoshi/csv/CSVReader.scala:31:31: not found: type LineReader
[error]     def parseNext(lineReader: LineReader, leftOver: Option[String] = None): Option[List[String]] = {
[error]                               ^
[error] /home/ex0ns/Projects/scala-csv/src/main/scala/com/github/tototoshi/csv/CSVReader.scala:118:87: not found: type SourceLineReader
[error]   def open(source: Source)(implicit format: CSVFormat): CSVReader = new CSVReader(new SourceLineReader(source))(format)
[error]                                                                                       ^
[error] /home/ex0ns/Projects/scala-csv/src/main/scala/com/github/tototoshi/csv/CSVReader.scala:120:87: not found: type ReaderLineReader
[error]   def open(reader: Reader)(implicit format: CSVFormat): CSVReader = new CSVReader(new ReaderLineReader(reader))(format)
[error]                                                                                       ^
[error] four errors found
[error] (scala-csvNative / Compile / compileIncremental) Compilation failed
[error] Total time: 0 s, completed Mar 13, 2023 11:06:22 PM

I don't really know why we have java file in this repository ? We may be able to re-implement them in Scala for scala-native (keeping the original java file for the JVM only).

@tototoshi could you tell us what is the reason behind those java file ?

Thanks

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

No branches or pull requests

2 participants