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

Editorial: Restrict IsValidTimeZoneName case folding to ASCII #1920

Merged
merged 8 commits into from
Jan 11, 2022

Conversation

gibson042
Copy link
Collaborator

Fixes #1919

@codecov
Copy link

codecov bot commented Nov 14, 2021

Codecov Report

Merging #1920 (0fa7fc3) into main (eb68de2) will increase coverage by 0.02%.
The diff coverage is n/a.

❗ Current head 0fa7fc3 differs from pull request most recent head e3e13b1. Consider uploading reports for the commit e3e13b1 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1920      +/-   ##
==========================================
+ Coverage   94.97%   95.00%   +0.02%     
==========================================
  Files          19       19              
  Lines       10990    10990              
  Branches     1750     1600     -150     
==========================================
+ Hits        10438    10441       +3     
+ Misses        535      532       -3     
  Partials       17       17              
Flag Coverage Δ
test262 79.26% <ø> (ø)
tests 89.90% <ø> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
polyfill/lib/intrinsicclass.mjs 55.40% <0.00%> (+4.05%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update eb68de2...e3e13b1. Read the comment docs.

spec/intl.html Outdated Show resolved Hide resolved
spec/intl.html Outdated Show resolved Hide resolved
spec/intl.html Outdated Show resolved Hide resolved
spec/timezone.html Outdated Show resolved Hide resolved
@ptomato ptomato requested review from ryzokuken and sffc November 15, 2021 22:06
Copy link
Collaborator

@ptomato ptomato left a comment

Choose a reason for hiding this comment

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

This looks like a good change. Although I'm not so confident about my mental model of how things should be divided between ECMA-262 and 402.

@ryzokuken @sffc It would be good to get your review on this as well, for that reason. @FrankYFTang also your perspective as implementor and ECMA-402 contributor.

@ptomato ptomato added spec-text Specification text involved ecma402 Behavior specific to implementations supporting ecma402 labels Nov 15, 2021
Copy link
Collaborator

@sffc sffc left a comment

Choose a reason for hiding this comment

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

Seems fine. Procedurally, I think it would be slightly cleaner to make this a standalone normative PR against ECMA-402.

@gibson042
Copy link
Collaborator Author

I think it would be slightly cleaner to make this a standalone normative PR against ECMA-402.

@sffc Done at tc39/ecma402#624, which ended up being editorial. This PR can be simplified after that lands, but will look different based on whether or not a non-ECMA-402 ECMA-262 Temporal implementation is allowed to support a built-in time zone that is absent from the IANA database (which is not allowed of an ECMA-402 implementation).

@ptomato
Copy link
Collaborator

ptomato commented Dec 15, 2021

tc39/ecma402#624 is merged now, so I think this can be edited somewhat.

Copy link
Collaborator Author

@gibson042 gibson042 left a comment

Choose a reason for hiding this comment

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

Done.

spec/timezone.html Outdated Show resolved Hide resolved
spec/timezone.html Outdated Show resolved Hide resolved
@gibson042 gibson042 force-pushed the gh-1919-case-insensitive-utc branch from 2129134 to 82f542b Compare December 16, 2021 22:59
spec/timezone.html Show resolved Hide resolved
spec/timezone.html Outdated Show resolved Hide resolved
spec/timezone.html Outdated Show resolved Hide resolved
@FrankYFTang
Copy link
Contributor

FrankYFTang commented Dec 21, 2021

Related to this PR- I have hard time w/ tc39/test262#3346 . I am not sure what is the right fix in the spec needed for those tests to pass but right now what I see is the name is not taking TimeZoneUTCOffsetName and the grammar could be changed by #1941 but that is not enough because step 7-a and 7-b of ParseTemporalTimeZoneString will throw. I have not carefully read all details of this PR and I am not sure this PR already has enough change to solve all the remaining issues for that but surely either the calling place in 7a or inside IsValidTimeZoneName need to be changed to solve that.

Copy link
Collaborator

@ptomato ptomato left a comment

Choose a reason for hiding this comment

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

Is it the case that anything needs to change in this PR according to the rough consensus we reached in yesterday's champions meeting? For example, do we now need to decouple IsValidTimeZoneName from 402's IsValidTimeZoneName?

spec/intl.html Outdated Show resolved Hide resolved
spec/intl.html Outdated Show resolved Hide resolved
spec/intl.html Outdated Show resolved Hide resolved
spec/timezone.html Show resolved Hide resolved
@gibson042
Copy link
Collaborator Author

Is it the case that anything needs to change in this PR according to the rough consensus we reached in yesterday's champions meeting? For example, do we now need to decouple IsValidTimeZoneName from 402's IsValidTimeZoneName?

Yes, I think so.

@ptomato
Copy link
Collaborator

ptomato commented Jan 10, 2022

Is it the case that anything needs to change in this PR according to the rough consensus we reached in yesterday's champions meeting? For example, do we now need to decouple IsValidTimeZoneName from 402's IsValidTimeZoneName?

Yes, I think so.

On second thought, I think it's probably better to put that into its own issue (#1996) so that we don't keep this PR up in the air longer than necessary. I can rebase this today.

@ptomato
Copy link
Collaborator

ptomato commented Jan 11, 2022

I guess it would be best in that case to remove "Editorial: Add implementation-defined built-in time zone lookup steps" since that takes things more in the direction of unifying 402 and 262 IsValidTimeZone, rather than splitting them. It's a bit difficult to separate but I'll continue working on this tomorrow.

@ptomato ptomato force-pushed the gh-1919-case-insensitive-utc branch from 82f542b to 0fa7fc3 Compare January 11, 2022 19:25
@ptomato ptomato force-pushed the gh-1919-case-insensitive-utc branch from 0fa7fc3 to e3e13b1 Compare January 11, 2022 19:26
@ptomato
Copy link
Collaborator

ptomato commented Jan 11, 2022

@gibson042 I've kept the changes that I removed from this PR in a separate branch, https://github.com/tc39/proposal-temporal/tree/gibson042/implementation-defined in case you want to reuse some parts later.

@ptomato ptomato merged commit 69062d1 into tc39:main Jan 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ecma402 Behavior specific to implementations supporting ecma402 spec-text Specification text involved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IsValidTimeZoneName "UTC" checking should limit case folding to ASCII
5 participants