Skip to content

chore(go.mod): remove replace directive for dlclark/regexp2 #16069

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 8, 2025

Conversation

johnstcn
Copy link
Member

@johnstcn johnstcn commented Jan 8, 2025

Right now, it looks like we only utilise dlclark/regexp2 as a transitive dependency of charmbracelet/glamour:

$ go mod why github.com/dlclark/regexp2
# github.com/dlclark/regexp2
github.com/coder/coder/v2/coderd/render
github.com/charmbracelet/glamour/ansi
github.com/alecthomas/chroma/v2
github.com/dlclark/regexp2

The reason for this replacement was to avoid a goroutine leak in unit tests.
However, I'm currently unable to replace the goroutine leak as we do not perform any leak detection tests in coderd/render.

If required, we can use the workaround detailed in regexp2's README.md:

https://github.com/dlclark/regexp2/blob/v1.11.4/README.md#goroutine-leak-error

@johnstcn johnstcn self-assigned this Jan 8, 2025
@johnstcn johnstcn merged commit 53d9c7e into main Jan 8, 2025
31 checks passed
@johnstcn johnstcn deleted the cj/deps/regexp2 branch January 8, 2025 13:15
@github-actions github-actions bot locked and limited conversation to collaborators Jan 8, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants