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

handle nils correctly in ParamExpander #172

Merged

Conversation

mimir-d
Copy link
Member

@mimir-d mimir-d commented May 9, 2024

  • previously, for types that can be nil (specifically slice, map; interface and pointer are correct), a new value of backing type was created instead of making a new nil
  • this is incorrect because it affects the structure of the object; more specifically the failure observed was with a struct having a field of type []string. Instead of keeping a []string(nil) here, this would transform into an empty slice []string{}

@mimir-d mimir-d requested a review from xaionaro May 9, 2024 14:27
xaionaro
xaionaro previously approved these changes May 9, 2024
@mimir-d mimir-d changed the base branch from main to develop May 9, 2024 20:11
@mimir-d mimir-d dismissed xaionaro’s stale review May 9, 2024 20:11

The base branch was changed.

@mimir-d mimir-d force-pushed the bugfix/handle_nil_in_paramexpander branch from 87f3af4 to 7891bf0 Compare May 9, 2024 20:42
- previously, for types that can be nil (specifically slice, map;
  interface and pointer are correct), a new value of backing type
  was created instead of making a new nil
- this is incorrect because it affects the structure of the object; more
  specifically the failure observed was with a struct having a field of
  type `[]string`. Instead of keeping a `[]string(nil)` here, this would
  transform into an empty slice `[]string{}`

Signed-off-by: mimir-d <mimir-d@users.noreply.github.com>
@mimir-d mimir-d force-pushed the bugfix/handle_nil_in_paramexpander branch from 7891bf0 to d494b08 Compare May 9, 2024 21:06
@mimir-d
Copy link
Member Author

mimir-d commented May 9, 2024

this was previously approved; im merging it

@mimir-d mimir-d merged commit 1b1abe5 into linuxboot:develop May 9, 2024
3 checks passed
@mimir-d mimir-d deleted the bugfix/handle_nil_in_paramexpander branch May 9, 2024 21:25
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.

2 participants