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

NetPlayIndex: Use scm_rev_str instead of scm_desc_str for version check #9898

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Techjar
Copy link
Contributor

@Techjar Techjar commented Jul 16, 2021

Some build systems (i.e. Nix) make it architecturally impossible to acquire the correct scm_desc_str that we normally use for builds, making it basically impossible for users of those to use the NetPlay browser, unless they manually override the version string. Not relying on this string in the first place for any actual functionality beyond display to the user would be beneficial, and using the scm_rev_str instead matches the check on actually joining a session anyways, so it makes sense to do it this way.

This requires a backend change to the NetPlay lobby server, found at dolphin-emu/netplay-index#6

A bit of background: the reason why it is impossible to acquire the git describe output that we use for the scm_desc_str, in the case of Nix, is because Nix is a reproducible build system, and Git by design has a constantly changing index which can't be fetched and hashed in a reproducible way, so it is stripped out at build time (or simply not fetched in the first place) to avoid that problem.

Some build systems (i.e. Nix) make it architecturally impossible to
acquire the correct scm_desc_str that we normally use for builds,
making it basically impossible for users of those to use the NetPlay
browser, unless they manually override the version string. Not relying
on this string in the first place for any actual functionality beyond
display to the user would be beneficial, and using the scm_rev_str
instead matches the check on actually joining a session anyways, so it
makes sense to do it this way.
MatthewCroughan added a commit to MatthewCroughan/nixcfg that referenced this pull request Jul 17, 2021
…e netplay usable in my configuration

It is not possible to use git describe in a pure system like Nix which hashes all inputs, (since the git index changes whenever anybody pushes a branch, etc), so I have set DOLPHIN_WC_DESCRIBE to the first 8 chars of the scm revision instead of the usual expected value since I have no way of retrieving it. Until dolphin-emu/dolphin#9898 is merged I will be unable to use the Netplay browser, but the scm revision is enough to join Netplay sessions.
@Techjar
Copy link
Contributor Author

Techjar commented Jul 20, 2021

Pinging @spycrab to review this since he manages the NetPlay lobby backend.

@leoetlino leoetlino marked this pull request as draft July 21, 2021 10:29
@leoetlino
Copy link
Member

Marking this as draft until the backend is updated.

@Zopolis4
Copy link
Contributor

Zopolis4 commented Dec 5, 2022

Does this PR and the backend PR need to be merged simultaneously?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants