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

Fix Binding Instantiation of Escaped Numerical Bindings #565

Merged
merged 6 commits into from
Jan 3, 2025

Conversation

KetanReddy
Copy link
Member

@KetanReddy KetanReddy commented Dec 19, 2024

#533 fixed the parsing of bindings with escaped numbers however when the binding was being instantiated as a BindingInstance object leading zeroes were still being removed. This adds in the same logic to the BindingInstance class to ensure that throughout the lifecycle of a binding it stays appropriately repented.

Benchmark Results

Main

· Resolving binding: foo.bar                              1,597,269.03  0.0005  0.2365  0.0006  0.0006  0.0008  0.0009  0.0037  ±0.57%   798635   fastest
· Resolving binding: foo.pets.1.name                      1,002,678.46  0.0008  0.2766  0.0010  0.0010  0.0013  0.0015  0.0046  ±0.51%   501340
· Resolving binding: foo.pets.01.name                       995,352.92  0.0008  0.2838  0.0010  0.0010  0.0012  0.0013  0.0029  ±0.44%   497677
· Resolving binding: foo.pets['01'].name                    933,611.94  0.0009  1.1952  0.0011  0.0010  0.0013  0.0014  0.0029  ±0.74%   466838
· Resolving binding: foo.pets[01].name                    1,005,746.59  0.0008  0.1515  0.0010  0.0010  0.0013  0.0014  0.0030  ±0.35%   502874
· Resolving binding: foo.pets[name = "frodo"].type          675,635.29  0.0012  0.9911  0.0015  0.0015  0.0018  0.0020  0.0050  ±0.51%   337818
· Resolving binding: foo.pets["name" = "sprinkles"].type    539,532.33  0.0015  0.2100  0.0019  0.0018  0.0023  0.0024  0.0055  ±0.37%   269767   slowest

Branch

 · Resolving binding: foo.bar                              1,584,307.86  0.0005  0.2585  0.0006  0.0006  0.0009  0.0010  0.0035  ±0.62%   792154   fastest
 · Resolving binding: foo.pets.1.name                      1,002,825.98  0.0008  0.2929  0.0010  0.0010  0.0013  0.0015  0.0045  ±0.56%   501413
 · Resolving binding: foo.pets.01.name                       983,609.73  0.0008  0.2298  0.0010  0.0010  0.0013  0.0017  0.0050  ±0.49%   491805
 · Resolving binding: foo.pets['01'].name                    874,398.46  0.0009  0.4984  0.0011  0.0011  0.0015  0.0024  0.0129  ±0.68%   437200
 · Resolving binding: foo.pets[01].name                      984,208.46  0.0008  0.2711  0.0010  0.0010  0.0014  0.0019  0.0046  ±0.55%   492105
 · Resolving binding: foo.pets[name = "frodo"].type          647,042.61  0.0012  0.2428  0.0015  0.0015  0.0020  0.0025  0.0054  ±0.51%   323522
 · Resolving binding: foo.pets["name" = "sprinkles"].type    511,808.49  0.0016  0.3105  0.0020  0.0019  0.0026  0.0034  0.0070  ±0.58%   255905   slowest

There are also some minor fixes included in this:

  • Another fix to try and get next changelogs working again. Since a tag was created in the steps before it, the tag range that needs to be included in the changelog needs to be shifted back. Also the title was created as if it were a full release and not a pre-release
  • Bumping tsup

Change Type (required)

Indicate the type of change your pull request is:

  • patch
  • minor
  • major
  • N/A

Does your PR have any documentation updates?

  • Updated docs
  • No Update needed
  • Unable to update docs

Release Notes

Fixed instantiation of BindingInstances with escaped numerical segments

@KetanReddy KetanReddy added the patch Increment the patch version when merged label Dec 19, 2024
@KetanReddy KetanReddy self-assigned this Dec 19, 2024
@KetanReddy KetanReddy requested a review from a team December 19, 2024 21:05
Copy link

codecov bot commented Dec 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.70%. Comparing base (dc97970) to head (852e47f).
Report is 9 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #565      +/-   ##
==========================================
- Coverage   89.70%   89.70%   -0.01%     
==========================================
  Files         331      331              
  Lines       19794    19794              
  Branches     1949     1949              
==========================================
- Hits        17757    17756       -1     
- Misses       2023     2024       +1     
  Partials       14       14              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

rafbcampos
rafbcampos previously approved these changes Jan 3, 2025
@KetanReddy KetanReddy merged commit 19ff47d into main Jan 3, 2025
11 checks passed
@KetanReddy KetanReddy deleted the bugfix/quoted-bindings branch January 3, 2025 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch Increment the patch version when merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants