Skip to content

Conversation

torokati44
Copy link
Member

@torokati44 torokati44 commented Sep 22, 2025

This got unblocked by:
bkchr/proc-macro-crate#61
bkchr/proc-macro-crate#62

I hope the serde version requirement in Cargo.toml won't be left behind by Dependabot even though this bumps it in Cargo.lock. - it did.

@torokati44 torokati44 added A-deps Area: Dependencies T-chore Type: Chore (like updating a dependency, it's gotta be done) labels Sep 22, 2025
@torokati44
Copy link
Member Author

(The motivation was the dep duplication noticed in ruffle-rs/ruffle-android#560.)

@torokati44
Copy link
Member Author

torokati44 commented Sep 22, 2025

Hmm, should we:

  • accept the new error message as expected output
  • report the issue upstream as "invalid key no longer reported as invalid"
  • change the test to something even more invalider

(@Dinnerbone?)

I don't think the TOML spec changed, even with 1.1.0, to allow keys with ~ in them.

For easier access:

    thread 'preferences::read::tests::invalid_toml' panicked at desktop/src/preferences/read.rs:112:9:
   assertion `left == right` failed
     left: "Invalid TOML: TOML parse error at line 1, column 1\n  |\n1 | ~~INVALID~~\n  | ^\ninvalid key\n"
    right: "Invalid TOML: TOML parse error at line 1, column 12\n  |\n1 | ~~INVALID~~\n  |            ^\nkey with no value, expected `=`\n"

Multi-line strings expanded:

Invalid TOML: TOML parse error at line 1, column 1
  |
1 | ~~INVALID~~
  | ^
invalid key

vs.

Invalid TOML: TOML parse error at line 1, column 12
  |
1 | ~~INVALID~~
  |            ^
key with no value, expected `=`

(And there's also a similar test in frontend-utils/src/bundle/info.rs, but with ??? as input.)

@torokati44
Copy link
Member Author

Went with the first option for now, please do tell if any of you would prefer something else (as well).

@torokati44 torokati44 added the waiting-on-review Waiting on review from a Ruffle team member label Sep 22, 2025
@torokati44 torokati44 force-pushed the toml_edit-0.9.7 branch 2 times, most recently from 307473f to 819c7ec Compare September 24, 2025 07:23
@kjarosh
Copy link
Member

kjarosh commented Sep 29, 2025

What's the worst case scenario here? How Ruffle will behave if we cannot parse preferences?

@torokati44
Copy link
Member Author

I guess it's just what the test change shows - not exactly the same error message as before, for preference and bundle files with various invalid/broken TOML content.

@kjarosh
Copy link
Member

kjarosh commented Sep 29, 2025

So will Ruffle crash in this case? I think it's important not to remove any user data in this case

@torokati44
Copy link
Member Author

Just tested - if ~/.config/ruffle/preferences.toml contains borked nonsense (similar to the test case changed by this PR), it will be silently ignored, and if any preferences are changed, completely overwritten. Exactly the same way on master as with this PR.

@kjarosh
Copy link
Member

kjarosh commented Sep 29, 2025

Hmmm, we should probably change this behavior. Either backup the preferences or show a popup asking what to do.

I'm worried that changes in TOML parsing can cause such issues and lead to accidental user data deletion.

@torokati44
Copy link
Member Author

torokati44 commented Sep 29, 2025

I highly doubt that any config file written by Ruffle (being valid TOML, not edited by hand) will at any point be considered invalid, and overwritten. And in any case, this would be out of scope for this particular PR.

@kjarosh
Copy link
Member

kjarosh commented Oct 6, 2025

I would check if this key works with a value, it may be the case that just the order of validations changed. If it does, we should file an issue, if it doesn't this PR LGTM.

@moulins
Copy link
Contributor

moulins commented Oct 9, 2025

Changing the invalid TOML in the test to ~~INVALID~~ = 1 still gives an error:

Invalid TOML: TOML parse error at line 1, column 1
  |
1 | ~~INVALID~~ = 1
  | ^
invalid unquoted key, expected letters, numbers, `-`, `_`

so this looks indeed like the order of validations changed.

@torokati44 torokati44 enabled auto-merge (rebase) October 10, 2025 10:24
@torokati44
Copy link
Member Author

Thank you for your testing and inputs!

@torokati44 torokati44 merged commit 2998f30 into ruffle-rs:master Oct 10, 2025
37 of 38 checks passed
Hancock33 added a commit to Hancock33/batocera.piboy that referenced this pull request Oct 12, 2025
--------------------------------------------------------------------------------------------------------
batocera-emulationstation.mk 126b3da87d6da5792a241ef49ff62ccef5f564aa # Version: Commits on Oct 11, 2025
--------------------------------------------------------------------------------------------------------
Merge pull request #1978 from dmanlfc/fix-leds

fix led file locations with latest kernel module bumps,

------------------------------------------------------------------------------------------------
batocera-es-piboy.mk 126b3da87d6da5792a241ef49ff62ccef5f564aa # Version: Commits on Oct 11, 2025
------------------------------------------------------------------------------------------------
Merge pull request #1978 from dmanlfc/fix-leds

fix led file locations with latest kernel module bumps,

------------------------------------------------------------------------------------------
duckstation.mk a1c177402b2f3029ba1de19cd0ae4320ead62ca0 # Version: Commits on Oct 11, 2025
------------------------------------------------------------------------------------------
CI: Fix AppImage build (again)

So tired of this silly OS...,

-----------------------------------------------------------------------------------
eden.mk 91493fa39bb40288b2005a705fbc27713ca3e906 # Version: Commits on Oct 11, 2025
-----------------------------------------------------------------------------------
[vk] Fast UBO: fix tracking (#2712)

--------------------------------------------------------------------------------------
flycast.mk fd654614ae47aabe460b3d7dc0077f7ce84bb159 # Version: Commits on Oct 10, 2025
--------------------------------------------------------------------------------------
Fetch translations & Recreate libretro_core_options_intl.h,

-------------------------------------------------------------------------------------
ikemen.mk d5a582fe50312e431274fdc3b059b7e24382872f # Version: Commits on Oct 11, 2025
-------------------------------------------------------------------------------------
Merge pull request #2767 from NeatUnsou/develop

fix: Doesn't turn around in state 52,

--------------------------------------------------------------------------------------
openmsx.mk b3ad1281627cd7018fd49356a284100ddec1c0fc # Version: Commits on Oct 11, 2025
--------------------------------------------------------------------------------------
Yamanooto: scc-visibility-check uses the raw-bank registers ...

... not adjusted with offset register.

Thanks a lot to 'artag' for reporting / investigating / testing.

This should fix: openMSX/openMSX#1992,

----------------------------------------------------
pcsx2.mk v2.5.216 # Version: Commits on Oct 11, 2025
----------------------------------------------------
- Misc: Qt 6.10.0 Build Fixes

,

---------------------------------------------------------------
ruffle.mk nightly-2025-10-11 # Version: Commits on Oct 11, 2025
---------------------------------------------------------------
## What's Changed

* chore: Update `toml` to `0.9.7`, `toml_edit` to `0.23.6` by @torokati44 in ruffle-rs/ruffle#21731

* ci: Don't check webgl code coverage by @danielhjacobs in ruffle-rs/ruffle#21881

**Full Changelog**: ruffle-rs/ruffle@nightly-2025-10-10...nightly-2025-10-11,

-----------------------------------------------------
ryujinx.mk 1.3.151 # Version: Commits on Oct 11, 2025
-----------------------------------------------------
Canary-1.3.151

-----------------------------------------------------------------------------------
ymir.mk 21b679cf664ca543a47aa797d479c92053d45af5 # Version: Commits on Oct 11, 2025
-----------------------------------------------------------------------------------
chore: Include semver library to parse Ymir's version strings,

------------------------------------------------------------------------------------
box64.mk 56b4de3b845e6389d1072d3fd594e0429cf1a939 # Version: Commits on Oct 10, 2025
------------------------------------------------------------------------------------
[DYNAREC] Fixed some oversized memory load (#3051)

* [DYNAREC] Fixed some oversized memory load

* review,

---------------------------------------------------------------------------------------
corsixth.mk 5a34673b945935eb71b6ad545c000b326c87a4ff # Version: Commits on Oct 11, 2025
---------------------------------------------------------------------------------------
Add ttf shadow option (#3066)

The shadow supports arbitrary pixel offsets and color, and extends the

text box accordingly. The default settings match the common shadow used

in CorsixTH.

The default UI font now uses the shadow which helps it pop.,

------------------------------------------------------------------------------------------
devilutionx.mk 5c320cc9d46a1a941749b3d2d080cee9f41ae51f # Version: Commits on Oct 11, 2025
------------------------------------------------------------------------------------------
SDL3: Set app metadata,

--------------------------------------------------------------------------------------
omf2097.mk 4eed497d73cb2565bcf82b21843d32066eb31810 # Version: Commits on Oct 10, 2025
--------------------------------------------------------------------------------------
Merge pull request #1323 from omf2097/docs/agents-md

AGENTS.md,

--------------------------------------------------------------------------------------
stalker.mk 8369fdafe81a5d978cbd97c06eb43cceec9c4ed5 # Version: Commits on Oct 11, 2025
--------------------------------------------------------------------------------------
Real fix for rain graphical bugs,

----------------------------------------------------------------------------------------
supertux2.mk fc8b836d1cb62d9c321816b6d612ab6c91a5ca37 # Version: Commits on Oct 10, 2025
----------------------------------------------------------------------------------------
cppcheck performance fixes,

----------------------------------------------------------------------------------------
retroarch.mk 328e4ce825f1f1288b5fb9367d6257ad0d419173 # Version: Commits on Oct 11, 2025
----------------------------------------------------------------------------------------
Fetch translations from Crowdin,

----------------------------------------------------------------------------------------
doomretro.mk 9e43172aee84934bb9ab5eb0e1b6bf603f8a96d8 # Version: Commits on Oct 11, 2025
----------------------------------------------------------------------------------------
More minor tweaks,

-------------------------------------------------------------------------------------
gzdoom.mk 7f4f8c539bd6d2c720b6847f14ba41b37037c922 # Version: Commits on Oct 11, 2025
-------------------------------------------------------------------------------------
support skull keys in Chex Quest.

Note that CQ3 provides its own lock definitions so these are only for the original Chex Quest.,

-----------------------------------------------------------------------------------
tr1x.mk 328353b3a6bfb391ea92ea60a70b8dc7af92074e # Version: Commits on Oct 10, 2025
-----------------------------------------------------------------------------------
Merge branch 'stable' into develop,

-----------------------------------------------------------------------------------
tr2x.mk 328353b3a6bfb391ea92ea60a70b8dc7af92074e # Version: Commits on Oct 10, 2025
-----------------------------------------------------------------------------------
Merge branch 'stable' into develop,

-----------------------------------------------------------------------------------------------
libretro-flycast.mk fd654614ae47aabe460b3d7dc0077f7ce84bb159 # Version: Commits on Oct 10, 2025
-----------------------------------------------------------------------------------------------
Fetch translations & Recreate libretro_core_options_intl.h,

---------------------------------------------------------------------------------------------
libretro-vba-m.mk f91eba5c761a810e7182a56ae69f89e781ed1ea1 # Version: Commits on Oct 11, 2025
---------------------------------------------------------------------------------------------
translations: transifex pull

Signed-off-by: Rafael Kitover <[email protected]>,

--------------------------------------------------------------------------------------------
slang-shaders.mk 27193b89f432e2dc38f83e0ab8a2cfb2cf4c772f # Version: Commits on Oct 10, 2025
--------------------------------------------------------------------------------------------
Update Game Boy shader to v1.0 with fullscreen mode (#743)

* Update Game Boy shader to v1.0 with fullscreen mode

Adds fullscreen scaling support and numerous improvements to the Game Boy dot matrix shader:

- Fullscreen mode with anti-aliased dot matrix effect that scales to any screen size

- Display mode toggle (fullscreen / max integer / specific scale factor)

- Built-in palette presets for quick swapping while maintaining image palette support

- Drop shadow ON/OFF toggle

- Two brightness calculation modes (original and perceptual) for different visual looks

- Optimizes performance with vertex shader pre-calculations and early fragment exits

- Reorganizes and centralizes shared parameters for improved user experience

- Fixes artifacts that sometimes appeared in border region

- Updates console-border alt shaders for compatibility

- Adds gbc-dmg and gba-dmg console-border presets

Files modified:

- gb-pass0.slang - Core dot matrix generation with new scaling modes

- gb-pass1.slang - Header updates

- gb-pass2.slang - Header updates

- gb-pass3.slang - Header updates

- gb-pass4.slang - Drop shadow toggle

- handheld gameboy presets - Specified response time

- console-border alt presets - Compatibility with v1.0

New files:

- gb-params.inc - Shared parameter definitions

- gb-pass5.slang - Console border support

- console-border/gbc-dmg.slangp - Console border preset

- console-border/gba-dmg.slangp - Console border preset

* Refactor fullscreen pixel rendering with shape control

Add circular/rectangular pixel blend and numerical grey balance

compensation for improved visual accuracy and user control.

User-facing changes:

• New pixel_shape parameter blends between circular and rectangular dots

• Unified pixel_softness control replaces confusing sigmoid_blend

• Improved sharpening_amount parameter for clearer behavior

• Resolution-aware shadow scaling maintains consistent appearance

• Reduced default shadow offsets for better out-of-box appearance

Technical improvements:

• Replace analytical grey balance formula with 16-point numerical sampling

  for accurate compensation across all parameter combinations

• Move grey balance calculation to vertex shader (per-frame vs per-pixel)

• Dual-method rendering: separable 1D (rectangular) and 2D (circular)

  intersection with pixel_shape blend parameter

• Shadow offset now scales with display resolution relative to 640×480

  reference, with shadow_scale toggle for user control

Files modified:

• gb-params.inc - Reorganized fullscreen pixel parameters, added

  pixel_shape, pixel_softness, sharpening_amount, and shadow_scale

• gb-pass0.slang - Implemented numerical compensation system with

  coverage sampling functions moved to vertex shader (+194 lines)

• gb-pass4.slang - Added resolution-aware shadow scaling calculation

This addresses grey balance drift when adjusting pixel appearance while

maintaining backward compatibility with default parameter values.

* Fixed scale factor parameter

Video scale parameter now has a lower end of 2.0 as 1.0 breaks output.

* Fix gb-pocket-alt.slangp parameters to match previous versoin,
@Lord-McSweeney Lord-McSweeney removed the waiting-on-review Waiting on review from a Ruffle team member label Oct 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-deps Area: Dependencies T-chore Type: Chore (like updating a dependency, it's gotta be done)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants