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

Include completion files instead of generating them on the fly #1706

Closed
dmarcoux opened this issue Mar 11, 2019 · 5 comments
Closed

Include completion files instead of generating them on the fly #1706

dmarcoux opened this issue Mar 11, 2019 · 5 comments

Comments

@dmarcoux
Copy link
Contributor

Describe the problem you are trying to solve
I am working on packaging rustup for openSUSE and generating completion files on the fly cannot guarantee reproducible builds (because the generated completion files could differ).

Describe the solution you'd like
I would like that the completion files are included in the source, so they are always the same and are also easily packaged. This is the usual way to do it. Having to redirect the output of commands in a package build system is somewhat weird and unusual.

Notes
The package: https://build.opensuse.org/package/show/home:dmarcoux/rustup.rs

@dwijnand
Copy link
Member

The way that rustup does it is apparently the same way npm completion does it and the way cargo wants to do it too: rust-lang/cargo#6645

Rather than revert back to flat files, could can we continue to generate them in a way that guarantees reproducibility? How does packaging on openSUSE deal with other resources being generated on the fly and reproducibility concerns?

@bmwiedemann
Copy link

From the reproducible builds perspective, it is OK to generate files on the fly as long as this happens in a deterministic way. From echo foo > output to gcc -o output $input it is all fine.
https://github.com/bmwiedemann/theunreproduciblepackage lists 10 known ways of introducing non-determinism. I'll test and report back if any of them applies here - and which.

@bmwiedemann
Copy link

Test done: all outputs of the home:dmarcoux/rustup.rs package are reproducible.

@dmarcoux
Copy link
Contributor Author

Thank you very much @bmwiedemann.

I'm closing this issue.

@dwijnand
Copy link
Member

Excellent news. Thank you, both.

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

No branches or pull requests

3 participants