Dear all,
I have error when try mix phx.server
warning: using map.field notation (without parentheses) to invoke function FileSystem.Backends.FSWindows.bootstrap() is deprecated, you must add parentheses instead: remote.function()
(file_system 0.2.10) lib/file_system/backend.ex:23: FileSystem.Backend.backend/1
(file_system 0.2.10) lib/file_system/worker.ex:18: FileSystem.Worker.init/1
(stdlib 6.1) gen_server.erl:2229: :gen_server.init_it/2
(stdlib 6.1) gen_server.erl:2184: :gen_server.init_it/6
(stdlib 6.1) proc_lib.erl:329: :proc_lib.init_p_do_apply/3
I am using Phoenix 1.7.14, Ellixir 1.17.3 and Erlang 27.1.2 in OS Windows 11
Your (or one of your libβs) dependency file_system
is doing module.bootstrap
instead of module.bootstrap()
.
This was already fixed, see here so the best you can do is to update the dependency or the lib that is using it.
EDIT: Itβs not an error, just a warning.
3 Likes
where the current file code in my phoenix to fix it?
Try this:
mix deps.update file_system
And tell us if it indeed has upgraded the library and if then compilation yielded warnings (or not).
still show the warning Sir
Show us your console output?
C:\Users\Doom\app\phoenix\myapp>mix deps.update file_system
Resolving Hex dependencies...
Resolution completed in 0.232s
Unchanged:
bandit 1.5.3
castore 1.0.8
comeonin 5.4.0
db_connection 2.6.0
decimal 2.1.1
dns_cluster 0.1.3
ecto 3.11.2
ecto_sql 3.11.1
esbuild 0.8.1
expo 0.5.2
file_system 0.2.10
finch 0.18.0
floki 0.36.2
gettext 0.24.0
hpax 0.1.2
jason 1.4.4
mime 2.0.6
mint 1.5.2
nimble_options 1.1.0
nimble_pool 1.0.0
pbkdf2_elixir 2.2.0
phoenix 1.7.14
phoenix_ecto 4.6.2
phoenix_html 4.1.1
phoenix_live_dashboard 0.8.3
phoenix_live_reload 1.4.1
phoenix_live_view 1.0.0-rc.6
phoenix_pubsub 2.1.3
phoenix_template 1.0.4
plug 1.16.1
plug_crypto 2.1.0
postgrex 0.17.4
swoosh 1.15.2
tailwind 0.2.2
telemetry 1.3.0
telemetry_metrics 1.0.0
telemetry_poller 1.0.0
thousand_island 1.3.5
websock 0.5.3
websock_adapter 0.5.7
C:\Users\Doom\app\phoenix\myapp>mix phx.server
warning: using map.field notation (without parentheses) to invoke function FileSystem.Backends.FSWindows.bootstrap() is deprecated, you must add parentheses instead: remote.function()
(file_system 0.2.10) lib/file_system/backend.ex:23: FileSystem.Backend.backend/1
(file_system 0.2.10) lib/file_system/worker.ex:18: FileSystem.Worker.init/1
(stdlib 6.1) gen_server.erl:2229: :gen_server.init_it/2
(stdlib 6.1) gen_server.erl:2184: :gen_server.init_it/6
(stdlib 6.1) proc_lib.erl:329: :proc_lib.init_p_do_apply/3
[info] Running MyappWeb.Endpoint with Bandit 1.5.3 at 127.0.0.1:4000 (http)
[info] Access MyappWeb.Endpoint at http://localhost:4000
[watch] build finished, watching for changes...
Rebuilding...
OK, show us the output of mix deps.update phoenix_live_reload
then.
C:\Users\Doom\app\phoenix\myapp>mix deps.update phoenix_live_reload
Resolving Hex dependencies...
Resolution completed in 0.227s
Unchanged:
bandit 1.5.3
comeonin 5.4.0
db_connection 2.6.0
dns_cluster 0.1.3
ecto 3.11.2
ecto_sql 3.11.1
esbuild 0.8.1
expo 0.5.2
finch 0.18.0
floki 0.36.2
gettext 0.24.0
hpax 0.1.2
jason 1.4.4
mime 2.0.6
mint 1.5.2
nimble_options 1.1.0
nimble_pool 1.0.0
pbkdf2_elixir 2.2.0
phoenix 1.7.14
phoenix_ecto 4.6.2
phoenix_html 4.1.1
phoenix_live_dashboard 0.8.3
phoenix_live_view 1.0.0-rc.6
phoenix_pubsub 2.1.3
phoenix_template 1.0.4
plug 1.16.1
plug_crypto 2.1.0
postgrex 0.17.4
swoosh 1.15.2
tailwind 0.2.2
telemetry 1.3.0
telemetry_metrics 1.0.0
telemetry_poller 1.0.0
websock 0.5.3
Upgraded:
castore 1.0.8 => 1.0.10
decimal 2.1.1 => 2.2.0
file_system 0.2.10 => 1.0.1 (major)
phoenix_live_reload 1.4.1 => 1.5.3
thousand_island 1.3.5 => 1.3.6
websock_adapter 0.5.7 => 0.5.8
* Updating phoenix_live_reload (Hex package)
* Updating thousand_island (Hex package)
* Updating castore (Hex package)
* Updating file_system (Hex package)
* Updating decimal (Hex package)
* Updating websock_adapter (Hex package)
C:\Users\Doom\app\phoenix\myapp>mix phx.server
==> file_system
Compiling 7 files (.ex)
Generated file_system app
==> decimal
Compiling 4 files (.ex)
Generated decimal app
==> thousand_island
Compiling 16 files (.ex)
Generated thousand_island app
==> jason
Compiling 10 files (.ex)
Generated jason app
==> ecto
Compiling 56 files (.ex)
Generated ecto app
==> postgrex
Compiling 68 files (.ex)
Generated postgrex app
==> ecto_sql
Compiling 25 files (.ex)
Generated ecto_sql app
==> castore
Compiling 1 file (.ex)
Generated castore app
==> esbuild
Compiling 4 files (.ex)
Generated esbuild app
==> tailwind
Compiling 3 files (.ex)
warning: Logger.warn/1 is deprecated. Use Logger.warning/2 instead
β
72 β Logger.warn("""
β ~
β
ββ lib/tailwind.ex:72:14: Tailwind.start/2
warning: Logger.warn/1 is deprecated. Use Logger.warning/2 instead
β
86 β Logger.warn("""
β ~
β
ββ lib/tailwind.ex:86:16: Tailwind.start/2
Generated tailwind app
==> mint
Compiling 1 file (.erl)
Compiling 19 files (.ex)
warning: function set_flag/2 is unused
β
69 β defp set_flag(unquote(frame), unquote(flag_name)), do: unquote(flag_value)
β ~
β
ββ lib/mint/http2/frame.ex:69:10: Mint.HTTP2.Frame (module)
Generated mint app
==> finch
Compiling 14 files (.ex)
Generated finch app
==> bandit
Compiling 50 files (.ex)
Generated bandit app
==> swoosh
Compiling 48 files (.ex)
Generated swoosh app
==> websock_adapter
Compiling 4 files (.ex)
Generated websock_adapter app
==> phoenix
Compiling 71 files (.ex)
Generated phoenix app
==> phoenix_live_reload
Compiling 5 files (.ex)
Generated phoenix_live_reload app
==> phoenix_live_view
Compiling 39 files (.ex)
Generated phoenix_live_view app
==> phoenix_live_dashboard
Compiling 36 files (.ex)
warning: Phoenix.LiveView.push_redirect/2 is deprecated. Use push_navigate/2 instead
β
21 β {:ok, push_redirect(socket, to: to)}
β ~
β
ββ lib/phoenix/live_dashboard/pages/metrics_page.ex:21:15: Phoenix.LiveDashboard.MetricsPage.mount/3
ββ lib/phoenix/live_dashboard/pages/metrics_page.ex:30:15: Phoenix.LiveDashboard.MetricsPage.mount/3
warning: Phoenix.LiveView.push_redirect/2 is deprecated. Use push_navigate/2 instead
β
41 β {:ok, push_redirect(socket, to: to)}
β ~
β
ββ lib/phoenix/live_dashboard/pages/request_logger_page.ex:41:11: Phoenix.LiveDashboard.RequestLoggerPage.mount/3
warning: Phoenix.LiveView.push_redirect/2 is deprecated. Use push_navigate/2 instead
β
291 β {:noreply, push_redirect(socket, to: to)}
β ~
β
ββ lib/phoenix/live_dashboard/page_live.ex:291:18: Phoenix.LiveDashboard.PageLive.handle_event/3
ββ lib/phoenix/live_dashboard/page_live.ex:369:5: Phoenix.LiveDashboard.PageLive.redirect_to_current_node/1
Generated phoenix_live_dashboard app
==> phoenix_ecto
Compiling 7 files (.ex)
Generated phoenix_ecto app
==> myweb
Compiling 32 files (.ex)
Generated myapp app
[info] Running MyappWeb.Endpoint with Bandit 1.5.3 at 127.0.0.1:4000 (http)
[info] Access MyappWeb.Endpoint at http://localhost:4000
[watch] build finished, watching for changes...
Rebuilding...
Thankyou Sir, itβs Works, I donβt know to solved another error warning, but at this moment itβs solved
Well, looks like this particular warning is now gone.
You can also try individually upgrading the dependencies that have warnings i.e.
mix deps.update tailwind
mix deps.update mint
mix deps.update phoenix_live_dashboard
But be warned, since LiveView is still not 1.0, stuff might break. Better backup and/or make sure that you can revert the project to where it was before running the commands (usually git revert .
should work).
2 Likes