Skip to content

Conversation

@IanButterworth
Copy link
Member

Closes #57924

julia> Base.active_project()
"/Users/ian/.julia/environments/v1.13/Project.toml"

julia> Base.active_manifest()
"/Users/ian/.julia/environments/v1.13/Manifest.toml"

(@v1.13) pkg> activate --temp
  Activating new project at `/var/folders/1z/jf841bdj73bdj3vk7kc7f_3w0000gn/T/jl_SCVFBB`

julia> Base.active_project()
"/var/folders/1z/jf841bdj73bdj3vk7kc7f_3w0000gn/T/jl_SCVFBB/Project.toml"

julia> Base.active_manifest()

julia>

I'm holding off adding tests because I wasn't sure whether that last case should match active_project and return a path to a nonexistant file? i.e. the temp Project.toml doesn't exist, nor manifest.

@IanButterworth IanButterworth added the needs tests Unit tests are required for this change label Mar 29, 2025
@KristofferC
Copy link
Member

Maybe it should optionally take a project and give the manifest for that (defaulting to the active project).

@bvdmitri
Copy link
Contributor

bvdmitri commented Mar 31, 2025

A test for these changes would be nice, especially because (edit: ops I'm blind) the code has a bug and spells @something as @someting

@IanButterworth
Copy link
Member Author

See the label and

I'm holding off adding tests because I wasn't sure whether that last case should match active_project and return a path to a nonexistant file? i.e. the temp Project.toml doesn't exist, nor manifest.

@DilumAluthge
Copy link
Member

I'm holding off adding tests because I wasn't sure whether that last case should match active_project and return a path to a nonexistant file? i.e. the temp Project.toml doesn't exist, nor manifest.

IMO it makes sense to return nothing (which it looks like is what you currently do).

@DilumAluthge
Copy link
Member

How does this function behave with regards to versioned manifest filenames?

@DilumAluthge
Copy link
Member

I'm holding off adding tests because I wasn't sure whether that last case should match active_project and return a path to a nonexistant file? i.e. the temp Project.toml doesn't exist, nor manifest.

IMO it makes sense to return nothing (which it looks like is what you currently do).

To clarify my opinion, I think it's good that this PR currently returns nothing in this case. I don't think this PR should return a path to the non-existent path.

@DilumAluthge
Copy link
Member

I still think that this would be nice to have. @IanButterworth @KristofferC What do you think?

@IanButterworth
Copy link
Member Author

Feel free to take it over

@DilumAluthge DilumAluthge marked this pull request as draft September 28, 2025 20:23
@DilumAluthge DilumAluthge marked this pull request as ready for review September 28, 2025 20:24
@DilumAluthge DilumAluthge removed the request for review from KristofferC September 28, 2025 20:25
@DilumAluthge
Copy link
Member

DilumAluthge commented Sep 28, 2025

Ah, I should have left in "draft" - still needs tests.

@DilumAluthge DilumAluthge marked this pull request as draft September 28, 2025 20:33
@DilumAluthge DilumAluthge self-assigned this Sep 28, 2025
@DilumAluthge DilumAluthge added the packages Package management and loading label Sep 28, 2025
@DilumAluthge
Copy link
Member

Has tests now.

@DilumAluthge DilumAluthge removed the needs tests Unit tests are required for this change label Oct 3, 2025
@DilumAluthge DilumAluthge marked this pull request as ready for review October 3, 2025 12:44
@IanButterworth IanButterworth added the merge me PR is reviewed. Merge when all tests are passing label Oct 25, 2025
@IanButterworth IanButterworth merged commit a5c6ddb into JuliaLang:master Oct 25, 2025
8 checks passed
@IanButterworth IanButterworth deleted the ib/active_manifest branch October 25, 2025 05:15
@DilumAluthge DilumAluthge removed the merge me PR is reviewed. Merge when all tests are passing label Oct 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

packages Package management and loading

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Add Base.active_manifest

5 participants