Skip to content

Commit

Permalink
c
Browse files Browse the repository at this point in the history
  • Loading branch information
mayel committed Jan 14, 2025
1 parent f6e10c9 commit 06aeea1
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions lib/modularity/extend.ex
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,9 @@ defmodule Bonfire.Common.Extend do
def module_enabled?(module, opts \\ []) do
opts = Opts.to_options(opts)

module_available?(module) |> debug() and
is_module_extension_enabled?(module, opts) |> debug() and
is_disabled?(module, opts) |> debug() != true
module_available?(module) and
is_module_extension_enabled?(module, opts) and
is_disabled?(module, opts) != true
end

@doc """
Expand All @@ -222,9 +222,9 @@ defmodule Bonfire.Common.Extend do
def module_not_disabled?(module, opts \\ []) do
opts = Opts.to_options(opts)

module_exists?(module) |> debug() and
is_module_extension_enabled?(module, opts) |> debug() and
is_disabled?(module, opts) |> debug() != true
module_exists?(module) and
is_module_extension_enabled?(module, opts) and
is_disabled?(module, opts) != true
end

# @decorate time()
Expand Down Expand Up @@ -623,7 +623,7 @@ defmodule Bonfire.Common.Extend do
defmacro use_many_if_enabled(module_configs) when is_list(module_configs) do
quotes =
module_configs
|> IO.inspect(label: "module_configs")
|> IO.inspect(label: "input_modules")
|> Enum.map(fn
# Full tuple with module, opts, and fallback as potential AST nodes
{{_, _, _} = module_ast, opts, fallback} ->
Expand All @@ -640,7 +640,7 @@ defmodule Bonfire.Common.Extend do
module = Macro.expand(module_ast, __CALLER__)
quoted_use_if_enabled(module, [], nil)
end)
|> IO.inspect(label: "handled_modules")
|> IO.inspect(label: "resolved_modules")
|> Enum.reject(&is_nil/1)

quote do
Expand All @@ -655,7 +655,7 @@ defmodule Bonfire.Common.Extend do
def quoted_use_many_if_enabled(module_configs) when is_list(module_configs) do
quotes =
module_configs
|> IO.inspect(label: "module_configs")
|> IO.inspect(label: "input_modules")
|> Enum.map(fn
# Full tuple with module, opts, and fallback as potential AST nodes
{module, opts, fallback} ->
Expand All @@ -669,7 +669,7 @@ defmodule Bonfire.Common.Extend do
module ->
quoted_use_if_enabled(module, [], nil)
end)
|> IO.inspect(label: "handled_modules")
|> IO.inspect(label: "resolved_modules")
|> Enum.reject(&is_nil/1)

quote do
Expand Down

0 comments on commit 06aeea1

Please sign in to comment.