bazelbuild / bazelbuild/bazel-skylib

Migrate and deprecate `sets` in favor of native starlark `set()`

Open
#625 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.