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

[gomod] Deprecate the '--force-gomod-tidy' CLI flag #714

Merged

Conversation

eskultety
Copy link
Member

This deprecates the --force-gomod-tidy CLI option. Since this effort could result in a controversial breaking behaviour the first attempt is somewhat conservative in that it doesn't default to using go mod tidy at all and instead ignores this aspect of a misconfigured repository.

Relates to: #713

Maintainers will complete the following section

  • Commit messages are descriptive enough
  • Code coverage from testing does not decrease and new code is covered
  • Docs updated (if applicable)
  • Docs links in the code are still valid (if docs were updated)

Note: if the contribution is external (not from an organization member), the CI
pipeline will not run automatically. After verifying that the CI is safe to run:

@eskultety eskultety force-pushed the go-deprecate-force-tidy branch 2 times, most recently from 6156194 to 1d0dab1 Compare January 7, 2025 14:06
@eskultety eskultety requested review from a-ovchinnikov and brunoapimentel and removed request for a-ovchinnikov January 7, 2025 14:06
@eskultety eskultety marked this pull request as ready for review January 7, 2025 14:06
@eskultety
Copy link
Member Author

With the Go 1.22 vendored workspaces out of the way, this is now rebased and ready for review to make progress with #707 which is a major issue since it only really exists with our Go backend even though Yarn backends are the only ones using temporary repo working copies at the moment.

Fixes: bbd2428

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Originally, the section in question was hosted under 'Vendoring' where
it should have been under 'gomod flags'. This minor change is going to
be even more emphasized with further deprecated gomod flags, like
'--force-gomod-tidy' which future patches will deprecate.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Specifically mention that they're bound to be removed in future
releases and not to be kept around forever.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
This flag has always been documented as "questionable" and a candidate
for a removal (documented by commit 9e9615c ) ever since its
introduction.
This patch officially deprecates the flag.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Resolves: containerbuildsystem#713

Signed-off-by: Erik Skultety <eskultet@redhat.com>
@eskultety eskultety force-pushed the go-deprecate-force-tidy branch from 1d0dab1 to fc087e3 Compare January 8, 2025 14:42
@eskultety
Copy link
Member Author

Just a note to myself, we'll need to mention this in the release notes as a breaking change because we won't be defaulting to the go mod tidy behaviour after this PR so if any consumer actually made use of the --force-gomod-tidy flag, they'll be left without an alternative on our side (for the record, it was a mistake we allowed this to be configurable and done on our side in the first place since go mod tidy relates to the source repository configuration and setup, not actually building it).

@eskultety eskultety added this pull request to the merge queue Jan 8, 2025
Merged via the queue into containerbuildsystem:main with commit 4af23d8 Jan 8, 2025
15 checks passed
@eskultety eskultety deleted the go-deprecate-force-tidy branch January 8, 2025 15:03
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.

3 participants