Is there a way to specify a conditional dependency (that is, use package Foo if it's available and define functions that use things from Foo; otherwise, don't define the functions or throw an error message) on packages that contain macros? isdefined(Main, :Package) won't work since the macros from Package are evaluated prior to this conditional, and it will throw an error.
I was using Requires.jl to do this, but one issue I ran into is that an error in the code within the @require block is not propagated as an error; it's presented as a warning, which means that things like unit tests will pass even if the code is incorrect.