Skip to content

chore(deps): update regexp2 to v2#37664

Draft
silverwind wants to merge 2 commits into
go-gitea:mainfrom
silverwind:update-regexp2-v2
Draft

chore(deps): update regexp2 to v2#37664
silverwind wants to merge 2 commits into
go-gitea:mainfrom
silverwind:update-regexp2-v2

Conversation

@silverwind
Copy link
Copy Markdown
Member

Updates github.com/dlclark/regexp2 from v1.12.0 to v2.0.2. The v2 module uses the /v2 import suffix; the single call site (models/issues/pull.go) is otherwise unchanged because RegexOptions still satisfies the new CompileOption interface.

Also removes the renovate constraint pinning regexp2 to v1, which was added because v2 failed to build on linux/386 (upstream issue dlclark/regexp2#102). v2.0.2 contains the fix.


This PR was written with the help of Claude Opus 4.7

Updates `github.com/dlclark/regexp2` from v1.12.0 to v2.0.2. The v2
import path is `github.com/dlclark/regexp2/v2`. API usage in
`models/issues/pull.go` is unchanged because `RegexOptions` still
satisfies the new `CompileOption` interface.

The previously-added renovate pin on v1 (for a linux/386 build break,
upstream issue dlclark/regexp2#102) is removed, as v2.0.2 contains the
fix.

Co-Authored-By: Claude (Opus 4.7) <noreply@anthropic.com>
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label May 11, 2026
@wxiaoguang
Copy link
Copy Markdown
Contributor

But v1 is still there, it brings nothing useful except bloating the binary size.

@silverwind
Copy link
Copy Markdown
Member Author

silverwind commented May 11, 2026

v1 will go once https://github.com/alecthomas/chroma updates to it. This problem of duplicate deps isn't exactly new, happens all the time with npm deps.

@wxiaoguang
Copy link
Copy Markdown
Contributor

v1 will go once https://github.com/alecthomas/chroma updates to it.

Why not wait to then? v1 is still active and well maintained, Upgrading to v2 brings nothing useful.

@silverwind
Copy link
Copy Markdown
Member Author

Waiting is fine, but I don't think we could codify a principle like "wait until dependency dedupes" into renovate so it's manual extra work.

@silverwind
Copy link
Copy Markdown
Member Author

silverwind commented May 13, 2026

chroma has upgraded in alecthomas/chroma@1cf1560, we can wait on next chroma release here after which it will dedupe.

@silverwind
Copy link
Copy Markdown
Member Author

I find it silly to wait on dependency dedupe, so I would like to merge this update now.

@lunny lunny added the topic/build PR changes how Gitea is built, i.e. regarding Docker or the Makefile label May 18, 2026
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels May 18, 2026
@wxiaoguang
Copy link
Copy Markdown
Contributor

I find it silly to wait on dependency dedupe, so I would like to merge this update now.

Isn't it really silly to bloat the binary size with no benefit?

@wxiaoguang wxiaoguang marked this pull request as draft May 18, 2026 07:11
@silverwind
Copy link
Copy Markdown
Member Author

Size impact here is 665kB or +0.46%. I don't think it's worth waiting for 0.46%.

@wxiaoguang
Copy link
Copy Markdown
Contributor

wxiaoguang commented May 18, 2026

Size impact here is 665kB or +0.46%. I don't think it's worth waiting for 0.46%.

I also don't think it's worth to improve less than 0.1ms for most pages: #36863 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm/need 1 This PR needs approval from one additional maintainer to be merged. topic/build PR changes how Gitea is built, i.e. regarding Docker or the Makefile

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants