Merged
Conversation
Deleted the .github/workflows/ci.yml file, removing the continuous integration workflow for the project. This disables automated testing and formatting checks on push and pull request events.
There was a problem hiding this comment.
Pull request overview
This PR introduces performance optimizations and Unicode correctness improvements to the str library, alongside enhanced CI infrastructure. The main focus is on improving the efficiency of substring counting operations and standardizing grapheme handling throughout the library.
Key Changes
- Refactored
count/3internal implementation to eliminate repeatedlist.lengthcalls in recursive loops by tracking the haystack length as a parameter - Migrated
reverse/1to use Gleam's standardstring.to_graphemesfor consistent Unicode handling across the library - Added a new GitHub Actions CI workflow with pinned Gleam version and optimized caching strategy
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/str/core.gleam | Optimized count_loop by introducing count_loop_with_len helper that tracks list length; simplified reverse/1 to use stdlib string.to_graphemes instead of custom tokenizer; removed unused str/tokenize import |
| gleam.toml | Bumped version from 1.1.1 to 1.2.0 for new minor release |
| CHANGELOG.md | Documented performance improvements, Unicode correctness changes, and CI enhancements for version 1.2.0 |
| .github/workflows/ci.yml | Added CI workflow with Gleam 1.13.0, dependency caching, format checking, and test execution |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This pull request introduces several improvements, both in functionality and infrastructure, for the
strlibrary. The main changes include enhanced Unicode correctness in string reversal, performance optimizations in substring counting, and improvements to the CI workflow for more reliable builds.Unicode correctness and string utilities
reverse/1function now uses the BEAM standard library's grapheme segmentation (string.to_graphemes) for improved Unicode correctness and consistency throughout the library.Performance optimizations
count/3was refactored to avoid repeatedlist.lengthcalls within recursive loops, enhancing performance on long strings by passing the length as an argument.Continuous Integration improvements
.github/workflows/ci.yml) that pins the Gleam version and improves cache usage for faster and more reproducible CI runs.Documentation and metadata updates
1.2.0ingleam.toml.