Repository navigation
chore: update dependencies with compatibility fixes - #187
Conversation
Bumps the deps group with 15 updates: | Package | From | To | | --- | --- | --- | | [github.com/charmbracelet/glamour](https://github.com/charmbracelet/glamour) | `0.6.0` | `1.0.0` | | [github.com/efficientgo/core](https://github.com/efficientgo/core) | `1.0.0-rc.2` | `1.0.0-rc.3` | | [github.com/felixge/fgprof](https://github.com/felixge/fgprof) | `0.9.3` | `0.9.5` | | [github.com/gobwas/glob](https://github.com/gobwas/glob) | `0.2.3` | `1.0.0` | | [github.com/gocolly/colly/v2](https://github.com/gocolly/colly) | `2.1.1-0.20201013153555-8252c346cfb0` | `2.3.0` | | [github.com/gohugoio/hugo](https://github.com/gohugoio/hugo) | `0.120.4` | `0.168.0` | | [github.com/mattn/go-isatty](https://github.com/mattn/go-isatty) | `0.0.20` | `0.0.24` | | [github.com/mattn/go-shellwords](https://github.com/mattn/go-shellwords) | `1.0.12` | `1.0.16` | | [github.com/mattn/go-sqlite3](https://github.com/mattn/go-sqlite3) | `1.14.17` | `1.14.52` | | [github.com/oklog/run](https://github.com/oklog/run) | `1.1.0` | `1.2.0` | | [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) | `1.19.0` | `1.25.0` | | [github.com/prometheus/common](https://github.com/prometheus/common) | `0.48.0` | `0.72.0` | | [github.com/sergi/go-diff](https://github.com/sergi/go-diff) | `1.0.0` | `1.4.0` | | [github.com/yuin/goldmark](https://github.com/yuin/goldmark) | `1.6.0` | `1.8.6` | | [golang.org/x/net](https://github.com/golang/net) | `0.29.0` | `0.61.0` | Updates `github.com/charmbracelet/glamour` from 0.6.0 to 1.0.0 - [Release notes](https://github.com/charmbracelet/glamour/releases) - [Commits](charmbracelet/glamour@v0.6.0...v1.0.0) Updates `github.com/efficientgo/core` from 1.0.0-rc.2 to 1.0.0-rc.3 - [Release notes](https://github.com/efficientgo/core/releases) - [Commits](efficientgo/core@v1.0.0-rc.2...v1.0.0-rc.3) Updates `github.com/felixge/fgprof` from 0.9.3 to 0.9.5 - [Release notes](https://github.com/felixge/fgprof/releases) - [Commits](felixge/fgprof@v0.9.3...v0.9.5) Updates `github.com/gobwas/glob` from 0.2.3 to 1.0.0 - [Release notes](https://github.com/gobwas/glob/releases) - [Commits](gobwas/glob@v0.2.3...v1.0.0) Updates `github.com/gocolly/colly/v2` from 2.1.1-0.20201013153555-8252c346cfb0 to 2.3.0 - [Release notes](https://github.com/gocolly/colly/releases) - [Changelog](https://github.com/gocolly/colly/blob/master/CHANGELOG.md) - [Commits](https://github.com/gocolly/colly/commits/v2.3.0) Updates `github.com/gohugoio/hugo` from 0.120.4 to 0.168.0 - [Release notes](https://github.com/gohugoio/hugo/releases) - [Commits](gohugoio/hugo@v0.120.4...v0.168.0) Updates `github.com/mattn/go-isatty` from 0.0.20 to 0.0.24 - [Commits](mattn/go-isatty@v0.0.20...v0.0.24) Updates `github.com/mattn/go-shellwords` from 1.0.12 to 1.0.16 - [Release notes](https://github.com/mattn/go-shellwords/releases) - [Commits](mattn/go-shellwords@v1.0.12...v1.0.16) Updates `github.com/mattn/go-sqlite3` from 1.14.17 to 1.14.52 - [Release notes](https://github.com/mattn/go-sqlite3/releases) - [Commits](mattn/go-sqlite3@v1.14.17...v1.14.52) Updates `github.com/oklog/run` from 1.1.0 to 1.2.0 - [Release notes](https://github.com/oklog/run/releases) - [Commits](oklog/run@v1.1.0...v1.2.0) Updates `github.com/prometheus/client_golang` from 1.19.0 to 1.25.0 - [Release notes](https://github.com/prometheus/client_golang/releases) - [Changelog](https://github.com/prometheus/client_golang/blob/v1.25.0/CHANGELOG.md) - [Commits](prometheus/client_golang@v1.19.0...v1.25.0) Updates `github.com/prometheus/common` from 0.48.0 to 0.72.0 - [Release notes](https://github.com/prometheus/common/releases) - [Changelog](https://github.com/prometheus/common/blob/main/CHANGELOG.md) - [Commits](prometheus/common@v0.48.0...v0.72.0) Updates `github.com/sergi/go-diff` from 1.0.0 to 1.4.0 - [Commits](sergi/go-diff@v1.0.0...v1.4.0) Updates `github.com/yuin/goldmark` from 1.6.0 to 1.8.6 - [Release notes](https://github.com/yuin/goldmark/releases) - [Commits](yuin/goldmark@v1.6.0...v1.8.6) Updates `golang.org/x/net` from 0.29.0 to 0.61.0 - [Commits](golang/net@v0.29.0...v0.61.0) --- updated-dependencies: - dependency-name: github.com/charmbracelet/glamour dependency-version: 1.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: deps - dependency-name: github.com/efficientgo/core dependency-version: 1.0.0-rc.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: deps - dependency-name: github.com/felixge/fgprof dependency-version: 0.9.5 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: deps - dependency-name: github.com/gobwas/glob dependency-version: 1.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: deps - dependency-name: github.com/gocolly/colly/v2 dependency-version: 2.3.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: deps - dependency-name: github.com/gohugoio/hugo dependency-version: 0.168.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: deps - dependency-name: github.com/mattn/go-isatty dependency-version: 0.0.24 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: deps - dependency-name: github.com/mattn/go-shellwords dependency-version: 1.0.16 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: deps - dependency-name: github.com/mattn/go-sqlite3 dependency-version: 1.14.52 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: deps - dependency-name: github.com/oklog/run dependency-version: 1.2.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: deps - dependency-name: github.com/prometheus/client_golang dependency-version: 1.25.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: deps - dependency-name: github.com/prometheus/common dependency-version: 0.72.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: deps - dependency-name: github.com/sergi/go-diff dependency-version: 1.4.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: deps - dependency-name: github.com/yuin/goldmark dependency-version: 1.8.6 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: deps - dependency-name: golang.org/x/net dependency-version: 0.61.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: deps ... Signed-off-by: dependabot[bot] <support@github.com>
| r.remoteLinks[k.dest] = fmt.Errorf("remote link %v: %w", k.dest, err) | ||
| // Reserve the result before scheduling so duplicates share in-flight retries. | ||
| r.remoteLinks[dest] = nil | ||
| if err := r.c.Visit(dest); err != nil { |
There was a problem hiding this comment.
Colly v2.3 now marks redirect targets as visited in checkRedirectFunc when AllowURLRevisit is false, so if an earlier link redirects to /target, a later direct link to /target fails here with AlreadyVisitedError and two links redirecting to /target trigger a 2s retry backoff. Since r.remoteLinks[dest] already deduplicates visits, could we pass colly.AllowURLRevisit() to colly.NewCollector in NewValidator and cover this in TestValidator_RedirectedResult?
There was a problem hiding this comment.
Thanks it makes sense. I have added colly.AllowURLRevisit() and extended the existing redirect test to cover both cases.
| testutil.Assert(t, strings.Contains(err.Error(), context.Canceled.Error()), "unexpected cancellation error: %v", err) | ||
| testutil.Assert(t, !strings.Contains(err.Error(), colly.ErrAlreadyVisited.Error()), "duplicate link did not share the final result: %v", err) | ||
| var visitedErr *colly.AlreadyVisitedError | ||
| testutil.Assert(t, !errors.As(err, &visitedErr), "duplicate link did not share the final result: %v", err) |
There was a problem hiding this comment.
With colly.AllowURLRevisit() enabled in NewValidator, Colly no longer returns AlreadyVisitedError here. Checking that err.Error() contains two "canceled during backoff" entries instead of visitedErr would still verify that the duplicate link shares the final error.
Includes the dependency updates from #186 and the compatibility fixes needed to merge them into
mainahead of the next mdox release.*glob.Patternin transform configuration and pin Colly to the upstream Glob v1 compatibility commit.Colly is pinned to
v2.3.1-0.20260902064301-a210c5b4210fbecause v2.3.0 does not support Glob v1, which the Hugo update requires. This is an upstream pseudo-version containing 35 commits after v2.3.0; it introduces no fork, vendoring, or module replacements. Current main already uses a Colly pseudo-version.Validation:
go test -mod=readonly -race -count=1 -timeout=5m ./....TestValidator_BackoffDoesNotBlockOtherLinkspassed 20 runs with race detection.make lint GOBIN=/tmp/mdox-pr186-tools, including build, formatting, vet, documentation generation, and clean-tree checks.go mod verify.