Skip to content

Commit

Permalink
Add deprecation notice in docstring of do-block executable wrappers (#64
Browse files Browse the repository at this point in the history
)

* Add deprecation notice in docstring of do-block executable wrappers

* Add a body to compat admonitions.
  • Loading branch information
fredrikekre authored May 16, 2024
1 parent 9437385 commit 0aa5017
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/products/executable_generators.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ function declare_old_executable_product(product_name)
An `ExecutableProduct` wrapper that supports the execution of $($product_name).
!!! warning "Deprecated"
This method is deprecated because it is not thread-safe and will be
removed in future Julia versions. Use the non do-block form
instead.
# Example
```julia
$($product_name)() do exe
Expand All @@ -15,6 +20,7 @@ function declare_old_executable_product(product_name)
```
!!! compat "Julia 1.3"
This method requires Julia version 1.3 or newer.
"""
function $(product_name)(f::Function; adjust_PATH::Bool = true, adjust_LIBPATH::Bool = true)
Base.depwarn(string($(product_name), "() is deprecated, use the non-do-block form"), $(string(product_name)))
Expand Down Expand Up @@ -61,6 +67,7 @@ function declare_new_executable_product(product_name)
```
!!! compat "Julia 1.6"
This method requires Julia version 1.6 or newer.
"""
function $(product_name)(; adjust_PATH::Bool = true, adjust_LIBPATH::Bool = true)
env = Base.invokelatest(
Expand Down

0 comments on commit 0aa5017

Please sign in to comment.