TASEmulators / TASEmulators/BizHawk

Deprecated Lua functions' warnings are printed every time, flooding the console

Open
#3,689 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

re: Lua API/scripting Request: Feature/Enhancement Tool: Lua Console
Dominant language
C#
Stars
2.8k
Forks
468
PR merge metrics
No merged PRs in 30d

Description

Summary

The way deprecation was handled for BizHawk's bit Lua library in 2.9 basically renders older scripts that utilize it nonfunctional without modification. Because every time you call a bit function, it will create a new warning in the console, which can lag scripts that make extensive use of these functions.

The expected behavior is that it would only warn you once per session.

This was mentioned on Discord by multiple people, and I tested it myself as well.

Edit: from Bizhawk/LuaFunctions, there's apparently a one-liner that removes the deprecation warnings for the bit library: bit = (require "migration_helpers").EmuHawk_pre_2_9_bit();. But this is probably a more general issue with how BizHawk's Lua deprecation warnings work that should be addressed.

Host env.
  • BizHawk 2.9
  • BizHawk 2.9.1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Lua bit library deprecation path and the migration_helpers EmuHawk_pre_2_9_bit helper referenced in the issue. Reproduce on BizHawk 2.9 or 2.9.1 with repeated bit calls, then verify warnings appear only once per session without making older scripts nonfunctional.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, lua
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.