Skip to content
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

Versioned v3 according to Go wiki, maintaining backward compatibility #247

Merged
merged 2 commits into from
Nov 12, 2019
Merged

Versioned v3 according to Go wiki, maintaining backward compatibility #247

merged 2 commits into from
Nov 12, 2019

Conversation

stefanmcshane
Copy link
Contributor

@stefanmcshane stefanmcshane commented Nov 8, 2019

Proposed fix for #246

Moved v3 to subdirectory to allow for versioning >2 with go modules.
Reverted top level go.mod to fix backward compatibility.

With Go Modules (GO111MODULE=on):
go get github.com/go-ldap/ldap/v3
go get -u github.com/go-ldap/ldap/v3
go get github.com/go-ldap/ldap/v3@v3.1.5.

Without Go Modules, v3.0.3 will work (GO111MODULE=off, or go version <1.13):
go get github.com/go-ldap/ldap

This complies with one of the suggested versioning methods from: https://github.com/golang/go/wiki/Modules#releasing-modules-v2-or-higher

Ideally we would increase the versioning number (rename v3 directory to v4, and the go.mod to v4) however this would stray from the LDAPv3 coupling.
https://tools.ietf.org/html/rfc4511

EDIT: Formatting

…erted top level go.mod to fix backward compatibility
Copy link
Member

@johnweldon johnweldon left a comment

Choose a reason for hiding this comment

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

LGTM - I'll merge when you update that README

Thank you.

@johnweldon johnweldon merged commit ec72334 into go-ldap:master Nov 12, 2019
hahmadia added a commit to mattermost/ldap that referenced this pull request Nov 25, 2019
* unified request flow && external binding to LDAP (go-ldap#232)

* unified request flow && external binding to LDAP

* fix debug mode

* go.mod was added

* Prevent negative waitgroup panic by `Add`ing first. (go-ldap#237)

* Use github for module name. (go-ldap#239)

* Rename asn1 ber dependency. (go-ldap#243)

* Rename asn1.ber dependency.

* go mod tidy

* Update travic CI to new asn1 ber

* Update travis go_import_path

* Update README (go-ldap#245)

* Update go.mod (go-ldap#241)

I believe that this (plus a new tag) is what is necessary for native go modules support -- right now go modules complains that the version tag is >= v2 but the module doesn't claim to be a version >= v2.

* Versioned v3 according to Go wiki, maintaining backward compatibility (go-ldap#247)

* Moved v3 to subfolder to allow for versioning >2 with go modules. Reverted top level go.mod to fix backward compatibility

* Updated readme to include directions on Go Modules, including the rationale
cmurphy added a commit to cmurphy/rancher that referenced this pull request Oct 19, 2021
Notes:
- the v3 major release coincided with an update to use Go modules[1] but
  is an otherwise backwards-compatible release. It was not related to
  compatibility with the LDAP V3 protocol, the ldap.v2 package was
  already compatible with the LDAP V3 protocol.
- the import path changed shortly after the v3 release[2], but it is the
  same package as before

[1] go-ldap/ldap#247
[2] go-ldap/ldap@c135faa
MbolotSuse pushed a commit to MbolotSuse/rancher that referenced this pull request Jan 5, 2022
Notes:
- the v3 major release coincided with an update to use Go modules[1] but
  is an otherwise backwards-compatible release. It was not related to
  compatibility with the LDAP V3 protocol, the ldap.v2 package was
  already compatible with the LDAP V3 protocol.
- the import path changed shortly after the v3 release[2], but it is the
  same package as before

[1] go-ldap/ldap#247
[2] go-ldap/ldap@c135faa

(cherry picked from commit 737ae12)
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