Warning: module attribute @since was set but never used

I was adding @since blocks to functions in my module, but I’m getting a bunch of warnings during compilation (Elixir v1.13.2):

warning: module attribute @since was set but never used

My module defines functions like this:

  @doc """
  My function
  """
  @since "0.2.0"
  @spec thing(any()) :: any()
  def thing(x) do
    x
  end

Am I using @since incorrectly?

In recent Elixirs (at least from 1.10) the syntax is @doc since: "0.2.0".

4 Likes

Thanks!