Skip to content

Commit 612b389

Browse files
suggestions etc.
1 parent d487ba2 commit 612b389

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

NEWS.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ New library features
2626
--------------------
2727

2828
* `sort(keys(::Dict))` and `sort(values(::Dict))` now automatically collect, they previously threw ([#56978]).
29-
* New `Base.active_manifest()` function to return the path of the active manifest, like `Base.active_project()` ([#])
29+
* New `Base.active_manifest()` function to return the path of the active manifest, like `Base.active_project()`.
30+
Also can return the manifest that would be used for a given project file ([#57937])
3031

3132
Standard library changes
3233
------------------------

base/initdefs.jl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -381,20 +381,20 @@ end
381381

382382
"""
383383
active_manifest()
384+
active_manifest(project_file::AbstractString)
384385
385-
Return the path of the active manifest file. See [`Project environments`](@ref) for
386-
details on the difference between a project and a manifest, and the naming options and
387-
their priority when searching for a manifest file.
386+
Return the path of the active manifest file, or the manifest file that would be used for a given `project_file`.
387+
See [`Project environments`](@ref) for details on the difference between a project and a manifest, and the naming
388+
options and their priority in package loading.
388389
389390
See also [`Base.active_project`](@ref), [`Base.set_active_project`](@ref).
390391
"""
391-
function active_manifest(search_load_path::Bool=true)
392-
proj = active_project(search_load_path)
393-
proj === nothing && return nothing
394-
return project_file_manifest_path(proj)
392+
function active_manifest(project_file::Union{AbstractString,Nothing}=nothing, search_load_path::Bool=true)
393+
project_file === @someting project_file active_project(search_load_path)
394+
project_file === nothing && return nothing
395+
return project_file_manifest_path(project_file)
395396
end
396397

397-
398398
"""
399399
load_path()
400400

0 commit comments

Comments
 (0)