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

Store formatted variables in a String #3484

Closed
wants to merge 1 commit into from

Conversation

PhilTaken
Copy link

This PR fixes a compilation error when compiling with slightly less recent rust compilers, e.g. 1.78.0 and 1.77.1.

The performance overhead of formatting the string here is negligible in any case since the string is only discarded if there are zero or one variables, in which case the extra call to join is very cheap.

This fixes compilation errors when compiling with slightly less recent
rust compilers, e.g. 1.78.0 and 1.77.1.

The performance overhead of formatting the string here is neglegible in
any case since the string is only discarded if there are zero or one
variables, in which case the extra call to `join` is very cheap.
Copy link
Contributor

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also faced this problem, compiler update helped. I guess it is fine to include.

@lpil
Copy link
Member

lpil commented Aug 4, 2024

Hello! What's the motivation for this? We don't support other Rust versions and we provide precompiled binaries for people to use.

@PhilTaken
Copy link
Author

Personally, I am not a fan of precompiled tools especially when the resulting binaries are not fully reproducible but that is a matter of taste.

This is the only change that would enable retaining compatibility with a rustc version that was just released this May. I'd totally understand if the final decision is not to merge and just to raise the MSRV.

@lpil
Copy link
Member

lpil commented Aug 4, 2024

I'm guessing this is due to Nix? That build tool produces more support requests and takes up more time than all other build tools and operating systems combined. It's clearly documented what we support, and we provide precompiled binaries that work on NixOS without modification to the operating system or the binary, so I don't understand why there are frequent requests to change things in Gleam to facilitate Nix.

Downloading the binary and verifying the checksum is reproducible in the same way that downloading the source, verifying its checksum, and then applying deterministic compilation is reproducible. It is also is known to work, unlike the buggy Nix produced binaries that people report bugs for.

I'm sorry for being abrasive here but the behaviour of the Nix community is very tiring as an open source maintainer.

@lpil lpil closed this Aug 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants