Repository navigation
Find scenes on Linux players (#184) - #189
Conversation
9a09166 to
634e57e
Compare
2b334c4 to
dd26822
Compare
CryZe
left a comment
There was a problem hiding this comment.
The Linux scene-manager implementation passed independent native ASR reader tests against real running Unity 5.6.7 Mono, 2022.2 IL2CPP, and 6000.6 IL2CPP players. Those checks covered both loaded scenes and their paths/indices, active roots, nested/inactive children, persistent roots, and managed components. The normal all-feature and unity-without-alloc tests also pass.
Requesting one API-contract change before merging: automatic scene attachment should explicitly require alloc, consistent with the Mono automatic-attachment API. Please gate both SceneManager::attach and SceneManager::wait_attach on alloc and document that requirement, including the need for a global allocator in a no_std auto splitter. Scene-reading operations can remain allocation-free. We accept the source-level availability change; please do not introduce fixed-size executable-path buffers or retain silently incomplete automatic attachment to preserve no-alloc compatibility.
The inline comment includes the real-player reproduction and requested fix.
|
Implemented the requested allocation/API fix directly on this branch at the maintainer's request. Updated: the branch is now rebased onto current master (600c60d), and the fix commit was amended to d9308d9. Public API change: All dead-code allowances introduced by the initial fix have been removed. Instead, profile tables, the scanner helper, and attachment-only profile fields/types are compiled only for allocation-enabled builds or tests. The Mac profile and binary-format variant are allocation-only. The allocation-free readers retain their path/reference modes and explicitly select the supported modes, without warning suppression. Added a regression test that automatically attaches an executable-only Linux player and checks that Verification of the amended commit:
No temporary real-player probes were included in the commit. |
83b21ab to
d9308d9
Compare
CryZe
left a comment
There was a problem hiding this comment.
The allocation requirement is now explicit in the public automatic-attachment API, and feature-disabled helpers are conditionally compiled without dead-code allowances. The branch is rebased onto current master. All seven CI checks passed on this head; local verification also passed with and without alloc, including scene/object/component reads on real Unity 5.6.7, 2022.2, and 6000.6 Linux players.
|
Hey, small request: when you ask me for changes, could you leave them to me instead of pushing a commit and merging? I had the alloc change for this done and tested against all the fixture players when it got merged. If something's urgent or you'd rather do it yourself, that's totally fine, just say so in the review so we don't both do it. One thing in d9308d9 I'd change back: the |
|
Yeah this was an exception, cause a Codex usage reset was imminent and also I wanted to go to bed, so I let Codex do some more work instead of just waiting for you to make the changes. Likely won't happen again. |
Closes #184.
The scene manager now finds scenes on Linux players. A Linux player takes a measured build from a new Linux x64 table by the version string in its engine module, the same way a Windows player takes one by its file version.
engine_modulealso takes the game's executable on Linux, since Linux players up to 2019.2 link the engine into it.linux_builds.rshas 17 entries from 5.6.0f1 to 6000.6.0f1. I measured each one on a running player with the fixture scenes. Every offset equals the Windows x64 build that the same version takes, so only the anchors differ. 7 anchors cover every player, and each one hits once on the right global across its range.MACHO_X64.pe_headertest helper had 2 raw NUL bytes, which are\0escapes now.I measured 67 Linux players: the 62 fixture players plus 2019.2.0f1, 2019.3.0f6, 2019.4.41f2, 2020.1.0f1, 2020.2.0f1 and 2020.3.38f1. The harness passes on all 62 fixture players once #187 is in.
Since the Linux offsets are copies of the Windows ones, would you rather have one layout table for every OS with only the anchors kept per OS? That would also make room for Mac. I kept them apart for now so this PR doesn't touch the Windows table.
cargo test --features unity,alloc --lib. The new tests cover the ELF executable lookup and a Linux player taking its Linux build.Depends on #188.