Keep track of when hotfixes can be removed
defmodule Example do
require Blocked
def main do
IO.puts("Any code here")
Blocked.by("#42", "This code can be removed when the issue is closed") do
hacky_workaround()
end
IO.puts("Any code here")
end
end
defmodule Example do
require Blocked
def main do
IO.puts("Any code here")
# The reason is optional
Blocked.by("#69") do
a_quick_fix()
end
IO.puts("Any code here")
end
end
defmodule Example do
require Blocked
def main do
IO.puts("Any code here")
# It is possible to indicate
# the desired 'ideal' code as well, by passing an `else` block:
Blocked.by("#1337") do
ugly_fallback()
else
beautiful_progress()
end
IO.puts("Any code here")
end
end
defmodule Example do
require Blocked
# If the blockage is more general, you can also leave out the `do` block.
Blocked.by("#65535", """
This whole module can be rewritten
once we're on the new Elixir version!
""")
def a_fun do
42
end
def other_fun do
"The game"
end
end
# Blocked supports many ways of referring to an issue:
# Your repo:
Blocked.by("#13")
# Other repo from you/your organization
Blocked.by("elixir#13")
Blocked.by("elixir/13")
# Any other repo:
Blocked.by("elixir-lang/elixir#13")
Blocked.by("elixir-lang/elixir/13")
Blocked.by("https://github.com/elixir-lang/elixir/issues/13")
Keep track of when hotfixes can be removed