Skip to content

Conversation

@APB9785
Copy link
Contributor

@APB9785 APB9785 commented May 22, 2025

Resolves #199

This will allow use of recent cowboy-related libs such as cowlib which are becoming increasingly necessary for dependency resolution.

Gun 2.1.0 still uses cowlib 2.13.0 which is over a year old now, and no longer supported by many other libraries

Copy link
Member

@elbrujohalcon elbrujohalcon left a comment

Choose a reason for hiding this comment

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

The update should also be applied to rebar.lock

@APB9785
Copy link
Contributor Author

APB9785 commented May 22, 2025

@elbrujohalcon Thanks for the review! I updated the gun version in rebar.lock, though I'm not very familiar with updating rebar since I usually work in Elixir. So just let me know if I missed anything

@elbrujohalcon
Copy link
Member

elbrujohalcon commented May 23, 2025

@APB9785 Have you tested this change (running rebar3 ct)?

I think you'll need to update other libs in rebar.lock, too.

You can do that like this…

rm -rf _build; rebar3 do unlock --all, upgrade, compile, ct

Even if the tests report errors (it happens to me in OTP27 and I will try to fix it soon - see #201), as long as they run… you can commit your changes.

@APB9785
Copy link
Contributor Author

APB9785 commented May 23, 2025

I'm getting a strange issue running that command

$ rebar3 upgrade
===> Verifying dependencies...
===> Dep cowlib has invalid version >= 2.15.0 and < 3.0.0

the latest cowlib version is 2.15.0 and that should be what we're using.

I tried manually adding cowboy and cowlib deps to ensure we're on the right version, and it still errors, much to my confusion:

===> Verifying dependencies...
===> Fetching cowboy v2.13.0
===> Fetching cowlib v2.15.0
===> Fetching gun v2.2.0
===> Dep cowlib has invalid version >= 2.15.0 and < 3.0.0

Again, I'm new to the world of rebar3 so it's possible I'm doing something wrong. I did try letting Claude 4 Sonnet attempt to fix the problem, but after many iterations it was unable to get it working and gave up.

I also opened this issue in the gun repo in case there's something wrong upstream: ninenines/gun#355

@APB9785
Copy link
Contributor Author

APB9785 commented May 23, 2025

In that issue above, someone pointed out that actually rebar3 is the issue and has been broken in this way for FIVE YEARS 🤯

Fortunately there is a workaround erlang/rebar3#2364 (comment) which seems to be working

@APB9785
Copy link
Contributor Author

APB9785 commented May 23, 2025

===> Running Common Test suites...
%%% shotgun_SUITE: ............
%%% shotgun_async_SUITE: .....
%%% shotgun_unit_SUITE: .......
All 24 tests passed.

@APB9785 APB9785 requested a review from elbrujohalcon May 23, 2025 16:11
@elbrujohalcon elbrujohalcon merged commit 427a489 into inaka:master May 24, 2025
@elbrujohalcon
Copy link
Member

There you go: https://hex.pm/packages/shotgun/1.2.0

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.

Use gun v2.2.0

2 participants