Skip to content
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

This package does some type-piracy on Distributed.addprocs and some Base types #175

Open
DilumAluthge opened this issue Jan 6, 2025 · 0 comments · May be fixed by #176
Open

This package does some type-piracy on Distributed.addprocs and some Base types #175

DilumAluthge opened this issue Jan 6, 2025 · 0 comments · May be fixed by #176

Comments

@DilumAluthge
Copy link

DilumAluthge commented Jan 6, 2025

I noticed that this package does some type-piracy. Here are the two methods that I noticed.

The first method is the Distributed.addprocs(::AbstractString, ::Int; kwargs...) method. The AzManagers.jl package does not own the function (Distributed.addprocs) or either of the types (Base.AbstractString or Base.Int). (Keyword arguments do not participate in method dispatch.)

function Distributed.addprocs(template::AbstractString, n::Int; kwargs...)

The second method is the Distributed.addprocs(::Dict, ::Int; kwargs...) method. The AzManagers.jl package does not own the function (Distributed.addprocs) or any of the types (Base.Dict or Base.Int).

function Distributed.addprocs(template::Dict, n::Int;

This is not ideal.

There are a couple of ways to fix this. Probably the easiest would be to have a new function named AzManagers.addprocs_azure, and then the two above methods would become methods of the AzManagers.addprocs_azure function (instead of the Distributed.addprocs function).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant