That function was not changed so it is not surprising that nothing has changed with that function. The way Revise works is that it checks for updates to functions and re-evaluates them.
Here is another example where I add a package version with a known bug (knn: skipped items output when there is a skip function has always the last index and not 0 index · Issue #145 · KristofferC/NearestNeighbors.jl · GitHub), update it to a working version and see that the bug if fixed. The path is also updated:
❯ julia --check-bounds=yes -q
(@v1.8) pkg> activate --temp
Activating new project at `/tmp/jl_iyvOZH`
(jl_iyvOZH) pkg> add NearestNeighbors@0.4.10
Updating registry at `~/.julia/registries/General.toml`
Resolving package versions...
Updating `/tmp/jl_iyvOZH/Project.toml`
⌃ [b8a86587] + NearestNeighbors v0.4.10
Updating `/tmp/jl_iyvOZH/Manifest.toml`
[b4f34e82] + Distances v0.10.7
⌃ [b8a86587] + NearestNeighbors v0.4.10
[90137ffa] + StaticArrays v1.5.6
...
Info Packages marked with ⌃ have new versions available
julia> using Revise, NearestNeighbors
julia> data = [[0.13380863416387367, 0.7845254987714512],[0.1563342025559629,
julia> tree = KDTree(hcat(map(p -> [p[1], p[2]], data)...));
julia> nearest, distance = knn(tree, [0.15, 0.8], 3, true, x -> x == 2) # buggy behavior
ERROR: BoundsError: attempt to access 3-element Vector{Int64} at index [-1]
Stacktrace:
[1] getindex
@ ./array.jl:924 [inlined]
[2] knn_point!(tree::KDTree{StaticArraysCore.SVector{2, Float64}, Euclidean, Float64}, point::Vector{Float64}, sortres::Bool, dist::Vector{Float64}, idx::Vector{Int64}, skip::var"#5#6")
@ NearestNeighbors ~/.julia/packages/NearestNeighbors/YCcEC/src/knn.jl:36
[3] knn(tree::KDTree{StaticArraysCore.SVector{2, Float64}, Euclidean, Float64}, point::Vector{Float64}, k::Int64, sortres::Bool, skip::var"#5#6")
@ NearestNeighbors ~/.julia/packages/NearestNeighbors/YCcEC/src/knn.jl:46
[4] top-level scope
@ REPL[6]:1
julia> @which knn(tree, [0.15, 0.8], 3, true, x -> x == 2)
knn(tree::NNTree{V}, point::AbstractVector{T}, k::Int64, sortres, skip::F) where {V, T<:Number, F<:Function} in NearestNeighbors at /home/kc/.julia/packages/NearestNeighbors/YCcEC/src/knn.jl:42
(jl_iyvOZH) pkg> update
Updating `/tmp/jl_iyvOZH/Project.toml`
[b8a86587] ↑ NearestNeighbors v0.4.10 ⇒ v0.4.11
Updating `/tmp/jl_iyvOZH/Manifest.toml`
[b8a86587] ↑ NearestNeighbors v0.4.10 ⇒ v0.4.11
julia> nearest, distance = knn(tree, [0.15, 0.8], 3, true, x -> x == 2) # bug is fixed
([1, 3], [0.02239688629947563, 0.13440059522389006])
julia> @which knn(tree, [0.15, 0.8], 3, true, x -> x == 2) # new path
knn(tree::NNTree{V}, point::AbstractVector{T}, k::Int64, sortres, skip::F) where {V, T<:Number, F<:Function} in NearestNeighbors at /home/kc/.julia/packages/NearestNeighbors/VZzTb/src/knn.jl:47