Skip to content

Commit 10cc7e9

Browse files
committed
Ensure more deprecated functionality is removed from coverage
1 parent f3e8ceb commit 10cc7e9

File tree

7 files changed

+31
-6
lines changed

7 files changed

+31
-6
lines changed

Makefile

+1-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ GIT_TAG = $(strip $(shell head="$(call GIT_REVISION)"; git tag --points-at $$hea
2626
SOURCE_DATE_EPOCH_PATH = lib/elixir/tmp/ebin_reproducible
2727
SOURCE_DATE_EPOCH_FILE = $(SOURCE_DATE_EPOCH_PATH)/SOURCE_DATE_EPOCH
2828

29-
.PHONY: install install_man build_plt clean_plt dialyze test check_reproducible clean clean_elixir clean_man format docs Docs.zip Precompiled.zip zips
29+
.PHONY: cover install install_man build_plt clean_plt dialyze test check_reproducible clean clean_elixir clean_man format docs Docs.zip Precompiled.zip zips
3030
.NOTPARALLEL:
3131

3232
#==> Functions
@@ -299,7 +299,6 @@ cover/combined.coverdata: cover/ex_unit_elixir.coverdata
299299
cover/combined.coverdata:
300300
bin/elixir ./lib/elixir/scripts/cover.exs
301301

302-
.PHONY: cover
303302
cover: cover/combined.coverdata
304303

305304
#==> Dialyzer tasks

lib/elixir/lib/gen_event/stream.ex

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
defmodule GenEvent.Stream do
66
@moduledoc false
7+
@moduledoc deprecated: "This functinoality is no longer supported"
78
defstruct manager: nil, timeout: :infinity
89

910
@type t :: %__MODULE__{manager: GenEvent.manager(), timeout: timeout}
@@ -50,6 +51,9 @@ defmodule GenEvent.Stream do
5051
end
5152

5253
defimpl Enumerable, for: GenEvent.Stream do
54+
@moduledoc false
55+
@moduledoc deprecated: "This functinoality is no longer supported"
56+
5357
def reduce(stream, acc, fun) do
5458
start_fun = fn -> start(stream) end
5559
next_fun = &next(stream, &1)

lib/elixir/lib/hash_dict.ex

+8
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,9 @@ defmodule HashDict do
260260
end
261261

262262
defimpl Enumerable, for: HashDict do
263+
@moduledoc false
264+
@moduledoc deprecated: "Use Map instead"
265+
263266
def reduce(dict, acc, fun) do
264267
# Avoid warnings about HashDict being deprecated.
265268
module = String.to_atom("HashDict")
@@ -288,6 +291,9 @@ defimpl Enumerable, for: HashDict do
288291
end
289292

290293
defimpl Collectable, for: HashDict do
294+
@moduledoc false
295+
@moduledoc deprecated: "Use Map instead"
296+
291297
def into(original) do
292298
# Avoid warnings about HashDict being deprecated.
293299
module = String.to_atom("HashDict")
@@ -303,6 +309,8 @@ defimpl Collectable, for: HashDict do
303309
end
304310

305311
defimpl Inspect, for: HashDict do
312+
@moduledoc false
313+
@moduledoc deprecated: "Use Map instead"
306314
import Inspect.Algebra
307315

308316
def inspect(dict, opts) do

lib/elixir/lib/hash_set.ex

+8
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,9 @@ defmodule HashSet do
274274
end
275275

276276
defimpl Enumerable, for: HashSet do
277+
@moduledoc false
278+
@moduledoc deprecated: "Use MapSet instead"
279+
277280
def reduce(set, acc, fun) do
278281
# Avoid warnings about HashSet being deprecated.
279282
module = String.to_atom("HashSet")
@@ -298,6 +301,9 @@ defimpl Enumerable, for: HashSet do
298301
end
299302

300303
defimpl Collectable, for: HashSet do
304+
@moduledoc false
305+
@moduledoc deprecated: "Use MapSet instead"
306+
301307
def into(original) do
302308
# Avoid warnings about HashSet being deprecated.
303309
module = String.to_atom("HashSet")
@@ -313,6 +319,8 @@ defimpl Collectable, for: HashSet do
313319
end
314320

315321
defimpl Inspect, for: HashSet do
322+
@moduledoc false
323+
@moduledoc deprecated: "Use MapSet instead"
316324
import Inspect.Algebra
317325

318326
def inspect(set, opts) do

lib/elixir/lib/kernel/parallel_require.ex

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
defmodule Kernel.ParallelRequire do
66
@moduledoc false
7+
@moduledoc deprecated: "Use the Kernel.ParallelCompiler module instead"
78

89
@deprecated "Use Kernel.ParallelCompiler.require/2 instead"
910
def files(files, callbacks \\ [])

lib/elixir/scripts/cover_record.exs

+8-4
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,16 @@ defmodule CoverageRecorder do
6666
|> Enum.flat_map(fn ebin ->
6767
ebin |> Path.join("*.beam") |> Path.wildcard()
6868
end)
69-
|> Enum.reject(&deprecated/1)
69+
|> Enum.reject(&skip_from_coverage?/1)
7070
end
7171

72-
defp deprecated(file) do
73-
mod = file |> Path.basename(".beam") |> String.to_atom()
72+
@to_skip [
73+
# Documentation only
74+
Kernel.SpecialForms
75+
]
7476

75-
match?({:docs_v1, _, _, _, _, %{deprecated: _}, _}, Code.fetch_docs(mod))
77+
defp skip_from_coverage?(file) do
78+
mod = file |> Path.basename(".beam") |> String.to_atom()
79+
mod in @to_skip or match?({:docs_v1, _, _, _, _, %{deprecated: _}, _}, Code.fetch_docs(mod))
7680
end
7781
end

lib/mix/lib/mix/config.ex

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
defmodule Mix.Config do
66
@moduledoc false
7+
@moduledoc deprecated: "Use the Config module instead"
78

89
@deprecated "Use the Config module instead"
910
defmacro __using__(_) do

0 commit comments

Comments
 (0)