-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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
ruffle_desktop doesn't properly get current time due to "deterministic" build feature #285887
Comments
Maybe we can separate the individual packages into their own derivations? Looks like there is a bit of prior art with sshx here, and it looks like roughly what I'd expect. Not sure what to do for the main There are already some binaries that maybe don't make much sense to include with the main ruffle build anyway, like the I'll try to find a bit of time to look into it now that we've got a newer build of ruffle merged, as it doesn't look too hard. However, I may be a bit busy for the next week or two. |
Oh, the sshx example looks nice, and symlinkJoin seems reasonable to me for the overall package. Though on further reflection, it also seems potentially reasonable to deprecate the top-level ruffle package and give an error suggesting the child packages instead. I'm pretty sure I've seen this sort of behavior before, but I'm not sure what the typical Nixpkgs policy would be for this sort of change. And while I'm somewhat interested in trying to put this together, I'm unlikely to get to it in the near future. If it's still open in a month or two, maybe I'll give it a shot. For the moment though, a local build with |
Hmm... I kind of agree with you, maybe it really is senseless to bother building exporter and friends when all most people want is the player. It'd be nice to have them in nixpkgs, but if we switch over to symlinkJoin with separate derivations, a lot of overlapping code will just get compiled multiple times for no benefit to many users. I wonder if there's a good way to eat our cake and have it too. I'll try to find some prior art. |
Describe the bug
Ruffle desktop currently provides a dummy time (2001-02-03 04:05:06) when a Flash application requests the time.
Steps To Reproduce
Steps to reproduce the behavior:
wget http://www.matsclock.com/matsclock.swf
)ruffle_desktop matsclock.swf
Expected behavior
The application should show the current time.
Additional context
The Ruffle Discord gave me some help here: the problem is that the "deterministic" feature is being set. This is used by Ruffle for testing and other features where they want deterministic output. (So this very reasonably stubs in a fake time rather than using the current time).
Unfortunately, the way Cargo works, features are combined across all packages being built and applied to all of them; in particular, since the exporter uses the deterministic flag and is also being built, that flag gets pushed through the whole build, including ruffle_desktop.
I fixed this by simply changing the cargoBuildFlags to
--package=ruffle_desktop
rather than--workspace
; this builds only the desktop player. However, this would be a regression since we currently build all the packages in the workspace. AFAICT, if we wanted to build the multiple packages, we'd have to do multiple builds. I'm not sure how easy that is; I haven't worked much with Rust in Nix.An alternative would be to patch out the deterministic flag in the various Cargo.toml's; however, I don't know what the impact would be on the other packages of not using that flag.
So I know a couple possible fixes here, but am not sure about the best way. If someone else has some insight, I'd be happy to put together a PR, but wanted to get some feedback first.
Notify maintainers
@jchv
@GovanifY
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.The text was updated successfully, but these errors were encountered: