I get a weird error while trying to add an extension, Maybe I did something wrong :
1- added the folder ext and the file “BloodFlowTrixiDataInterpolationsExt.jl” in it.
2- added DataInterpolations.jl as a weakdeps
[weakdeps]
DataInterpolations = "82cc6244-b520-54b8-b5a6-8a565e85f1d0"
[extensions]
BloodFlowTrixiDataInterpolationsExt = "DataInterpolations"
add a test and run
ERROR: The following 1 direct dependency failed to precompile:
BloodFlowTrixiDataInterpolationsExt --code-coverage=none --color=yes --check-bounds=yes --warn-overwrite=yes --depwarn=yes --inline=yes --startup-file=no --track-allocation=none
Error: Missing source file for Base.PkgId(Base.UUID("aa9661e1-1ff4-5c00-befa-745301856090"), "BloodFlowTrixiDataInterpolationsExt"
The file is quite simple
module BloodFlowTrixiDataInterpolationsExt
if isdefined(Base, :get_extension)
using BloodFlowTrixi
using DataInterpolations
else
using ..BloodFlowTrixi
using ..DataInterpolations
end
using StaticArrays, LinearAlgebra
function get3DData(eq::BloodFlowEquations2D,curve_data::Tuple{AbstractArray,AbstractArray},semi,sol,time_index ::Int = 1;vtk ::Bool=false,out ::T="./datas") where {T<:AbstractString}
s_data,xyz_data = curve_data
curve = SmoothArcLengthInterpolation(xyz_data,s_data)
tan(s) = DataInterpolations.derivative(curve,s)
function nor(s)
res= DataInterpolations.derivative(tan,s)
return res/norm(res)
end
∧(v,w) = SA[v[2]*w[3]-v[3]*w[2],v[3]*w[1]-v[1]*w[3],v[1]*w[2]-v[2]*w[1]]
er(theta,s) = cos(theta).*nor(s) .+ sin(theta).*∧(tanj(s),nor(s))
return get3DData(eq,curve,er,semi,sol,time_index;vtk=vtk,out=out)
end
end