Ken Williams wrote:

On Oct 5, 2006, at 5:50 AM, Ron Savage wrote:

Of course I don't expect Data::Package to tell me that a dependency requires compilation, although dare I say that should be the goal of this first step.

Yeah, I agree. Probably this will be best handled by the higher-level tools like CPAN and/or PAUSE and/or PAR and/or PPM. Module::Build can help each distro specify what its dependencies are and whether it requires a compiler, and the higher-level tools can string that information together and report what's necessary to the user.

So, there are a couple of different ways we could frame this. We could add a narrow-ish flag like 'needs_compiler'. Or we could try to automatically put it right in the prereq section as 'build_requires' information. This could either be by adding 'ExtUtils::CBuilder' as a 'build_requires' item, or by specifying somehow that M::B needs to have the 'C_support' feature enabled.

If you are looking at implementation from the code-side, you need have two capabilities.

1. Detect compiler availability
2. Enforce compiler dependency

It's common enough to not have a compiler that a number of cases exist where the compiler is checked for and alternative deps used if there is no compiler.

From the META.yml side, assuming it's possible to add something to that that isn't totally useless (because not only does it suffer from the advisory-quality-only issue, but it does so recursively as well) you want a flag that isn't boolean.

It needs to be something like

needs_compiler: never
needs_compiler: always
needs_compiler: sometimes

That sort of trinary logic (yes|no|maybe) might be a suitable way of handling this...

Adam K

Reply via email to