bazelbuild / bazelbuild/bazel-skylib
Migrate and deprecate `sets` in favor of native starlark `set()`
- Dominant language
- Starlark
- Stars
- 444
- Forks
- 202
- PR merge metrics
- No merged PRs in 30d
Description
Now that starlark has a native `set` (https://bazel.build/rules/lib/core/set), the skylib `sets` module should be deprecated. To improve performance for existing use cases, it should also be migrated to the native `set` instead of a `dict` wrapped in a `struct`. Typical usage is transient (not retained) so memory savings would be small, but it would also improve cpu a bit (unnecessary struct field lookup on every access).
Contributor guide
Research direction
Start by locating the skylib `sets` module and reviewing the native Starlark `set()` documentation linked in the issue. Trace existing `sets` usage and its current dict/struct representation before planning the migration. Done means the module is deprecated and existing use cases use the native set while preserving supported behavior and improving the stated overhead.
Written by the indexing model from the issue text.
Assessment
- Domain
- build-system
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100