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

Upgrade deprecated modules #81

Open
Tracked by #76
fkrause98 opened this issue Aug 28, 2024 · 0 comments · May be fixed by #86
Open
Tracked by #76

Upgrade deprecated modules #81

fkrause98 opened this issue Aug 28, 2024 · 0 comments · May be fixed by #86

Comments

@fkrause98
Copy link
Contributor

fkrause98 commented Aug 28, 2024

How to replicate

  1. Place yourself at the root of the project.
  2. Make sure you're using Erlang 27.
  3. Run make test PROFILE=travis (maybe you'll have to run this differently If the CI update is merged by then).
  4. You should see a lot of warnings:
===> Compiling ranch
_build/default/lib/ranch/src/ranch_ssl.erl:128:7: Warning: ssl:ssl_accept/2 is removed; use ssl_handshake/1,2,3 instead
_build/default/lib/ranch/src/ranch_ssl.erl:233:9: Warning: ssl:cipher_suites/0 is removed; use cipher_suites/2,3 instead
_build/default/lib/ranch/src/ranch_ssl.erl:235:4: Warning: ssl:cipher_suites/0 is removed; use cipher_suites/2,3 instead

===> Compiling cowlib
===> Compiling gun
_build/default/lib/gun/src/gun.erl:533:29: Warning: erlang:get_stacktrace/0 is removed; use the new try/catch syntax for retrieving the stack backtrace

===> Compiling jsx
===> Compiling cowboy
_build/default/lib/cowboy/src/cowboy_handler.erl:47:31: Warning: erlang:get_stacktrace/0 is removed; use the new try/catch syntax for retrieving the stack backtrace

_build/default/lib/cowboy/src/cowboy_loop.erl:68:31: Warning: erlang:get_stacktrace/0 is removed; use the new try/catch syntax for retrieving the stack backtrace

_build/default/lib/cowboy/src/cowboy_stream_h.erl:230:17: Warning: erlang:get_stacktrace/0 is removed; use the new try/catch syntax for retrieving the stack backtrace
_build/default/lib/cowboy/src/cowboy_stream_h.erl:235:17: Warning: erlang:get_stacktrace/0 is removed; use the new try/catch syntax for retrieving the stack backtrace
_build/default/lib/cowboy/src/cowboy_stream_h.erl:239:32: Warning: erlang:get_stacktrace/0 is removed; use the new try/catch syntax for retrieving the stack backtrace

_build/default/lib/cowboy/src/cowboy_req.erl:205:6: Warning: erlang:get_stacktrace/0 is removed; use the new try/catch syntax for retrieving the stack backtrace
_build/default/lib/cowboy/src/cowboy_req.erl:396:6: Warning: erlang:get_stacktrace/0 is removed; use the new try/catch syntax for retrieving the stack backtrace
_build/default/lib/cowboy/src/cowboy_req.erl:496:8: Warning: erlang:get_stacktrace/0 is removed; use the new try/catch syntax for retrieving the stack backtrace
_build/default/lib/cowboy/src/cowboy_req.erl:549:6: Warning: erlang:get_stacktrace/0 is removed; use the new try/catch syntax for retrieving the stack backtrace

_build/default/lib/cowboy/src/cowboy_websocket.erl:379:31: Warning: erlang:get_stacktrace/0 is removed; use the new try/catch syntax for retrieving the stack backtrace

_build/default/lib/cowboy/src/cowboy_rest.erl:1213:30: Warning: erlang:get_stacktrace/0 is removed; use the new try/catch syntax for retrieving the stack backtrace

_build/default/lib/cowboy/src/cowboy_http2.erl:342:24: Warning: erlang:get_stacktrace/0 is removed; use the new try/catch syntax for retrieving the stack backtrace
_build/default/lib/cowboy/src/cowboy_http2.erl:506:24: Warning: erlang:get_stacktrace/0 is removed; use the new try/catch syntax for retrieving the stack backtrace
_build/default/lib/cowboy/src/cowboy_http2.erl:1018:22: Warning: erlang:get_stacktrace/0 is removed; use the new try/catch syntax for retrieving the stack backtrace
_build/default/lib/cowboy/src/cowboy_http2.erl:1040:22: Warning: erlang:get_stacktrace/0 is removed; use the new try/catch syntax for retrieving the stack backtrace
_build/default/lib/cowboy/src/cowboy_http2.erl:1120:22: Warning: erlang:get_stacktrace/0 is removed; use the new try/catch syntax for retrieving the stack backtrace

_build/default/lib/cowboy/src/cowboy_http.erl:289:22: Warning: erlang:get_stacktrace/0 is removed; use the new try/catch syntax for retrieving the stack backtrace
_build/default/lib/cowboy/src/cowboy_http.erl:306:22: Warning: erlang:get_stacktrace/0 is removed; use the new try/catch syntax for retrieving the stack backtrace
_build/default/lib/cowboy/src/cowboy_http.erl:803:24: Warning: erlang:get_stacktrace/0 is removed; use the new try/catch syntax for retrieving the stack backtrace
_build/default/lib/cowboy/src/cowboy_http.erl:1117:22: Warning: erlang:get_stacktrace/0 is removed; use the new try/catch syntax for retrieving the stack backtrace
_build/default/lib/cowboy/src/cowboy_http.erl:1203:22: Warning: erlang:get_stacktrace/0 is removed; use the new try/catch syntax for retrieving the stack backtrace

===> Analyzing applications...
===> Compiling shortly
solution/shortly_syn.erl:19:5: Warning: pg2:leave/2 is removed; this module was removed in OTP 24. Use 'pg' instead

solution/shortly_notification_pg2.erl:13:5: Warning: pg2:create/1 is removed; this module was removed in OTP 24. Use 'pg' instead
solution/shortly_notification_pg2.erl:16:5: Warning: pg2:join/2 is removed; this module was removed in OTP 24. Use 'pg' instead
solution/shortly_notification_pg2.erl:19:5: Warning: pg2:leave/2 is removed; this module was removed in OTP 24. Use 'pg' instead
solution/shortly_notification_pg2.erl:22:12: Warning: pg2:get_members/1 is removed; this module was removed in OTP 24. Use 'pg' instead

test/shortly_shortener_SUITE.erl:102:15: Warning: http_uri:encode/1 is deprecated and will be removed in OTP 26; use uri_string:quote function instead

Fix

On the surface level, the fixes seem to be mostly version bumps and replace old functions with their new equivalents.
So I suggest doing this on a single PR/Issue, if it gets messy, we should split this into a bunch of issues tracking each one.

@fkrause98 fkrause98 mentioned this issue Aug 28, 2024
6 tasks
@fkrause98 fkrause98 changed the title Check process-related exercises are up-to-date, since there have been some changes since they were written, eg: OTP-25 deprecated some modules. Upgrade deprecated modules Aug 29, 2024
@fkrause98 fkrause98 linked a pull request Sep 6, 2024 that will close this issue
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 a pull request may close this issue.

1 participant