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

capability: add ListKnown, ListSupported; deprecate List #153

Merged
merged 2 commits into from
Sep 25, 2024

Conversation

kolyshkin
Copy link
Collaborator

@kolyshkin kolyshkin commented Sep 20, 2024

Apparently, most users of capability.List wants the list of supported
capabilities (i.e. they go on to exclude capabilities above the last
known one).

Let's provide ListSupported to such users.

Also, provide ListKnown, and deprecate List.

Finally, amend LastCap documentation with a link to ListSupported,
as this is what most users are using it for.

Draft until #152 is merged; TODO: amend LastCap doc to mention ListSupported.

@kolyshkin kolyshkin marked this pull request as draft September 20, 2024 20:45
kolyshkin added a commit to kolyshkin/sys that referenced this pull request Sep 20, 2024
This is a draft pending moby#151, moby#152, moby#153 merge.

TODO: fix the release date.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
kolyshkin added a commit to kolyshkin/sys that referenced this pull request Sep 20, 2024
This is a draft pending moby#151, moby#152, moby#153 merge.

TODO: fix the release date.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
@kolyshkin kolyshkin changed the title capability: deprecate List, add ListKnown, ListSupported capability: add ListKnown, ListSupported; deprecate List. Sep 20, 2024
Copy link
Member

@tianon tianon left a comment

Choose a reason for hiding this comment

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

Nice 👀

kolyshkin added a commit to kolyshkin/sys that referenced this pull request Sep 21, 2024
This is a draft pending moby#151, moby#152, moby#153 merge.

TODO: fix the release date.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
kolyshkin added a commit to kolyshkin/sys that referenced this pull request Sep 21, 2024
This is a draft pending moby#151, moby#152, moby#153 merge.

TODO: fix the release date.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
@kolyshkin kolyshkin marked this pull request as ready for review September 21, 2024 01:38
@kolyshkin kolyshkin force-pushed the list-enh branch 2 times, most recently from e767c87 to 7384a8a Compare September 21, 2024 02:49
@kolyshkin kolyshkin changed the title capability: add ListKnown, ListSupported; deprecate List. capability: add ListKnown, ListSupported; deprecate List Sep 21, 2024
@kolyshkin
Copy link
Collaborator Author

@thaJeztah PTAL

According to [1], the generated files should contain a comment which
matches the following regexp:

	^// Code generated .* DO NOT EDIT\.$

Fix accordingly.

[1]: https://pkg.go.dev/cmd/go#hdr-Generate_Go_files_by_processing_source

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
@kolyshkin
Copy link
Collaborator Author

Rebased

capability/enum.go Outdated Show resolved Hide resolved
Apparently, most users of capability.List wants the list of supported
capabilities (i.e. they go on to exclude capabilities above the last
known one).

Let's provide ListSupported to such users.

Also, provide ListKnown, and deprecate List.

Finally, amend LastCap documentation with a link to ListSupported,
as this is what most users are using it for.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
@kolyshkin kolyshkin merged commit aaea55a into moby:main Sep 25, 2024
19 checks passed
@kolyshkin kolyshkin mentioned this pull request Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants