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

SCons: Fix silence_msvc regression #90626

Merged
merged 1 commit into from
Apr 13, 2024

Conversation

Repiteo
Copy link
Contributor

@Repiteo Repiteo commented Apr 13, 2024

Fixes #90617

While I couldn't directly recreate the situation in the issue, knowing that the problem was a UnicodeDecodeError made solving it mercifully straightforward. Instead of the direct approach via my text-based method, this adopts a process closer to what's used in SCons natively: parsing as bytes initially & decoding after the fact with the error handler "replace"1. This would've been quite bulky if it remained a one-liner, so the logic has been spread out; consequently, performance should be improved by gathering a file's content exactly once & performing a decode only if it's guaranteed to be an error.

Footnotes

  1. https://docs.python.org/3/library/codecs.html#error-handlers

@akien-mga akien-mga merged commit 43b32f9 into godotengine:master Apr 13, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

@Repiteo Repiteo deleted the scons/msvc-sucks-eggs branch April 13, 2024 15:32
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.

Scons: UnicodeDecodeError when building with MSVC on Windows
3 participants