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

feat: add a deprecation warning when running Taskfiles with a v2 schema #1199

Merged
merged 1 commit into from
Jun 4, 2023

Conversation

pd93
Copy link
Member

@pd93 pd93 commented Jun 3, 2023

Added a warning to the output when using a version: 2 schema. (This functionality was split out of #1198).

image

This might break things for people using v2 schemas in scripts if they update... we could stop output if the --silent flag is specified, but this might not stop it from breaking where some tasks have silent: true. Maybe we send the output to stderr instead? Thoughts welcome.

Copy link
Member

@andreynering andreynering left a comment

Choose a reason for hiding this comment

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

Answering some of your questions:

  • Yes, sending to stderr would be more appropriate, and mitigate possible breakage in scripts
  • Yes, respecting the --silent flag be interesting. I wouldn't worry too much about silent: true set on tasks, though. v2 has very few users currently.

With these points addressed, I think this is good to go! 👍

@andreynering
Copy link
Member

One more thing: this is worth a mention on the CHANGELOG, IMO.

Schema version 2 is now considered deprecated and scheduled to be removed in the next major release.

@pd93
Copy link
Member Author

pd93 commented Jun 3, 2023

Yes, sending to stderr would be more appropriate, and mitigate possible breakage in scripts

Updated

Yes, respecting the --silent flag be interesting. I wouldn't worry too much about silent: true set on tasks, though. v2 has very few users currently.

It's actually kind of annoying to pass in the flags to the version checks function. I could move the check into the main function, but I think with this being output to stderr now, this should be necessary anymore?

One more thing: this is worth a mention on the CHANGELOG, IMO.

Ah yeah, I forgot to bring this change over from #1198. I've added it now, Thanks

@andreynering
Copy link
Member

andreynering commented Jun 3, 2023

It's actually kind of annoying to pass in the flags to the version checks function. I could move the check into the main function, but I think with this being output to stderr now, this should be necessary anymore?

Agreed. No need to check --silent anymore.

CI broke. Probably easy to fix, just a matter of check stderr instead of stdout on the test, I believe.

EDIT: Fixed myself 🙂

@pd93
Copy link
Member Author

pd93 commented Jun 4, 2023

CI broke. Probably easy to fix, just a matter of check stderr instead of stdout on the test, I believe.

Whoops, thank you 😛

@andreynering andreynering merged commit 7a2f8d6 into main Jun 4, 2023
8 checks passed
@andreynering andreynering deleted the v2-deprecation-warning branch June 4, 2023 00:05
@pd93 pd93 mentioned this pull request Jul 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants