Skip to content

Use make for basic string handling#314

Merged
pkwarren merged 1 commit into
mainfrom
pkw/make-string-handling
Jun 4, 2026
Merged

Use make for basic string handling#314
pkwarren merged 1 commit into
mainfrom
pkw/make-string-handling

Conversation

@pkwarren

@pkwarren pkwarren commented Jun 4, 2026

Copy link
Copy Markdown
Member

Update a few places that are piping strings to separate tools to use make builtin string handling instead. This should be faster and also avoid external tool dependencies.

Update a few places that are piping strings to separate tools to use
make builtin string handling instead. This should be faster and also
avoid external tool dependencies.
Comment thread make/go/bootstrap.mk
endef
# Extracts the major.minor (e.g. 1.26) from a dotted version string (e.g. 1.26.3).
define _major_minor
$(word 1,$(subst ., ,$(1))).$(word 2,$(subst ., ,$(1)))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nit spacing.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Did you mean adding a tab at the beginning of the line? If so that would require each call site to trim whitespace when using it.

@pkwarren pkwarren merged commit d537c0d into main Jun 4, 2026
4 checks passed
@pkwarren pkwarren deleted the pkw/make-string-handling branch June 4, 2026 17:28
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