-
Notifications
You must be signed in to change notification settings - Fork 0
[server] use custom parser #132
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR implements a custom RSS/Atom parser to replace the Rome library dependency. The implementation uses StAX XML parsing for RSS 2.0 and Atom 1.0 feeds with comprehensive test coverage comparing the custom parser against the existing Rome-based implementation.
- Custom parser with trait-based design supporting multiple feed formats
- StAX-based XML event parsing for efficient stream processing
- Comprehensive test suite with real feed examples and comparison tests
Reviewed changes
Copilot reviewed 11 out of 13 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| server/src/main/scala/ru/trett/rss/server/parser/Parser.scala | Main parser trait and factory object handling XML stream parsing and parser selection |
| server/src/main/scala/ru/trett/rss/server/parser/Rss_2_0_Parser.scala | RSS 2.0 feed parser implementation using StAX event reading |
| server/src/main/scala/ru/trett/rss/server/parser/Atom_1_0_Parser.scala | Atom 1.0 feed parser with RFC3339 date support and namespace handling |
| server/src/main/scala/ru/trett/rss/server/services/ChannelService.scala | Updated to use custom parser instead of Rome library |
| server/src/test/scala/ru/trett/rss/server/parser/ParserSpec.scala | Test suite with multiple feed format tests and parser comparison |
| build.sbt | Version bump and scala-xml dependency addition |
| server/src/test/resources/*.xml | Test feed data in RSS 2.0 and Atom 1.0 formats |
Files not reviewed (1)
- client/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 11 out of 13 changed files in this pull request and generated 4 comments.
Files not reviewed (1)
- client/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 11 out of 13 changed files in this pull request and generated 3 comments.
Files not reviewed (1)
- client/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
server/src/main/scala/ru/trett/rss/server/parser/Rss_2_0_Parser.scala
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
- Use IO.blocking/IO.interruptible for blocking XML operations - Properly manage InputStream lifecycle with Resource - Replace List with ListBuffer to avoid O(n²) complexity - Add error handling for resource cleanup
- Create ParserType enum with rootElement mapping - Remove root field from Parser trait and implementations - Replace list creation with enum-based lookup - Prevent creating parser list on every request - Use ParserType.fromRoot() for O(1) lookup
- Replace IO.interruptible with IO.blocking for short operations - IO.interruptible is for long-running operations that need interruption - Creating/closing XMLEventReader and findRootElement are fast - Use IO.blocking for proper thread pool semantics
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 11 out of 13 changed files in this pull request and generated 1 comment.
Files not reviewed (1)
- client/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.