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

Remove vendor folder during make clean #11315

Merged
merged 2 commits into from
Oct 14, 2021
Merged

Remove vendor folder during make clean #11315

merged 2 commits into from
Oct 14, 2021

Conversation

davemay99
Copy link
Contributor

Nomad 1.1.3 introduced a change in #10898 which removes the build requirement of vendored Golang dependencies.

When upgrading a source repository from a version prior to Nomad 1.1.3, if you do not remove the vendor directory before building you will get an error similar to the following:

dmay@ubu20:~/git/hashicorp/nomad$ make dev
--> Formatting HCL
==> Removing old development build...
==> Building pkg/linux_amd64/nomad with tags ui  ...
go: inconsistent vendoring in /home/dmay/git/hashicorp/nomad:
....
        To sync the vendor directory, run:
                go mod vendor
make[1]: *** [GNUmakefile:78: pkg/linux_amd64/nomad] Error 1
make: *** [GNUmakefile:244: dev] Error 2

For a smoother development experience this PR contains the following:

  • Add a step to make clean to remove the vendor directory
  • Add a warning to make dev to either remove the vendor directory or run make clean. NOTE -- during development some authors may need to temporarily use a vendor directory, so this does not stop the build process.

@davemay99 davemay99 requested a review from notnoop October 14, 2021 15:26
Copy link
Contributor

@notnoop notnoop left a comment

Choose a reason for hiding this comment

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

The warning is sensible. LGTM.

@davemay99 davemay99 merged commit bf94aad into main Oct 14, 2021
@davemay99 davemay99 deleted the f-make-clean-vendor branch October 14, 2021 15:32
@davemay99 davemay99 added this to the 1.2.0 milestone Nov 1, 2021
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants