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

The future of deprecation messages … #5084

Open
sevu opened this issue Aug 16, 2020 · 8 comments
Open

The future of deprecation messages … #5084

sevu opened this issue Aug 16, 2020 · 8 comments
Labels
Add-ons Issues with the add-ons client and/or server. Enhancement Issues that are requests for new features or changes to existing ones. Question Issues that are actually questions rather than problem reports.

Comments

@sevu
Copy link
Member

sevu commented Aug 16, 2020

How to handle deprecation messages in the future?

  • 1.12 displayed them ingame to everybody playing it
  • 1.14 hides them from everybody, except of the crazy people who start wesnoth from a terminal, or find the logs on Windows.

The old way was annoying, but it had better chances that someone gets involved and fixes it.
The current one somehow undermines the deprecation policy, as things are deprecated properly, but people won't fix it.

Maybe it's possible to display the deprecation messages dependent on whether the player has a _server.pbl in the add-on, or lacks an _info.cfg?

Current situation is, that as soon as I have other peoples add-ons installed, I get more deprecation messages than my terminal displays (I did set the buffer to 1000 lines).

In case we don't want to change anything about how / whom to display deprecation messages to, the log spam is mostly about FOREACH & NEXT. De-deprecating these two macros or dropping them already in 1.16 would be an alternative.

@sevu sevu added Enhancement Issues that are requests for new features or changes to existing ones. Question Issues that are actually questions rather than problem reports. labels Aug 16, 2020
@Pentarctagon
Copy link
Member

I've never really liked that the warnings (and deprecation messages especially) are to a certain degree hidden. Having those messages doesn't do anything if nobody ever sees them, and removing something that's deprecated when very few, if any, UMC authors will have seen the deprecation messages seems like it defeats the purpose of deprecating something in the first place.

So:

Maybe it's possible to display the deprecation messages dependent on whether the player has a _server.pbl in the add-on, or lacks an _info.cfg?

would be good, IMO. Something else would be to enable deprecation warnings by default on development branches (1.13, 1.15, etc).

@CelticMinstrel
Copy link
Member

Did 1.12 even have deprecation messages? Anyway, the original intention when I implemented the deprecation system was that they're hidden unless someone enables debug mode. Developers commonly enable debug mode, so with this policy they'll be shown in-game only to the people who need to see them. The problem with that was that some players also commonly enable debug mode, but I'm pretty sure they can also be turned off in preferences? Hiding them by default is the worst option, I think. It's better to show them to everyone than hide them from everyone if those are the only two options.

I think that basing deprecation messages on the existence of a _server.pbl would be very difficult, as there's no way that I know of to associate a given deprecation message with a specific addon (and showing deprecation messages in all addons just because someone develops one addon is bad). However, it's a very good idea if it can be done.

@Pentarctagon
Copy link
Member

One potential solution would be to add an option somewhere fairly visible if a _server.pbl is present, which would:

  • Disable all add-ons that don't have a _server.pbl or are listed are dependencies of one that does.
  • Reload the cache.
  • Now show all deprecation messages.

@CelticMinstrel
Copy link
Member

That requires a mechanism to disable addons; does that exist now?

@Pentarctagon
Copy link
Member

Pentarctagon commented Aug 22, 2020

It doesn't currently exist. A simple way to do that though would be to add something like -disabled to the end of the add-on folder, and then ignore folders than end with that text when reloading the cache.

@CelticMinstrel
Copy link
Member

That seems like a rather poor method… but I think the basic idea is sound. Instead of checking for folders ending in -disabled, why not just test against a blacklist of disabled plugins? It would be basically the same thing but without requiring folders to be renamed. The blacklist could be either automatic (based on the presence of a _sever.pbl or whatever) or manual (from some new UI for disabling addons). Explicit dependencies would have to override the blacklist, of course…

@AI0867
Copy link
Member

AI0867 commented Aug 24, 2020

While the _server.pbl way sounds great, it will break rather badly in cases of hard dependencies on add-ons that are not your own.

@CelticMinstrel
Copy link
Member

Well, that dependency would be enabled too, obviously… but that also means its deprecation messages would be shown.

@Wedge009 Wedge009 added the Add-ons Issues with the add-ons client and/or server. label Sep 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Add-ons Issues with the add-ons client and/or server. Enhancement Issues that are requests for new features or changes to existing ones. Question Issues that are actually questions rather than problem reports.
Projects
None yet
Development

No branches or pull requests

5 participants