Skip to content

Commit e7bdf1d

Browse files
committed
Update TODOs and deprecations
1 parent 5a3233c commit e7bdf1d

File tree

6 files changed

+6
-23
lines changed

6 files changed

+6
-23
lines changed

lib/elixir/lib/code.ex

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1783,17 +1783,8 @@ defmodule Code do
17831783
{:error, {:invalid_chunk, bin}}
17841784
end
17851785

1786-
@doc ~S"""
1787-
Deprecated function to retrieve old documentation format.
1788-
1789-
Elixir v1.7 adopts [EEP 48](https://www.erlang.org/eeps/eep-0048.html)
1790-
which is a new documentation format meant to be shared across all
1791-
BEAM languages. The old format, used by `Code.get_docs/2`, is no
1792-
longer available, and therefore this function always returns `nil`.
1793-
Use `Code.fetch_docs/1` instead.
1794-
"""
1786+
@doc false
17951787
@deprecated "Code.get_docs/2 always returns nil as its outdated documentation is no longer stored on BEAM files. Use Code.fetch_docs/1 instead"
1796-
@spec get_docs(module, :moduledoc | :docs | :callback_docs | :type_docs | :all) :: nil
17971788
def get_docs(_module, _kind) do
17981789
nil
17991790
end

lib/elixir/lib/config.ex

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,8 +321,6 @@ defmodule Config do
321321
:ok
322322
end
323323

324-
# TODO: Emit a warning if Mix.env() is found in said files in Elixir v1.15.
325-
# Note this won't be a deprecation warning as it will always be emitted.
326324
Code.eval_string(contents, [], file: file)
327325
end
328326

lib/elixir/lib/enum.ex

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2912,11 +2912,7 @@ defmodule Enum do
29122912
@spec slice(t, Range.t()) :: list
29132913
def slice(enumerable, first..last//step = index_range) do
29142914
# TODO: Deprecate negative steps on Elixir v1.16
2915-
# TODO: There are two features we can add to slicing ranges:
2916-
# 1. We can allow the step to be any positive number
2917-
# 2. We can allow slice and reverse at the same time. However, we can't
2918-
# implement so right now. First we will have to raise if a decreasing
2919-
# range is given on Elixir v2.0.
2915+
# TODO: Support negative steps as a reverse on Elixir v2.0.
29202916
cond do
29212917
step > 0 ->
29222918
slice_range(enumerable, first, last, step)

lib/elixir/lib/module.ex

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1282,7 +1282,6 @@ defmodule Module do
12821282
only an interest in fetching the kind and the metadata
12831283
12841284
"""
1285-
# TODO: Deprecate :nillify_clauses in options on Elixir v1.16
12861285
@spec get_definition(module, definition, keyword) ::
12871286
{:v1, def_kind, meta :: keyword,
12881287
[{meta :: keyword, arguments :: [Macro.t()], guards :: [Macro.t()], Macro.t()}]}

lib/elixir/src/elixir.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ env_for_eval(#{lexical_tracker := Pid} = Env) ->
188188
false ->
189189
NewEnv#{tracers := []}
190190
end;
191-
%% TODO: Deprecate all options except line and file on v1.15.
191+
%% TODO: Deprecate all options except line, file, module, and function on v1.15.
192192
env_for_eval(Opts) when is_list(Opts) ->
193193
Env = elixir_env:new(),
194194

lib/elixir/test/elixir/inspect_test.exs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
Code.require_file("test_helper.exs", __DIR__)
22

33
# This is to temporarily test some inconsistencies in
4-
# the error ArgumentError messages
5-
# https://github.com/erlang/otp/issues/5440
6-
# TODO: once fixed in OTP and that minimum version is required,
7-
# please remove MyArgumentError and replace the calls to:
4+
# the error ArgumentError messages.
5+
# Remove MyArgumentError and replace the calls to:
86
# - MyArgumentError with ArgumentError
97
# - MyArgumentError.culprit() with Atom.to_string("Foo")
8+
# in Erlang/OTP 25
109
defmodule MyArgumentError do
1110
defexception message: "argument error"
1211

0 commit comments

Comments
 (0)