ivila commented on PR #268: URL: https://github.com/apache/teaclave-trustzone-sdk/pull/268#issuecomment-3736627364
> Using feature flags in this manner exposes consumers of the code to dependency hell. If A consumes teec and B consumes A, I have to add a dependency from B -> teec as well (to define the feature flag), or I must re-export the feature flags in A. > > This is brittle - if teec changes (which it can, even if the semver version of A doesn't), B now has an out-of-date dependency (version 0.7 of teec, but A has 0.8). Due to the links=teec setting in the cargo.toml of optee-teec-sys, B now gets an error. > > Furthermore, if _any_ crate in the dependency tree accidentally (or intentionally) enables the feature, its impossible to turn it off. > > IMO its just tooling pain that a build-time env var is better suited to solve. And pkg-config defines a precedent and pattern for that. I see your point. In your setup, the crate that depends on optee-teec isn’t a client application but an invoker crate, so this does become awkward. In that case, let’s keep the current approach. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
