Skip to content

do not try to update non go files#33

Merged
marwan-at-work merged 1 commit into
marwan-at-work:masterfrom
Luap99:exclude-non-go
Oct 24, 2025
Merged

do not try to update non go files#33
marwan-at-work merged 1 commit into
marwan-at-work:masterfrom
Luap99:exclude-non-go

Conversation

@Luap99

@Luap99 Luap99 commented Oct 23, 2025

Copy link
Copy Markdown
Contributor

Only valid go files can be parsed, if you have a project with c files next to the go code the update will fail as it tries to parse all files not just the go ones.

Trying to parse a c file fail with "illegal character U+0023 '#'" for example and thus fails the upgrade command.

Only valid go files can be parsed, if you have a project with c files
next to the go code the update will fail as it tries to parse all
files not just the go ones.

Trying to parse a c file fail with "illegal character U+0023 '#'" for
example and thus fails the upgrade command.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
@Luap99

Luap99 commented Oct 23, 2025

Copy link
Copy Markdown
Contributor Author

In order to reproduce the issue we got

git clone https://github.com/containers/container-libs
git checkout 513eb514a1
cd storage
mod upgrade --mod-name=github.com/mistifyio/go-zfs/v3 -t=4

I can work on a minimal reproducer if wanted.

@marwan-at-work

Copy link
Copy Markdown
Owner

Thank you!

@marwan-at-work marwan-at-work merged commit 7587925 into marwan-at-work:master Oct 24, 2025
@Luap99 Luap99 deleted the exclude-non-go branch October 24, 2025 10:09
@Luap99

Luap99 commented Oct 24, 2025

Copy link
Copy Markdown
Contributor Author

Thanks for the quick review and merge

fr12k pushed a commit to containifyci/mod that referenced this pull request Nov 2, 2025
Only valid go files can be parsed, if you have a project with c files
next to the go code the update will fail as it tries to parse all
files not just the go ones.

Trying to parse a c file fail with "illegal character U+0023 '#'" for
example and thus fails the upgrade command.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
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