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

improve warning message about version attribute #642

Merged

Conversation

glours
Copy link
Collaborator

@glours glours commented Jun 20, 2024

fix #641

@glours glours requested a review from ndeloof as a code owner June 20, 2024 08:55
@glours glours requested a review from jhrotko June 20, 2024 08:55
@glours glours self-assigned this Jun 20, 2024
loader/loader.go Outdated
@@ -89,7 +89,7 @@ var versionWarning []string

func (o *Options) warnObsoleteVersion(file string) {
if !slices.Contains(versionWarning, file) {
logrus.Warning(fmt.Sprintf("%s: `version` is obsolete", file))
logrus.Warning(fmt.Sprintf("%s: the attribute `version` is deprecated,it will be ignored, please remove it to avoid potential confusion", file))
Copy link
Collaborator

Choose a reason for hiding this comment

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

version is not deprecated. If we want to, need first to update https://github.com/compose-spec/compose-spec/blob/master/04-version-and-name.md.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

thanks, updated

@glours glours force-pushed the improve-version-deprecation-message branch from 6092521 to da57db2 Compare June 20, 2024 09:09
@glours glours requested a review from ndeloof June 20, 2024 09:10
loader/loader.go Outdated
@@ -89,7 +89,7 @@ var versionWarning []string

func (o *Options) warnObsoleteVersion(file string) {
if !slices.Contains(versionWarning, file) {
logrus.Warning(fmt.Sprintf("%s: `version` is obsolete", file))
logrus.Warning(fmt.Sprintf("%s: the attribute `version` is obsolete,it will be ignored, please remove it to avoid potential confusion", file))
Copy link
Collaborator

Choose a reason for hiding this comment

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

obsolete,it => obsolete, it

@glours glours force-pushed the improve-version-deprecation-message branch from da57db2 to f602a84 Compare July 2, 2024 08:40
@glours glours force-pushed the improve-version-deprecation-message branch from f602a84 to 38722de Compare July 2, 2024 08:42
@glours glours enabled auto-merge (rebase) July 2, 2024 08:42
@glours glours merged commit 2bbf153 into compose-spec:main Jul 2, 2024
8 checks passed
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.

Version warning message causing lots of churn amongst projects with minimal benefit
2 participants