Skip to content

Add a comment for empty dist files #1329

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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions features/avif.yml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
# Do not edit this file by hand. Edit the source file instead!

{}

# Nothing is generated, nothing to see here.
Copy link
Collaborator

Choose a reason for hiding this comment

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

What do you think of linking out to some documentation (you can just stub a heading for now, if you like) to handle the whole "why is it empty?" question?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Although, maybe it's better to link to the docs at the top of all dist files?

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree with this. Linking to the docs on line 3 of all dist files (right after asking people not to edit the file by hand) would give them a friendly way to learn more, especially for folks who prefer to jump in the code first, and read docs later.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Cool, I've sent #1345 as a draft, to land after #1330.

If the docs mention {} then I don't think this PR is needed at all.

6 changes: 6 additions & 0 deletions features/http2.yml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Generated from: http2.yml
# Do not edit this file by hand. Edit the source file instead!

{}

# Nothing is generated, nothing to see here.
6 changes: 6 additions & 0 deletions features/http3.yml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Generated from: http3.yml
# Do not edit this file by hand. Edit the source file instead!

{}

# Nothing is generated, nothing to see here.
6 changes: 6 additions & 0 deletions features/intersection-observer-v2.yml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Generated from: intersection-observer-v2.yml
# Do not edit this file by hand. Edit the source file instead!

{}

# Nothing is generated, nothing to see here.
6 changes: 6 additions & 0 deletions features/jpegxl.yml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Generated from: jpegxl.yml
# Do not edit this file by hand. Edit the source file instead!

{}

# Nothing is generated, nothing to see here.
6 changes: 6 additions & 0 deletions features/mathml.yml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Generated from: mathml.yml
# Do not edit this file by hand. Edit the source file instead!

{}

# Nothing is generated, nothing to see here.
6 changes: 6 additions & 0 deletions features/notifications.yml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Generated from: notifications.yml
# Do not edit this file by hand. Edit the source file instead!

{}

# Nothing is generated, nothing to see here.
6 changes: 6 additions & 0 deletions features/scroll-to-text-fragment.yml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Generated from: scroll-to-text-fragment.yml
# Do not edit this file by hand. Edit the source file instead!

{}

# Nothing is generated, nothing to see here.
6 changes: 6 additions & 0 deletions features/webdriver-bidi.yml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Generated from: webdriver-bidi.yml
# Do not edit this file by hand. Edit the source file instead!

{}

# Nothing is generated, nothing to see here.
6 changes: 6 additions & 0 deletions features/webp.yml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Generated from: webp.yml
# Do not edit this file by hand. Edit the source file instead!

{}

# Nothing is generated, nothing to see here.
4 changes: 4 additions & 0 deletions scripts/dist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,10 @@ function toDist(sourcePath: string): YAML.Document {
insertCompatFeatures(dist, sortedGroups);
}

if (dist.contents.items.length === 0) {
dist.comment = ' Nothing is generated, nothing to see here.'
}

return dist;
}

Expand Down
Loading