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

Bump gleam version constraint from 0.32.0 to 1.1.0 to allow @internal usage in dependencies #97

Conversation

ducdetronquito
Copy link
Contributor

@ducdetronquito ducdetronquito commented Sep 16, 2024

Hello !

I was trying Gleam 1.5.0rc1 on wisp and it now produces a build warning because wisp targets gleam >= 0.32.0 but it depends on gleam_otp and glisten which make use of @internal annotations that are only available since gleam 1.1.0.

Here is the build output prior to bumping the gleam target version:

❯ gleam build
Downloading packages
 Downloaded 22 packages in 0.06s
  Compiling gleam_stdlib
  Compiling ranger
  Compiling birl
  Compiling envoy
  Compiling gleam_erlang
  Compiling filepath
  Compiling simplifile
  Compiling directories
  Compiling exception
  Compiling gleam_crypto
  Compiling gleam_http
  Compiling thoas
===> Fetching rebar3_ex_doc v0.2.23
===> Analyzing applications...
===> Compiling rebar3_ex_doc
===> Fetching rebar3_hex v7.0.8
===> Fetching hex_core v0.10.1
===> Fetching verl v1.1.1
===> Analyzing applications...
===> Compiling verl
===> Compiling hex_core
===> Compiling rebar3_hex
===> Analyzing applications...
===> Compiling thoas
  Compiling gleam_json
  Compiling gleam_otp
warning: Incompatible gleam version range
    ┌─ /wisp/build/packages/gleam_otp/src/gleam/otp/static_supervisor.gleam:302:1
    │
302 │ @internal
    │ ^^^^^^^^^ This requires a Gleam version >= 1.1.0

The `@internal` annotation was introduced in version v1.1.0. But the Gleam
version range specified in your `gleam.toml` would allow this code to run
on an earlier version like v0.32.0, resulting in compilation errors!
Hint: Remove the version constraint from your `gleam.toml` or update it to be:

    gleam = ">= 1.1.0"

  Compiling gleeunit
  Compiling logging
  Compiling telemetry
===> Analyzing applications...
===> Compiling telemetry
  Compiling glisten
warning: Incompatible gleam version range
   ┌─ /wisp/build/packages/glisten/src/glisten.gleam:92:1
   │
92 │ @internal
   │ ^^^^^^^^^ This requires a Gleam version >= 1.1.0

The `@internal` annotation was introduced in version v1.1.0. But the Gleam
version range specified in your `gleam.toml` would allow this code to run
on an earlier version like v1.0.0, resulting in compilation errors!
Hint: Remove the version constraint from your `gleam.toml` or update it to be:

    gleam = ">= 1.1.0"

  Compiling gramps
  Compiling hpack_erl
===> Analyzing applications...
===> Compiling hpack
  Compiling marceau
  Compiling mist
  Compiling wisp
   Compiled in 11.13s

@ducdetronquito ducdetronquito force-pushed the bump-gleam-version-constraint-to-avoid-build-warnings branch 3 times, most recently from 3acc6ff to 7ad37c1 Compare September 16, 2024 08:56
…nternal` usage

Gleam 1.5.0rc1 produce a new build warning because wisp targets gleam >= 0.32.0
but gleam_otp and glisten make use of `@internal` annotations.

> The `@internal` annotation was introduced in version v1.1.0. But the Gleam
version range specified in your `gleam.toml` would allow this code to run
on an earlier version like v0.32.0, resulting in compilation errors!
@ducdetronquito ducdetronquito force-pushed the bump-gleam-version-constraint-to-avoid-build-warnings branch from 7ad37c1 to 352dde8 Compare September 16, 2024 09:26
Copy link
Collaborator

@lpil lpil left a comment

Choose a reason for hiding this comment

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

Thank you

@lpil lpil merged commit 9daa80c into gleam-wisp:main Sep 17, 2024
1 check passed
@ducdetronquito ducdetronquito deleted the bump-gleam-version-constraint-to-avoid-build-warnings branch September 17, 2024 14:47
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.

2 participants