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 Stringified converters #7965

Merged
merged 1 commit into from Nov 10, 2023
Merged

Fix Stringified converters #7965

merged 1 commit into from Nov 10, 2023

Conversation

flobernd
Copy link
Member

@flobernd flobernd commented Oct 5, 2023

Fix Stringified converters to allow them being used on non-nullable types.

As, for example, Nullable<int> and int are distinct types, STJ refused to work with the StringifiedInt<int?> converter if used on a simple int property.

STJ does not invoke custom converters for null values unless the converter opts-in by returning true in the HandleNull method. As we don't do this, we don't have to care about null in the converter itself.

Handling e.g. just int instead of int? in the stringified converter, allows us to annotate int and int? properties correctly without having to introduce another converter type.

Closes #7870

@flobernd flobernd added 8.x Relates to 8.x client version backport 8.10 labels Nov 10, 2023
@flobernd flobernd merged commit fc76ed7 into main Nov 10, 2023
24 of 25 checks passed
@flobernd flobernd deleted the fix-stringified-converters branch November 10, 2023 09:23
github-actions bot pushed a commit that referenced this pull request Nov 10, 2023
github-actions bot pushed a commit that referenced this pull request Nov 10, 2023
flobernd pushed a commit that referenced this pull request Nov 10, 2023
flobernd pushed a commit that referenced this pull request Nov 10, 2023
Copy link
Contributor

The backport to serverless failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-serverless serverless
# Navigate to the new working tree
cd .worktrees/backport-serverless
# Create a new branch
git switch --create backport-7965-to-serverless
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick --mainline 1 fc76ed7f4703ed81cc846bd59e6338bbebf37e7e
# Push it to GitHub
git push --set-upstream origin backport-7965-to-serverless
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-serverless

Then, create a pull request where the base branch is serverless and the compare/head branch is backport-7965-to-serverless.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.x Relates to 8.x client version backport serverless
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deserialization error for filter elision and tokenizer path_hierarchy
1 participant