dex icon indicating copy to clipboard operation
dex copied to clipboard

chore: remove api/v2 replace directive

Open joonas opened this issue 4 months ago • 1 comments

Overview

This PR gets rid of the replace directive in the go.mod for the github.com/dexidp/dex module.

Doing so has the benefit of making it possible to go install github.com/dexidp/dex/cmd/dex, which at least slightly addresses the underlying need from https://github.com/dexidp/dex/issues/827, though an officially provided binary release would of course be better.

What this PR does / why we need it

This change addresses the error message you'll receive if you try to go install github.com/dexidp/dex/cmd/dex:

$ go install --tags '!cgo' github.com/dexidp/dex/cmd/dex@2dce75009acfcd9df77d57f2d144aae999a4c569
go: github.com/dexidp/dex/cmd/dex@2dce75009acfcd9df77d57f2d144aae999a4c569 (in github.com/dexidp/[email protected]):
        The go.mod file for the module providing named packages contains one or
        more replace directives. It must not contain directives that would cause
        it to be interpreted differently than if it were the main module.

It also bumps the github.com/dexidp/dex/api/v2 dependency to v2.4.0 since parts of the code rely on types introduced in the github.com/dexidp/dex/api/v2 release v2.4.0.

This has been previously brought up in a discussion.

Special notes for your reviewer

joonas avatar Oct 23 '25 22:10 joonas

To further this along, I've pulled this PR into build that I made at https://github.com/cardoe/dex/releases/tag/v2.44.90 You can grab the container to test with at ghcr.io/cardoe/dex:v2.44.90 and report back on this PR.

cardoe avatar Dec 09 '25 21:12 cardoe