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

Allow same identifier in static and regular ops #1098

Merged

Conversation

lucacasonato
Copy link
Member

@lucacasonato lucacasonato commented Feb 7, 2022

Closes #1097


Preview | Diff

index.bs Outdated Show resolved Hide resolved
Copy link

@Okiamgood Okiamgood left a comment

Choose a reason for hiding this comment

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

[spam]

@lucacasonato
Copy link
Member Author

@TimothyGu / @EdgarChen would you mind taking a look? This is a prerequisite for whatwg/fetch#1392.

Copy link
Member

@EdgarChen EdgarChen 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 good to me.
I checked how we handle the overloaded operations, there are separated overload set for regular and static operation, so I think it is fine to have same identifier in regular and static operations.

@EdgarChen
Copy link
Member

@TimothyGu, WDYT?

@EdgarChen
Copy link
Member

BTW, I filed https://bugzilla.mozilla.org/show_bug.cgi?id=1765992 for Gecko.

@lucacasonato
Copy link
Member Author

Thanks @EdgarChen. Added the link to the PR description. I'll open a WebKit issue in a moment.

Can I count Gecko and Chromium as interested implementers for the working mode requirements?

@jasnell
Copy link

jasnell commented Apr 22, 2022

+1 to this. Definitely useful

@lucacasonato
Copy link
Member Author

cc @tabatkins, as this may affect bikeshed IDL handling too.

@tabatkins
Copy link
Contributor

Yeah, thanks for the ping. I will indeed need to make a change in how Bikeshed handles these. (The change makes sense tho, so Bikeshed shouldn't be a blocker here.)

aarongable pushed a commit to chromium/chromium that referenced this pull request May 10, 2022
This commit adds support for having regular and static ops with the same
name on a WebIDL interface. The corresponding spec change is
whatwg/webidl#1098.

Bug: 1305399
Change-Id: Id414ac980772252a40715c0d928021b6df5989a8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3623640
Auto-Submit: Luca Casonato <[email protected]>
Reviewed-by: Yuki Shiino <[email protected]>
Commit-Queue: Yuki Shiino <[email protected]>
Reviewed-by: Kentaro Hara <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1001427}
@lucacasonato
Copy link
Member Author

Support for this was merged in Chromium (https://chromium-review.googlesource.com/c/chromium/src/+/3623640), so we have two "interested implementers" now. @EdgarChen think we can land this?

@EdgarChen EdgarChen merged commit c87ac43 into whatwg:main May 10, 2022
@lucacasonato lucacasonato deleted the static_regular_operation_same_name branch May 10, 2022 10:41
@foolip
Copy link
Member

foolip commented May 10, 2022

I think this will impact MDN documentation, because static and instance members aren’t distinguished in the URL convention. Does anyone have a plan for that?

@domenic
Copy link
Member

domenic commented May 10, 2022

From what I understand MDN has had some consensus to move away from their current pretend-all-methods-are-static style for some time, but I haven't seen any actual updates: https://github.com/mdn/content/discussions/5121 and some other discussions.

@foolip
Copy link
Member

foolip commented May 12, 2022

It's been discussed, but there weren't any plans for anyone to work on it. I've commented on https://github.com/mdn/content/discussions/5121 and filed openwebdocs/project#104 to put it on the radar, but I would expect Response.json to not be documented (or in BCD) until that's resolved.

mjfroman pushed a commit to mjfroman/moz-libwebrtc-third-party that referenced this pull request Oct 14, 2022
This commit adds support for having regular and static ops with the same
name on a WebIDL interface. The corresponding spec change is
whatwg/webidl#1098.

Bug: 1305399
Change-Id: Id414ac980772252a40715c0d928021b6df5989a8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3623640
Auto-Submit: Luca Casonato <[email protected]>
Reviewed-by: Yuki Shiino <[email protected]>
Commit-Queue: Yuki Shiino <[email protected]>
Reviewed-by: Kentaro Hara <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1001427}
NOKEYCHECK=True
GitOrigin-RevId: 7aabcead1773e2cc6775dff9f570afec6c3af2c6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Allow static operations to have the same name as regular operations
8 participants