fix: add replace directive to ensure lowercase vendoring path#318
fix: add replace directive to ensure lowercase vendoring path#318
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #318 +/- ##
==========================================
+ Coverage 75.45% 78.95% +3.49%
==========================================
Files 34 34
Lines 6597 6648 +51
==========================================
+ Hits 4978 5249 +271
+ Misses 1333 1112 -221
- Partials 286 287 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR attempts to fix a vendoring issue on case-sensitive filesystems (Linux) where Go's vendoring may create vendor/github.com/Microsoft/go-mssqldb instead of the correct lowercase path, breaking builds. The solution adds a replace directive in go.mod to canonicalize the module path. The PR also includes various code formatting improvements (alignment and whitespace fixes).
Changes:
- Added replace directive in
go.modto redirectgithub.com/Microsoft/go-mssqldbto lowercase path - Fixed whitespace and alignment in multiple files (conn_str.go, channel_binding.go, auth_test.go, and channel_binding example)
Reviewed changes
Copilot reviewed 3 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| go.mod | Added replace directive to ensure lowercase module path for vendoring compatibility |
| msdsn/conn_str.go | Removed extra space in conditional check |
| integratedauth/channel_binding_test.go | Added trailing newline |
| integratedauth/channel_binding.go | Aligned struct field declarations and const values |
| integratedauth/auth_test.go | Aligned function signatures |
| examples/channel_binding/tsql.go | Aligned variable declarations, reordered imports, fixed trailing whitespace |
|
@copilot fix the review comments |
|
@copilot fix the review comments |
c59e2fb to
1482825
Compare
examples/channel_binding/tsql.go
Outdated
| auth = flag.String("a", "ntlm", "Authentication method: ntlm, krb5 or winsspi") | ||
| epa = flag.Bool("epa", true, "EPA enabled: true, false") | ||
| encrypt = flag.String("e", "required", "encrypt mode: required, disabled, strict, optional") | ||
| query = flag.String("q", "", "query to execute") |
There was a problem hiding this comment.
@copilot why are we changing formatting? I'd expect this pr to be a single line change.
There was a problem hiding this comment.
Reverted in commit cc2726c. The formatting changes were unintentionally included from running go fmt. The PR now contains only the single change to go.mod as intended.
Add replace directive in go.mod to ensure consistent lowercase module path for vendoring compatibility on case-sensitive filesystems (Linux). Fixes #234
cc2726c to
38992ce
Compare
Fix vendoring case sensitivity issue
This PR addresses the vendoring issue where go-mssqldb might be vendored with incorrect casing on case-sensitive filesystems (Linux).
Plan:
Root Cause:
When users vendor projects that depend on go-mssqldb (
github.com/microsoft/go-mssqldb), if they also have dependencies on packages from GitHub organizations with capital letters (e.g.,github.com/Microsoft/...), Go's vendoring might create directory structures with capital letters, causing issues on case-sensitive filesystems like Linux.Solution:
Added a
replacedirective in go.mod that mapsgithub.com/Microsoft/go-mssqldb => ./to document the canonical lowercase path and ensure any capital-M references point to the current codebase.Changes Made:
./) instead of version-specific referencego mod tidygo buildThis PR now contains only a single, focused change to go.mod as intended.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.