Hey everyone, I have the following situation in my hands, and I’d like to get some perspective from the community:
Suppose I’m developing a package and I wish to provide the user with a function that requires a package like Flux.jl. Now, my package per se does not uses Flux, and I just wish to provide this function to the user such that he can use it “if” he has Flux.jl, for example:
using MyPackage
runfluxfunction()
# This returns an error.
using MyPackage
using Flux
runfluxfunction()
# This works.
I was wondering if it’s possible to do something like this, or if it’s bad practice for some reason. This would be really nice, cause this function might not be needed for every user, and I could leave Flux.jl out of as a dependency, which would make the precompilation faster.