I have a new crate that doesn’t implement two package bodies because clients are meant to do so. But because Alire won’t publish a crate that won’t compile everything successfully (IIUC), my crate provides dummy bodies (the routines raise P_E if called) for the two package declarations. Then the client extends the first crate’s gpr file and overrides the two dummy package bodies with actual implementations.
Will that cause any issues with Alire?
I suppose it should work, automatic adding of dependency should be disabled in first crate, and project file of second crate should be extended project.
Hi Vadim,
Nice to hear from you. It’s been a while!
You mentioned “automatic adding of dependency should be disabled in first crate”. What do you have in mind, specifically? (I’m new to Alire.) Is it the use of auto-gpr-with = false in the manifest?
I should add that if there’s a better way to approach this problem, I’m certainly interested. The underlying cause is that build by the publisher checks, which I assume is unavoidable. But then again, project extension is a reasonable approach for these two crates anyway.
Thanks,
Pat