Skip to content

Fix issue #680 with encoding int-keyed maps. #681

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
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

herczegzsolt
Copy link

Hi!

I've created this pull request to address #680. I can confirm that it works for my use-case, but I'm not sure if it has any side-effects or what would be the best way to write tests for it.

If this need more work, i'll come back to it at a later date. Any guidance on the expected tests would be greatly appreciated in the meantime.

@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 50.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 77.85%. Comparing base (50b37c1) to head (0559ad4).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #681      +/-   ##
==========================================
- Coverage   77.87%   77.85%   -0.03%     
==========================================
  Files          22       22              
  Lines        7960     7965       +5     
==========================================
+ Hits         6199     6201       +2     
- Misses       1348     1350       +2     
- Partials      413      414       +1     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@herczegzsolt
Copy link
Author

I believe that the encoding of struct-keyed maps is also incorrect. For example:
https://go.dev/play/p/EyVVqlViyUN

I've created a fix for simple types that already implement ast.MapKeyNode, but i'm not sure what to do about others.

@shuheiktgw shuheiktgw linked an issue Apr 13, 2025 that may be closed by this pull request
@shuheiktgw shuheiktgw linked an issue Apr 13, 2025 that may be closed by this pull request
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.

Int map keys incorrectly marshaled as string
2 participants