Skip to content

improve warning message about version attribute#642

Merged
glours merged 1 commit intocompose-spec:mainfrom
glours:improve-version-deprecation-message
Jul 2, 2024
Merged

improve warning message about version attribute#642
glours merged 1 commit intocompose-spec:mainfrom
glours:improve-version-deprecation-message

Conversation

@glours
Copy link
Copy Markdown
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
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
Copy Markdown
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
Copy Markdown
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
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
Copy Markdown
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
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
@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
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