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

Create message-kind-specific parse methods and remove circular dependency #224

Merged
merged 2 commits into from
Apr 1, 2024

Conversation

diehuxx
Copy link

@diehuxx diehuxx commented Mar 30, 2024

  • Create specific message parsers e.g. Rfq.parse() which will ensure the payload is an RFQ message and can be easily extended to do RFQ-specific validation
  • Move Message.parse() into Parser.parseMessage() because Message.parse() caused Message to depend on its subclasses, which is a violation of OOP best practices and constitutes a circular dependency.

@codecov-commenter
Copy link

codecov-commenter commented Mar 30, 2024

Codecov Report

Merging #224 (16aabda) into main (bd505a5) will increase coverage by 0.72%.
Report is 3 commits behind head on main.
The diff coverage is 92.04%.

❗ Current head 16aabda differs from pull request most recent head dae6bb2. Consider uploading reports for the commit dae6bb2 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #224      +/-   ##
==========================================
+ Coverage   79.39%   80.11%   +0.72%     
==========================================
  Files          35       36       +1     
  Lines         820      875      +55     
  Branches       75       82       +7     
==========================================
+ Hits          651      701      +50     
- Misses        133      136       +3     
- Partials       36       38       +2     
Components Coverage Δ
protocol 88.47% <91.66%> (+0.45%) ⬆️
httpclient 80.82% <100.00%> (ø)

@diehuxx diehuxx merged commit 4804128 into main Apr 1, 2024
2 of 3 checks passed
@diehuxx diehuxx deleted the parser branch April 1, 2024 02:06
diehuxx pushed a commit that referenced this pull request Apr 1, 2024
* main:
  Create message-kind-specific parse methods and remove circular dependency (#224)
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

Successfully merging this pull request may close these issues.

4 participants