-
Notifications
You must be signed in to change notification settings - Fork 77
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
Upgrading JSON IO tests to the new API, and removing the deprecated API #2104
base: main
Are you sure you want to change the base?
Conversation
… tests to using the new. This triggers several hidden bugs in the "new" API
…y tuple yet. Towards fixing #2106
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2104 +/- ##
========================================
Coverage 49% 49%
+ Complexity 6336 6233 -103
========================================
Files 667 663 -4
Lines 59836 59177 -659
Branches 8692 8615 -77
========================================
- Hits 29718 29469 -249
+ Misses 27868 27480 -388
+ Partials 2250 2228 -22 ☔ View full report in Codecov by Sentry. |
See if this fixes the crashing surefire fork
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.
LGTM, I have a few small concerns, but I'm very happy to see a whole bunch of old code get cleaned up 👍🏼
@@ -96,8 +96,17 @@ dup([3, 1, 5, 3, 1, 7, 1, 2]); | |||
list[&T] dup(list[&T] lst) | |||
= ([] | (ix in it) ? it : it + [ix] | &T ix <- lst); | |||
|
|||
@deprecated{Use a list index instead} |
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.
why is it undeprecated? don't we want to reduce the API size?
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.
I received feedback that people want to keep this function. I was trying to make this PR have fewer warnings in the stdlib so that's why this snuck in there.
It's still strange to me that the declaration of a deprecated function leads to a warning on the declaration side btw. There is nothing wrong with a deprecated declaration. It's the uses which need a warning.
} | ||
else { | ||
throw new IOException("Dates as strings not yet implemented: " + format.get().toPattern()); | ||
try { | ||
com.ibm.icu.text.SimpleDateFormat sd = format.get(); |
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.
can we not use java time for this? since java8 it's been really a nice API, and I would love to reduce our dependency on icu for date time stuff.
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.
We could but this semantics has to remain consistent with the DateTime
module for now. When we move to java time, we move it all. There are so many subtleties in this stuff that I don't want to multiply the confusion.
src/org/rascalmpl/library/lang/rascal/tests/library/lang/json/JSONIOTests.rsc
Outdated
Show resolved
Hide resolved
I want to increase the test coverage a bit before merging this |
datetime
values by reusing features from theDateTime
modulelang::json::IO
and removed their respective implementation classes inlang/json/io/internal
node
values by encoding their name as a_name
field of the object.num
value
by normalizing the expected values to the defaults that are chosen when no more specific type is requestednum
,value
andnode