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

Poor failure message when go.sum contains a merge-conflict #1745

Open
stefanpenner opened this issue Feb 29, 2024 · 2 comments
Open

Poor failure message when go.sum contains a merge-conflict #1745

stefanpenner opened this issue Feb 29, 2024 · 2 comments

Comments

@stefanpenner
Copy link
Contributor

What version of gazelle are you using?

latest

What version of rules_go are you using?

latest

What version of Bazel are you using?

latest

Does this issue reproduce with the latest releases of all the above?

yes

What operating system and processor architecture are you using?

N/A

What did you do?

go.sum contains a merge-conflict

What did you expect to see?

An actionable error message

What did you see instead?

ERROR: Traceback (most recent call last):
	File "/private/var/tmp/_bazel_spenner/45bdcefdebc3485be9a2f641a09b7a9f/external/gazelle~override/internal/bzlmod/go_deps.bzl", line 473, column 55, in _go_deps_impl
		for entry, new_sum in sums_from_go_mod(module_ctx, from_file_tag.go_mod).items():
	File "/private/var/tmp/_bazel_spenner/45bdcefdebc3485be9a2f641a09b7a9f/external/gazelle~override/internal/bzlmod/go_mod.bzl", line 335, column 25, in sums_from_go_mod
		return parse_sumfile(module_ctx, go_mod_label, "go.sum")
	File "/private/var/tmp/_bazel_spenner/45bdcefdebc3485be9a2f641a09b7a9f/external/gazelle~override/internal/bzlmod/go_mod.bzl", line 365, column 24, in parse_sumfile
		return parse_go_sum(sum_content)
	File "/private/var/tmp/_bazel_spenner/45bdcefdebc3485be9a2f641a09b7a9f/external/gazelle~override/internal/bzlmod/go_mod.bzl", line 370, column 28, in parse_go_sum
		path, version, sum = line.split(" ")
Error: too few values to unpack (got 1, want 3)
@stefanpenner
Copy link
Contributor Author

posting so I don't forget, I may try to tackle this if time permits.

@stefanpenner stefanpenner changed the title Poor failure message when go.sum contians a merge-conflict Poor failure message when go.sum contains a merge-conflict Apr 5, 2024
@fmeum
Copy link
Collaborator

fmeum commented May 23, 2024

We should recommend the merge=union .gitattributes trick in docs.

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

No branches or pull requests

2 participants