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

fix a bug where publishing to hex would fail if the description in gl… #3077

Merged
merged 4 commits into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@
when building them locally. It is still added when publishing to Hex.
([Pi-Cla](https://github.com/Pi-Cla))

- Fixed a bug where having utf8 symbols in `gleam.toml`'s description value
would result in an HTTP 500 error when running `gleam publish`.

([inoas](https://github.com/inoas))

### Compiler

- The compiler will now raise a warning for `let assert` assignments where the
Expand Down
6 changes: 3 additions & 3 deletions compiler-cli/src/publish.rs
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ impl<'a> ReleaseMetadata<'a> {
r#"{{<<"name">>, <<"{name}">>}}.
{{<<"app">>, <<"{name}">>}}.
{{<<"version">>, <<"{version}">>}}.
{{<<"description">>, <<"{description}">>}}.
{{<<"description">>, <<"{description}"/utf8>>}}.
{{<<"licenses">>, [{licenses}]}}.
{{<<"build_tools">>, [{build_tools}]}}.
{{<<"links">>, [{links}
Expand Down Expand Up @@ -600,7 +600,7 @@ fn release_metadata_as_erlang() {
let meta = ReleaseMetadata {
name: "myapp",
version: &version,
description: "description goes here",
description: "description goes here 🌈",
Copy link
Member

Choose a reason for hiding this comment

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

Love it!

source_files: &[
Utf8PathBuf::from("gleam.toml"),
Utf8PathBuf::from("src/thingy.gleam"),
Expand Down Expand Up @@ -630,7 +630,7 @@ fn release_metadata_as_erlang() {
r#"{<<"name">>, <<"myapp">>}.
{<<"app">>, <<"myapp">>}.
{<<"version">>, <<"1.2.3">>}.
{<<"description">>, <<"description goes here">>}.
{<<"description">>, <<"description goes here 🌈"/utf8>>}.
{<<"licenses">>, [<<"MIT">>, <<"MPL-2.0">>]}.
{<<"build_tools">>, [<<"gleam">>, <<"rebar3">>]}.
{<<"links">>, [
Expand Down
Loading