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

🐛 The go.work.sum don't influence the dependencies resolution #317

Merged
merged 2 commits into from
Sep 22, 2023

Conversation

cardil
Copy link
Contributor

@cardil cardil commented Sep 21, 2023

If it's not needed. If the file isn't empty after the update, it should be committed.

Some info: https://stackoverflow.com/a/71613130

Changes

  • 🐛 The go.work.sum don't influence the dependencies resolution

/kind bug

Follow up #316

If it's not needed. If the file isn't empty after the update, it should
be committed.
@knative-prow knative-prow bot added the kind/bug Categorizes issue or PR as related to a bug. label Sep 21, 2023
@knative-prow knative-prow bot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 21, 2023
@cardil
Copy link
Contributor Author

cardil commented Sep 21, 2023

/cc @dprotaso
/cc @upodroid
/cc @kvmware

@knative-prow knative-prow bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 21, 2023
@cardil
Copy link
Contributor Author

cardil commented Sep 21, 2023

What's strange, when I open the project in Goland IDE, or invoke a "Sync Go Module" operation in that IDE, the go.work.sum is being recreated with the contents of #316.

The Goland IDE must call some go command, but I don't know which one.

@dprotaso
Copy link
Member

There really shouldn't be any dependencies in the hack repo - the original intention was for it to just propagate shell scripts to other repos

Now the deps used here will have an influence of the version selection (might not be a big issue) - but I would encourage moving tools to toolbox and test fixtures can be generated programmatically or put under testdata (eg. test vendor project)

@dprotaso
Copy link
Member

Also note this dep is now in the stdlib

hack/go.mod

Line 6 in c4a34c3

github.com/pkg/errors v0.9.1

https://pkg.go.dev/errors

@cardil
Copy link
Contributor Author

cardil commented Sep 21, 2023

@dprotaso There really shouldn't be any dependencies in the hack repo - the original intention was for it to just propagate shell scripts to other repos

Now the deps used here will have an influence of the version selection (might not be a big issue) - but I would encourage moving tools to toolbox and test fixtures can be generated programmatically or put under testdata (eg. test vendor project)

Good point. I think this is an oversight on my side, while doing the #222. Before that PR there ware go deps, but only in isolated go sub modules.

We could move the cmd/script to the toolbox, or just create an additional go.mod in cmd.

Let's capture this in a separate issue.

@cardil
Copy link
Contributor Author

cardil commented Sep 21, 2023

@dprotaso the issue #318

@dprotaso
Copy link
Member

/lgtm
/approve

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Sep 21, 2023
@cardil
Copy link
Contributor Author

cardil commented Sep 21, 2023

/override style / suggester / shell

@knative-prow
Copy link

knative-prow bot commented Sep 21, 2023

@cardil: cardil unauthorized: /override is restricted to Repo administrators.

In response to this:

/override style / suggester / shell

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Copy link
Member

@upodroid upodroid left a comment

Choose a reason for hiding this comment

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

/override "style / suggester / shell"

@knative-prow
Copy link

knative-prow bot commented Sep 22, 2023

@upodroid: Overrode contexts on behalf of upodroid: style / suggester / shell

In response to this:

/override "style / suggester / shell"

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@knative-prow
Copy link

knative-prow bot commented Sep 22, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cardil, dprotaso, upodroid

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [cardil,dprotaso,upodroid]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow knative-prow bot merged commit da6e74c into knative:main Sep 22, 2023
15 of 16 checks passed
@cardil cardil deleted the bugfix/go-work-sum branch September 22, 2023 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants