Closed IanButterworth closed 4 years ago
@samuelpowell Given the automerge requirement, it's probably worth enabling travis on this, to check for non-fatality
Okay so does it work? If no Spinnaker found we quietly load but all functions will be broken and error at runtime?
Correct.
After removing the spinnaker .dylib's temporarily:
(v1.3) pkg> build Spinnaker
Building Spinnaker → `~/Documents/GitHub/Spinnaker.jl/deps/build.log`
Resolving package versions...
[ Info: No changes
julia> using Spinnaker
[ Info: Precompiling Spinnaker [8e0d2ad3-56b8-53f3-8036-54b674872bef]
┌ Error: Package configuration file missing, run 'Pkg.build("Spinnaker")' to configure, or `Pkg.build("Spinnaker", verbose=true)` to debug.
└ @ Spinnaker ~/Documents/GitHub/Spinnaker.jl/src/Spinnaker.jl:59
julia> CameraList()
ERROR: UndefVarError: libSpinnaker_C not defined
Stacktrace:
[1] spinCameraListCreateEmpty at /Users/ian/Documents/GitHub/Spinnaker.jl/src/wrapper/spin_api.jl:201 [inlined]
[2] CameraList() at /Users/ian/Documents/GitHub/Spinnaker.jl/src/CameraList.jl:16
[3] top-level scope at none:0
I have a PR open to clarify the Info: No changes
message, as it's deceptive here, because build.jl did make changes to the build in this case.
It would be nice if we could print a soft error to REPL during the build
stage, but I don't know if that's possible
@ianshmean what's going on is this good to go?
Yeah. The only thing is that if you forget to install the Spinnaker SDK, it won't be obvious at julia build time given the error log goes straight to file in deps/build.log
rather than being printed.
I'm not aware of a better approach out there, so we should merge and keep an eye on best practice
Does this match with what people do at the moment in other packages?
I based it on CuArrays or one of that family. It should be
There may be a better way to handle this. Open to review!