Giter VIP home page Giter VIP logo

Comments (7)

gerbal avatar gerbal commented on July 21, 2024 1

Supervisor.Spec was soft deprecated in Elixir 1.5.

Should the Docs be changed to reflect the new recommended behaviour?

defmodule SAample.Application do
  @moduledoc false

  use Application
  require Logger

  def start(_type, _args) do
    children = [
      %{
        id: Kaffe.GroupMemberSupervisor,
        start: {Kaffe.GroupMemberSupervisor, :start_link, []},
        type: :supervisor
      }
    ]

    opts = [strategy: :one_for_one, name: Sample.Supervisor]
    Supervisor.start_link(children, opts)
  end
end

from kaffe.

objectuser avatar objectuser commented on July 21, 2024

@stevehebert What behavior are you observing?

from kaffe.

stevehebert avatar stevehebert commented on July 21, 2024

It was my fault. In the line mentioning supervisor(Kaffe.GroupMemberSupervisor, []), I didn't have the #import Supervisor.Spec directive in my .Application. This caused a ** (CompileError) lib/nurburgring/application.ex:16: undefined function supervisor/2 error on compilation.

Not something a seasoned elixir programmer would have run into, but I enjoy and appreciate how accessible and understandable your library is for someone familiar with kafka in other langauges.

from kaffe.

stevehebert avatar stevehebert commented on July 21, 2024

If I were going to change the documentation, I would add that as a reminder. Not sure how everyone feels about such a thing - otherwise we can just close this issue.

Thanks for listening.

from kaffe.

objectuser avatar objectuser commented on July 21, 2024

@stevehebert That's good feedback. Very small addition that would really clarify how to start a consumer. 👍

from kaffe.

davidsantoso avatar davidsantoso commented on July 21, 2024

@gerbal yes that could be a docs update we make.

@objectuser also wondering whether it's worth starting it this way or providing the child spec or is that supported in Elixir < 1.6?

from kaffe.

objectuser avatar objectuser commented on July 21, 2024

I think the docs update would be nice until we get to doing the child spec (which is a good idea).

from kaffe.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.