Skip to content

Rename context API methods as internal functions #4161

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

IanButterworth
Copy link
Member

@IanButterworth IanButterworth commented Feb 16, 2025

The Pkg.add(ctx::Context..... methods are internal methods that require preconditioning the input args using internal functions

Pkg.jl/src/API.jl

Lines 162 to 163 in c54ee59

pkgs = deepcopy(pkgs) # don't mutate input
foreach(handle_package_input!, pkgs)

This renames those methods to underscore versions to make it clearer that they're internal.

BinaryBuilderBase is known to use the Pkg.add(ctx method and during development saw the confusing length errors #4160 that you get if you don't precondition the input, which added to the impression that Pkg was broken. @giordano and I have talked about moving that to the public way of controlling the julia version via the julia_version kwarg, which has better test coverage now and should be in better shape now since #4151 and #4156

Ecosystem fixes:

@DilumAluthge
Copy link
Member

Makes sense to me - we should make it easy to notice when a generic function is private or internal.

@IanButterworth IanButterworth force-pushed the ib/private_context_functions branch 3 times, most recently from 9a209a7 to 4571d6a Compare February 16, 2025 20:32
@IanButterworth IanButterworth force-pushed the ib/private_context_functions branch from 4571d6a to b05dd87 Compare February 16, 2025 20:49
@github-project-automation github-project-automation bot moved this to New in Pkg.jl Jul 2, 2025
@IanButterworth IanButterworth moved this from New to In progress in Pkg.jl Jul 2, 2025
@IanButterworth IanButterworth moved this from In progress to Backlog in Pkg.jl Jul 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

Successfully merging this pull request may close these issues.

2 participants