Skip to content

ulid, uuid: write Len() instead of the old len() spelling - #3653

Merged
BaseMax merged 1 commit into
mainfrom
fix/uuid-ulid-len
Nov 18, 2026
Merged

BaseMax merged 1 commit into
mainfrom
fix/uuid-ulid-len

Conversation

@BaseMax

@BaseMax BaseMax commented Nov 18, 2026

Copy link
Copy Markdown
Member

The new packages used the old lowercase len() spelling in std, tests and website examples. Spelling only, outputs unchanged; the touched tests and examples were rerun.

@BaseMax
BaseMax requested a review from a team as a code owner November 18, 2026 17:43
@coderabbitai

coderabbitai Bot commented Nov 18, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 10 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 18182234-bbc3-43eb-a15f-18810f7237b3
Commits

Reviewing files that changed from the base of the PR and between 74d575a and 0341138.

Files selected for processing: 21

  • std/encoding/ulid/value.salam
  • std/encoding/uuid/hash.salam
  • std/encoding/uuid/parse.salam
  • std/encoding/uuid/short.salam
  • std/encoding/uuid/type.salam
  • tests/en/stdlib/ulid_codec.salam
  • tests/en/stdlib/ulid_generator.salam
  • tests/en/stdlib/uuid_format.salam
  • tests/en/stdlib/uuid_generate.salam
  • tests/en/stdlib/uuid_short.salam
  • website/content/en/examples/encoding-ulid-guide-bytes.salam
  • website/content/en/examples/encoding-ulid-guide-order.salam
  • website/content/en/examples/encoding-uuid-guide-basics.salam
  • website/content/en/examples/encoding-uuid-guide-custom.salam
  • website/content/en/examples/encoding-uuid-guide-short.salam
  • website/content/en/std-examples/encoding-ulid/encoding-ulid-Batch.salam
  • website/content/en/std-examples/encoding-ulid/encoding-ulid-Bytes.salam
  • website/content/en/std-examples/encoding-ulid/encoding-ulid-New.salam
  • website/content/en/std-examples/encoding-uuid/encoding-uuid-Bytes.salam
  • website/content/en/std-examples/encoding-uuid/encoding-uuid-New.salam
  • website/content/en/std-examples/encoding-uuid/encoding-uuid-NewV7.salam
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@github-actions

Copy link
Copy Markdown
Contributor
sha=0341138fa969d55e1e1ffa8fff17cff067fb0b14

🤖 Salam AI review

Verdict: ✅ Good to merge

commit 0341138 · 21 files · +44 −44 · model salam

Summary

This pull request replaces the old lowercase .len() spelling with .Len() across the encoding.ulid and encoding.uuid standard library implementations, their stdlib tests, and related website examples. The changes are mechanical, limited to spelling, and align with the canonical Len() methods exposed for str and Vector values in the codebase. No behavioral or API-semantic changes are introduced in the shown diffs.

What changed

The diff consistently updates length queries from .len() to .Len() in std/encoding/ulid (value.salam) and std/encoding/uuid (hash.salam, parse.salam, short.salam, type.salam), along with corresponding usage in tests/en/stdlib for ULID/UUID codec, generation, formatting, and short-form tests. The same spelling update is applied to English website guides and std examples for encoding.ulid and encoding.uuid, covering byte-length checks, string-length assertions, and loop/count conditions.

Review

No blocking issues found in the provided diff. The replacements match the expected standard library method spelling: str.Len() is the canonical string length API (with str.Len(s) implemented as s.Len()), and collections.Vector<T> provides Len() alongside its lowercase implementation. All modified call sites operate on str or Vector<u8>/collection values where Len() is the appropriate method, and the edits preserve the original logic and control flow (e.g. validation guards in std/encoding/ulid/value.salam:54,61, hashing buffer sizing in std/encoding/uuid/hash.salam:27,47,60, and parsing/format checks in std/encoding/uuid/parse.salam:83, std/encoding/uuid/short.salam:46,54, std/encoding/uuid/type.salam:144).

Tests

The PR updates existing stdlib tests and documentation examples to the corrected spelling; the author states the touched tests and examples were rerun, but I did not run a build or tests. I did not see other .len() usages remaining within the modified ULID/UUID std, test, or example files shown in this diff.

Risks

Low risk: this is a focused naming/spelling correction with no functional changes shown. Any remaining risk would be limited to environments or branches where Len() is not available for these types, but that would be inconsistent with the current stdlib signatures reflected in the repository.


⚠️ This review was written automatically by an AI and may contain mistakes. It is a helper for maintainers, not a replacement for a human review: check the code yourself before merging.

@BaseMax
BaseMax merged commit 1faeb1c into main Nov 18, 2026
13 checks passed
@BaseMax
BaseMax deleted the fix/uuid-ulid-len branch November 18, 2026 17:56
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.

1 participant