Calling module specific method with same type signature (AbstractFFT, FFTW, FFTA)

Consider the following example. If I run

using FFTA
a = rand(ComplexF64, 128)
p = FFTA.plan_fft(a)
typeof(p)

I get

FFTA.FFTAPlan_cx{ComplexF64, 1}

but if I run

using FFTA, FFTW
a = rand(ComplexF64, 128)
p = FFTA.plan_fft(a)
typeof(p)

I get

FFTW.cFFTWPlan{ComplexF64, -1, false, 1, Tuple{Int64}}

Of course, both FFTA.plan_fft and FFTW.plan_fft are methods of AbstractFFTs.plan_fft with the same type signature.

I thought this was a bug in FFTA.jl, but now I am not so sure (FFTA.plan_fft returns an FFTW plan if both FFTW and FFTA are used · Issue #66 · JuliaMath/FFTA.jl · GitHub). Is there any way to call the FFTA.jl specific method?

This problem arises because my project uses both FFTW and FFTA (in different places/modules). But even if I remove FFTW from my package, it still arises after importing an external package that does use FFTW.

The problem is ultimately that the AbstractFFTs.jl interface does type piracy by design, which is a recipe for disaster precisely because of this:

I don’t know of a solution other than, say, using your own fork of FFTA.jl where you strip out the AbstractFFTs.jl dependency and implement a separate FFTA.plan_fft.

As mentioned in the issue, the proper solution would be adding some kind of backend token similar to the Auto<adbackend> types used by autodiff interface packages. Since FFT is so fundamental, such a breaking change would probably cause a lot of churn across the ecosystem, so likely a lot of people would be resistant to the idea, but what are you going to do? As your example shows, the current situation is not tenable.