-
Notifications
You must be signed in to change notification settings - Fork 160
Introducing topics.yaml #7265
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
Merged
Merged
Introducing topics.yaml #7265
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
ffea701
Introducing topics.yaml
jonasfj 63efc04
Test for doc/topics.yaml
jonasfj 132d185
Update doc/topics.yaml
jonasfj 666b385
Update doc/topics.yaml
jonasfj f809112
Update doc/topics.yaml
jonasfj 9b1a901
Cleanup
jonasfj 3b105d5
Fix tests
jonasfj File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# Canonicalizing topics | ||
# ===================== | ||
# | ||
# Packages published to pub.dev can define `topics` in `pubspec.yaml`, see; | ||
# https://dart.dev/tools/pub/pubspec#topics | ||
# | ||
# The list of topics is free-form, and package authors are expected to make up | ||
# new topics as needed. Naturally, this will lead to duplicates and topics that | ||
# only differ in spelling. For example, one package might use the topic "widget" | ||
# while another package uses the topic "widgets". | ||
# | ||
# This file aims to mitigate duplicate topics by establishing _canonical topics_ | ||
# with descriptions and a list of aliases. | ||
# | ||
# Aliases for a topic will be resolved when the `pubspec.yaml` is parsed. | ||
# Ensuring that a package tagged with the alias "widgets" will appear on pub.dev | ||
# as if it had been tagged with the canonical topic "widget". | ||
# Similarly, search queries will be normalized to canonical topics. | ||
# | ||
# Topic descriptions serve as documentation for next time an aliases is | ||
# proposed. Descriptions can also be used in tooltips or topic listings: | ||
# https://pub.dev/topics | ||
# | ||
# | ||
# Canonical topic format | ||
# ---------------------- | ||
# | ||
# Entries in the `topics` list in this document, must have the form: | ||
# | ||
# ```yaml | ||
# topics: | ||
# - topic: <canonical-topic> | ||
# description: <description for use in tooltips, documentation, etc> | ||
# aliases: | ||
# - <aliases-topic> | ||
# - ... | ||
# ``` | ||
# | ||
# | ||
# Contributing | ||
# ------------ | ||
# | ||
# You are welcome to submit pull-requests with additional aliases, canonical | ||
# topics and/or improved topic descriptions. | ||
# | ||
# Please limit pull-requests to propose one topic per PR! | ||
# | ||
# | ||
# Editorial guidelines | ||
# -------------------- | ||
# | ||
# The decision on whether or not to merge two similar topics can be difficult. | ||
# When in doubt we should error on the side of causion and avoid merging topics. | ||
# However, if mistakes are made these changes are reversible. | ||
# And we should not be afraid of accepting that sometimes a single topic can | ||
# have multiple meaning, even if this makes the topic hard to use. | ||
# | ||
# The editorial guidelines are intended to evolve as we gain more experience | ||
# merging/managing topics. | ||
topics: | ||
- topic: widget | ||
description: Packages that contain Flutter widgets. | ||
aliases: | ||
- widgets |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did we not define a regexp for this somewhere else in upload-validation code, should probably be shared?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it lives in pkg/pub_package_reader, I think this is so trivial I just duplicated it rather than add another dependency.
We can change it if we want to. This is really just to test the configuration file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It has a
Iterable<ArchiveIssue> checkTopics(String pubspecContent)
function, which IMO should be private (or insrc/
) because the only thingpub_package_reader
should expose isFuture<PackageSummary> summarizePackageArchive(...)
.So even if there was a good method we did export that we could use, I think it would be wrong to do so.
pub_package_reader
is for reading packages and validating them.One could argue we should have a separate package or library somewhere called
topic_validation.dart
-- but we don't, and I'm not sure where it should live :D