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

Figure out what to do with previously-commented-out Lua #26

Closed
cooljeanius opened this issue Jun 7, 2022 · 4 comments
Closed

Figure out what to do with previously-commented-out Lua #26

cooljeanius opened this issue Jun 7, 2022 · 4 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed question Further information is requested
Projects

Comments

@cooljeanius
Copy link
Owner

Normally, in languages with a preprocessor (C, WML, autoconf/m4), I like to change commented-out code into ifdef-ed out code instead, so that it's easier to re-enable if necessary. Lua doesn't have a preprocessor, though, AFAIK. So, instead I'll want to find something else to do with the commented-out Lua code: just remove it? Have it guarded by a language-level conditional? If so, what should the guarding conditional generally be? wesnoth.game_config.debug_mode?

@cooljeanius cooljeanius added enhancement New feature or request question Further information is requested help wanted Extra attention is needed labels Jun 7, 2022
@cooljeanius cooljeanius added this to To Do in Wesnoth UMC via automation Jun 9, 2022
@cooljeanius
Copy link
Owner Author

If so, what should the guarding conditional generally be? wesnoth.game_config.debug_mode?

(Note that wesnoth.game_config.debug_mode makes sense for stuff that was commented out due to being debug messages that don't need to be seen in production, but it doesn't make sense for stuff that was commented out due to being broken or buggy... I guess the main issue at hand for this bug, then, is telling the difference between the two...)

cooljeanius added a commit that referenced this issue Oct 28, 2022
progress on #26; still need to figure out what to do with all these calls to dbms() though, as they're intrusive
@cooljeanius cooljeanius mentioned this issue Oct 28, 2022
@cooljeanius
Copy link
Owner Author

working on this

@cooljeanius cooljeanius moved this from To Do to In Progress in Wesnoth UMC Oct 28, 2022
@cooljeanius cooljeanius self-assigned this Oct 28, 2022
@cooljeanius cooljeanius changed the title Figure out what to do with commented-out Lua Figure out what to do with previously-commented-out Lua Nov 4, 2022
@cooljeanius
Copy link
Owner Author

I'll probably want to remove some of those dbms() calls, but for now let's just wait for a response to Elvish-Hunter/Wesnoth_Lua_Pack#6

@cooljeanius
Copy link
Owner Author

ok I think the current handling of them is probably fine; there are still dbms() usages there, but they're extremely highly conditionalized, so I doubt an average player will be running into them.

Wesnoth UMC automation moved this from In Progress to Done Jan 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed question Further information is requested
Projects
Wesnoth UMC
  
Done
Development

No branches or pull requests

1 participant