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

Build out partial record functionality, property bag construction, and with methods #3955

Merged
merged 4 commits into from
Aug 24, 2024

Conversation

nekevss
Copy link
Member

@nekevss nekevss commented Aug 16, 2024

This PR is related to the ongoing work for temporal, specifically in relation to the with methods and partial records.

It changes the following:

  • Implements map on JsValue
  • Implements to_partial_date_record and to_partial_time_record
  • Builds out the with methods on Time and Date along with the property bags portions of to_date and to_time abstract methods

I totally blanked on making the fields of PartialDateTime public 😅 So that will hopefully still be coming after a patch I submitted is merged.

Copy link

github-actions bot commented Aug 16, 2024

Test262 conformance changes

Test result main count PR count difference
Total 48,476 48,476 0
Passed 43,446 43,582 +136
Ignored 1,507 1,507 0
Failed 3,523 3,387 -136
Panics 0 0 0
Conformance 89.62% 89.90% +0.28%
Fixed tests (136):
test/built-ins/Temporal/PlainTime/from/overflow-undefined.js (previously Failed)
test/built-ins/Temporal/PlainTime/from/argument-object-leap-second.js (previously Failed)
test/built-ins/Temporal/PlainTime/from/options-object.js (previously Failed)
test/built-ins/Temporal/PlainTime/from/overflow-reject.js (previously Failed)
test/built-ins/Temporal/PlainTime/from/overflow-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainTime/from/overflow-constrain.js (previously Failed)
test/built-ins/Temporal/PlainTime/from/options-undefined.js (previously Failed)
test/built-ins/Temporal/PlainTime/prototype/add/argument-string.js (previously Failed)
test/built-ins/Temporal/PlainTime/prototype/with/overflow-undefined.js (previously Failed)
test/built-ins/Temporal/PlainTime/prototype/with/subclassing-ignored.js (previously Failed)
test/built-ins/Temporal/PlainTime/prototype/with/branding.js (previously Failed)
test/built-ins/Temporal/PlainTime/prototype/with/options-object.js (previously Failed)
test/built-ins/Temporal/PlainTime/prototype/with/copy-properties-not-undefined.js (previously Failed)
test/built-ins/Temporal/PlainTime/prototype/with/overflow-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainTime/prototype/with/name.js (previously Failed)
test/built-ins/Temporal/PlainTime/prototype/with/overflow-invalid-string.js (previously Failed)
test/built-ins/Temporal/PlainTime/prototype/with/not-a-constructor.js (previously Failed)
test/built-ins/Temporal/PlainTime/prototype/with/options-undefined.js (previously Failed)
test/built-ins/Temporal/PlainTime/prototype/with/prop-desc.js (previously Failed)
test/built-ins/Temporal/PlainTime/prototype/with/builtin.js (previously Failed)
test/built-ins/Temporal/PlainTime/prototype/with/length.js (previously Failed)
test/built-ins/Temporal/PlainTime/prototype/with/basic.js (previously Failed)
test/built-ins/Temporal/PlainTime/prototype/subtract/argument-string.js (previously Failed)
test/built-ins/Temporal/PlainDate/from/argument-object-invalid.js (previously Failed)
test/built-ins/Temporal/PlainDate/from/argument-propertybag-calendar-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainDate/from/with-year-monthCode-day.js (previously Failed)
test/built-ins/Temporal/PlainDate/from/overflow-undefined.js (previously Failed)
test/built-ins/Temporal/PlainDate/from/argument-propertybag-calendar-number.js (previously Failed)
test/built-ins/Temporal/PlainDate/from/argument-leap-second.js (previously Failed)
test/built-ins/Temporal/PlainDate/from/argument-propertybag-calendar-string.js (previously Failed)
test/built-ins/Temporal/PlainDate/from/options-object.js (previously Failed)
test/built-ins/Temporal/PlainDate/from/argument-propertybag-calendar-year-zero.js (previously Failed)
test/built-ins/Temporal/PlainDate/from/argument-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainDate/from/argument-propertybag-calendar.js (previously Failed)
test/built-ins/Temporal/PlainDate/from/with-year-month-day.js (previously Failed)
test/built-ins/Temporal/PlainDate/from/one-of-era-erayear-undefined.js (previously Failed)
test/built-ins/Temporal/PlainDate/from/with-year-monthCode-day-need-constrain.js (previously Failed)
test/built-ins/Temporal/PlainDate/from/options-undefined.js (previously Failed)
test/built-ins/Temporal/PlainDate/from/argument-object-valid.js (previously Failed)
test/built-ins/Temporal/PlainDate/from/with-year-month-day-need-constrain.js (previously Failed)
test/built-ins/Temporal/PlainDate/from/limits.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/since/argument-propertybag-calendar-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/since/argument-propertybag-calendar-number.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/since/argument-leap-second.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/since/argument-propertybag-calendar-string.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/since/argument-propertybag-calendar-year-zero.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/since/argument-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/since/basic.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/until/argument-propertybag-calendar-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/until/argument-propertybag-calendar-number.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/until/argument-leap-second.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/until/argument-propertybag-calendar-string.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/until/argument-propertybag-calendar-year-zero.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/until/argument-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/until/basic.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/add/argument-string.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/toPlainDateTime/argument-object.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/with/overflow-undefined.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/with/subclassing-ignored.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/with/branding.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/with/options-object.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/with/options-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/with/copy-properties-not-undefined.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/with/overflow-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/with/overflow-invalid-string.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/with/options-undefined.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/with/basic.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/equals/argument-object-invalid.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/equals/argument-propertybag-calendar-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/equals/argument-propertybag-calendar-number.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/equals/argument-leap-second.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/equals/argument-propertybag-calendar-string.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/equals/argument-propertybag-calendar-year-zero.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/equals/argument-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/subtract/argument-string.js (previously Failed)
test/built-ins/Temporal/PlainDate/compare/argument-object.js (previously Failed)
test/built-ins/Temporal/PlainDate/compare/argument-propertybag-calendar-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainDate/compare/argument-propertybag-calendar-number.js (previously Failed)
test/built-ins/Temporal/PlainDate/compare/argument-propertybag-calendar-string.js (previously Failed)
test/built-ins/Temporal/PlainDate/compare/argument-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainDate/compare/leap-second.js (previously Failed)
test/built-ins/Temporal/Duration/prototype/round/relativeto-propertybag-calendar-wrong-type.js (previously Failed)
test/built-ins/Temporal/Duration/prototype/round/relativeto-propertybag-no-time-units.js (previously Failed)
test/built-ins/Temporal/Duration/prototype/round/relativeto-leap-second.js (previously Failed)
test/built-ins/Temporal/Duration/prototype/round/relativeto-wrong-type.js (previously Failed)
test/built-ins/Temporal/Duration/prototype/round/relativeto-propertybag-calendar-number.js (previously Failed)
test/built-ins/Temporal/Duration/prototype/round/relativeto-propertybag-timezone-string.js (previously Failed)
test/built-ins/Temporal/Duration/prototype/total/relativeto-propertybag-calendar-wrong-type.js (previously Failed)
test/built-ins/Temporal/Duration/prototype/total/relativeto-wrong-type.js (previously Failed)
test/built-ins/Temporal/Duration/prototype/total/relativeto-propertybag-calendar-number.js (previously Failed)
test/built-ins/Temporal/Duration/prototype/total/relativeto-propertybag-timezone-string-year-zero.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/from/argument-object.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/from/argument-propertybag-calendar-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/from/overflow-undefined.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/from/argument-propertybag-calendar-number.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/from/argument-propertybag-calendar-string.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/from/options-object.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/from/overflow-reject.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/from/overflow-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/from/argument-object-month.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/from/options-undefined.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/from/overflow-default-constrain.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/since/argument-propertybag-calendar-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/since/argument-propertybag-calendar-number.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/since/argument-propertybag-calendar-string.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/until/argument-object.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/until/argument-propertybag-calendar-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/until/argument-propertybag-calendar-number.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/until/argument-propertybag-calendar-string.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/add/argument-string.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/with/argument-object-insufficient-data.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/with/overflow-undefined.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/with/month-and-monthcode-must-agree.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/with/subclassing-ignored.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/with/branding.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/with/copy-properties-not-undefined.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/with/overflow-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/with/name.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/with/overflow-invalid-string.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/with/multiple-unrecognized-properties-ignored.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/with/not-a-constructor.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/with/options-undefined.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/with/prop-desc.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/with/builtin.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/with/length.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/with/basic.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/with/options-empty.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/equals/argument-propertybag-calendar-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/equals/argument-object-insufficient-data.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/equals/argument-propertybag-calendar-number.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/equals/argument-propertybag-calendar-string.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/subtract/argument-string.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/compare/argument-propertybag-calendar-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/compare/argument-object-insufficient-data.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/compare/argument-propertybag-calendar-number.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/compare/argument-propertybag-calendar-string.js (previously Failed)

@nekevss nekevss requested a review from a team August 16, 2024 02:00
@nekevss nekevss added the builtins PRs and Issues related to builtins/intrinsics label Aug 16, 2024
Copy link
Member

@HalidOdat HalidOdat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

Just some very minor nitpicks :)

core/engine/src/builtins/temporal/mod.rs Outdated Show resolved Hide resolved
@HalidOdat HalidOdat requested a review from a team August 17, 2024 15:51
@HalidOdat HalidOdat added this to the next-release milestone Aug 17, 2024
@nekevss nekevss force-pushed the impl-with-and-fields branch from 936e3bc to 2283bc7 Compare August 19, 2024 19:38
@raskad raskad added this pull request to the merge queue Aug 24, 2024
Merged via the queue into main with commit 31e4990 Aug 24, 2024
13 checks passed
@raskad raskad deleted the impl-with-and-fields branch August 24, 2024 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
builtins PRs and Issues related to builtins/intrinsics
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants