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

go mod vendor fails on MacOS due to case-sensitivity and the package name #177

Open
blairdrummond opened this issue Feb 10, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@blairdrummond
Copy link

Scenario & Reproduction Steps

tl;dr, I think renaming this package from github.com/1password/onepassword-sdk-go to github.com/1Password/onepassword-sdk-go (uppercase P) would make this package work with go mod vendor; it currently does not.

This package and github.com/1Password/connect-sdk-go cannot be used together with go mod vendor due to case sensitivity issues.

This repo shows two pull requests, one where I ran go mod vendor on linux and the other on MacOS. The difference is that MacOS's filesystem is not case-sensitive (☹), and so on Mac v.s. linux you get different vendor folders

# MacOS
vendor/
  github.com/
    1Password/
      connect-sdk-go v1.5.3
      onepassword-sdk-go v0.1.7
# Linux
vendor/
  github.com/
    1Password/
      connect-sdk-go v1.5.3
    1password/
      onepassword-sdk-go v0.1.7

If you go to run the MacOS generated vendor folder on linux (e.g. in a github action), this fails with an error like this:

Error: main.go:10:2: cannot find module providing package github.com/1password/onepassword-sdk-go: import lookup disabled by -mod=vendor
	(Go version in go.mod is at least 1.14 and vendor directory exists.)
Error: Process completed with exit code 1.

I have tried a range of go mod replace operations but to no avail.

Actual Behavior

Cannot use 1Password/connect-sdk-go and 1password/onepassword-sdk-go together with go mod vendor on MacOS, getting errors about finding packages.

Expected Behavior

Expect go mod vendor to work. (Also expected MacOS to have a case-sensitive FS, but there's less I can do about that one)

SDK version

v0.1.7

Additional information

@blairdrummond blairdrummond added the bug Something isn't working label Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant