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

Refactoring for SWEST26 handson #3

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Refactoring for SWEST26 handson #3

wants to merge 7 commits into from

Conversation

takasehideki
Copy link

SWEST26でのハンズオンでの利用を想定してリファクタリングしています.
#1#2 の変更も含まれています.

  • .tool-version を整備(ハンズオンには不要だが念のため)
  • Warningをなるべく抑止
  • Endpoint IPを 0.0.0.0 に変更してDocker内部で立ち上げてもアクセスできるようにした
  • http://localhost:4000 なら MIX_ENV=dev でも実行できるのでその手順を記載

```
% mix compile
Compiling 16 files (.ex)
    warning: variable "key_expr" is unused (if the variable is not meant to be used, prefix it with an underscore)
    │
 10 │     key_expr = Map.fetch!(args, :key_expr)
    │     ~~~~~~~~
    │
    └─ lib/zenohex_phoenix_demo/zenohex_manager.ex:10:5: ZenohexPhoenixDemo.ZenohexManager.init/1

    warning: this clause cannot match because a previous clause at line 19 always matches
    │
 21 │     get "/", PageController, :home
    │     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    │
    └─ lib/zenohex_phoenix_demo_web/router.ex:21

    warning: Phoenix.LiveView.Helpers.sigil_L/2 is deprecated. Use ~H instead
    │
 13 │     ~L"""
    │     ~
    │
    └─ lib/zenohex_phoenix_demo_web/live/zenohex_live.ex:13:5: ZenohexPhoenixDemoWeb.ZenohexLive.render/1

    warning: clauses with the same name and arity (number of arguments) should be grouped together, "def handle_event/3" was previously defined (lib/zenohex_phoenix_demo_web/live/zenohex_live.ex:27)
    │
 49 │   def handle_event("send-msg", %{"input_value" => msg}, socket) do
    │       ~
    │
    └─ lib/zenohex_phoenix_demo_web/live/zenohex_live.ex:49:7

    warning: unused alias Subscriber
    │
  3 │   alias Zenohex.Examples.Subscriber
    │   ~
    │
    └─ lib/zenohex_phoenix_demo_web/live/zenohex_live.ex:3:3

    warning: you must require Logger before invoking the macro Logger.error/1
    │
 57 │         Logger.error(inspect(error))
    │                ~
    │
    └─ lib/zenohex_phoenix_demo/zenohex_manager.ex:57:16: ZenohexPhoenixDemo.ZenohexManager.recv_timeout/1

Generated zenohex_phoenix_demo app
```
@takasehideki takasehideki requested a review from s-hosoai August 22, 2024 10:22
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.

1 participant