Skip to content

Replace univocity-parsers with FastCSV #4339

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

Open
1 task
marcphilipp opened this issue Feb 25, 2025 · 12 comments
Open
1 task

Replace univocity-parsers with FastCSV #4339

marcphilipp opened this issue Feb 25, 2025 · 12 comments

Comments

@marcphilipp
Copy link
Member

Unfortunately, univocity-parsers is no longer maintained. While there's is a fork, it's future is unclear.

FastCSV has seen a lot of activity in recent months so we should evaluate if we use it as a replacement. There might be subtle differences how edge cases are handled but we should have good coverage for those in our test suite.

Deliverables

  • Implement @CsvSource and @CsvFileSource using FastCSV instead of univocity-parsers
@vdmitrienko
Copy link
Contributor

@marcphilipp can I take a stab?

@marcphilipp
Copy link
Member Author

@vdmitrienko Go for it! 🙂

@vdmitrienko
Copy link
Contributor

@marcphilipp it looks like we can't migrate to FastCSV at the moment - at least not to version 3.x, as it requires Java 11 or higher. Perhaps, we should put this on hold until we migrate to Java 17 #4246

FYI @osiegmar

@marcphilipp
Copy link
Member Author

@vdmitrienko Thanks for taking a closer look! Agreed, let's hold off on this until we start working on 6.0 later this year.

@osiegmar
Copy link

I suggest analyzing if any functionality is missing in FastCSV that JUnit requires. This would give me time to design and implement it, ensuring a smooth integration when JUnit 6 development begins.

@vdmitrienko
Copy link
Contributor

I suggest analyzing if any functionality is missing in FastCSV that JUnit requires. This would give me time to design and implement it, ensuring a smooth integration when JUnit 6 development begins.

@marcphilipp, I could give it a try with the JDK17 branch. WDYT?

@sormuras
Copy link
Member

Also an option: make it work with FastCSV 2.x and Jupiter 5.x on Java 8 first.

@marcphilipp
Copy link
Member Author

I could give it a try with the JDK17 branch. WDYT?

Good idea! But be prepared that we'll force push that one again at some point.

Also an option: make it work with FastCSV 2.x and Jupiter 5.x on Java 8 first.

I don't think that would be worth the effort but I leave it to @vdmitrienko to decide.

@vdmitrienko
Copy link
Contributor

Also an option: make it work with FastCSV 2.x and Jupiter 5.x on Java 8 first.

Thanks for the suggestion, @sormuras. I initially considered that as well, but since there may be breaking changes between FastCSV 2.x and 3.x, it might be easier to start directly with 3.x.

@bastien707
Copy link

Do you know any library that can manage fixed-width files as easily as Univocity Parser (using only annotations, no XML)? Since all FastCSV does not handle fixed-width file

@marcphilipp
Copy link
Member Author

Are you using that with @Csv{File}Source?

@bastien707
Copy link

Hum nope, finally I found BeanIO v3 which is compatible annotation only and can handle fixed-width files. The doc here : https://beanio.github.io/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants