-
Notifications
You must be signed in to change notification settings - Fork 109
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: Early return identifier fields if view matches. #154
Conversation
Before this we were incorrectly adding 'sorted fields' to the identifier fields. Sorted fields would include all fields and associations not scoped to a specific view. Now the correct behavior is that if view == :identifier, then only the identifier fields will be returned.
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.
Looks good to me, this will be merged into: https://github.com/procore/blueprinter/tree/1.0.0-rc
which we will use to accumulate our breaking changes for 1.0.0 version release.
Would this be a bugfix rather than a breaking change? It seems to me that if I specify |
@philipqnguyen It's certainly a bug fix, but we were thinking this may be a breaking bug fix as we cannot guarantee that any users are not referencing identifier view fields exposed as part of the bug. |
Then would every bugfix be breaking? Since we cannot guarantee that people weren't using a bugged feature? |
I agree with @philipqnguyen that this is a bug fix, and not a breaking change. I can't imagine anyone rightfully running into this bug and relying on it. |
Discussed more offline, we determined that this is a bugfix, and not a |
Changed the branch, I will resolve conflicts. |
Before this when we passed in
view: :identifier
, we were incorrectly addingsorted fields
to the identifier fields. Sorted fields would include all fields and associations not scoped to a specific view.The expected behavior is that if
view == :identifier
, then only the identifier fields will be returned.Thus,
vs