-
Notifications
You must be signed in to change notification settings - Fork 245
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(dontet): iso-8601 date strings get turned into DateTime #2058
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RomainMuller
added
bug
This issue is a bug.
language/dotnet
Related to .NET bindings (C#, F#, ...)
effort/small
Small work item – less than a day of effort
p1
pr/do-not-merge
This PR should not be merged at this time.
module/runtime
Issues affecting the `jsii-runtime`
contribution/core
This is a PR that came from AWS.
labels
Sep 29, 2020
RomainMuller
removed
the
pr/do-not-merge
This PR should not be merged at this time.
label
Sep 29, 2020
When a ISO-8601-encoded date is passed from JavaScript to the .NET app, the JSON deserializer would interpret that as a `DateTime` instead of passing the string un-touched. This is a problem, since the jsii kernel protocol has a dedicated wrapper key for DateTime values (`$jsii$date`). This PR adds a compliance test around this particular scenario, and disabled `DateTime` handling from the standard deserializer (the wrapped values are still processed correctly). > This PR also changes the way the .NET test package generates the > tested libraries (`jsii-calc` & dependencies) so that instead of > generating NuGet packages, it only generates C# projects. This makes > the experience of debugging the tests **much** nicer, and reduces the > likelihood of cached build artifacts getting in the way. This bug was identified in aws/aws-cdk#10513
RomainMuller
force-pushed
the
rmuller/dotnet-date-callback
branch
from
September 29, 2020 09:37
f337b15
to
f73c6f8
Compare
rix0rrr
approved these changes
Sep 29, 2020
eladb
previously requested changes
Sep 29, 2020
Co-authored-by: Elad Ben-Israel <benisrae@amazon.com>
…to rmuller/dotnet-date-callback
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
This issue is a bug.
contribution/core
This is a PR that came from AWS.
effort/small
Small work item – less than a day of effort
language/dotnet
Related to .NET bindings (C#, F#, ...)
module/runtime
Issues affecting the `jsii-runtime`
p1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When a ISO-8601-encoded date is passed from JavaScript to the .NET app,
the JSON deserializer would interpret that as a
DateTime
instead ofpassing the string un-touched. This is a problem, since the jsii kernel
protocol has a dedicated wrapper key for DateTime values (
$jsii$date
).This PR adds a compliance test around this particular scenario, and
disabled
DateTime
handling from the standard deserializer (the wrappedvalues are still processed correctly).
Fixes aws/aws-cdk#10513
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.