Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Ensure that BCD keys are only used once #1174

Merged
merged 1 commit into from
Jun 3, 2024

Conversation

foolip
Copy link
Collaborator

@foolip foolip commented Jun 3, 2024

This prevents a problem like in #1164
from happening before we have a way to handle it.

This prevents a problem like in web-platform-dx#1164
from happening before we have a way to handle it.
@foolip foolip requested a review from ddbeck June 3, 2024 13:21
for (const bcdKey of data.compat_features) {
const otherKey = bcdToFeatureId.get(bcdKey);
if (otherKey) {
throw new Error(`BCD key ${bcdKey} is used in both ${otherKey} and ${key}, which creates ambiguity for some consumers. Please see https://github.com/web-platform-dx/web-features/issues/1173 and help us find a good solution to allow this.`);
Copy link
Collaborator

Choose a reason for hiding this comment

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

I really like this message. 👍

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm glad you like it :) It's a bit weird to throw and error and still say that we'd like to allow it...

@ddbeck ddbeck merged commit a6e88f8 into web-platform-dx:main Jun 3, 2024
3 checks passed
@foolip foolip deleted the bcdToFeatureId branch June 3, 2024 15:12
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants