Features is awesome, but info files are problematic.

  • I have trouble reading them because everything is mushed together without newlines.
  • Apps keys are below dependencies which seems kinda weird (they seem to belong below the project info)

It would be fantastic if there was a way to allow the info file to be managed by a human. This would bring features more in line with other similar dependency management tools (drush make, composer, bundler). Maybe a format like the following could be used where the file was divided into a human managed section and a features managed section (or even split into two files). The stuff in the features managed section would be only those items not already placed above.

name = OSU Blog
description = Blog App for Open OSU
core = 7.x
package = OSU Content Types
version = 7.x-1.0
project = osu_blog

apps[name] = Blog (Unstable)
apps[author] = Engineering Web Services
apps[author_url] = http://engineering.osu.edu/web/
apps[logo] = logo.png

dependencies[] = ctools
dependencies[] = features
dependencies[] = options
dependencies[] = osu_body_field
dependencies[] = strongarm
dependencies[] = text

features[ctools][] = strongarm:strongarm:1
features[features_api][] = api:2
features[field_instance][] = node-osu_blog_post-field_osu_body
features[node][] = osu_blog_post

features[variable][] = field_bundle_settings_node__osu_blog_post
features[variable][] = language_content_type_osu_blog_post
features[variable][] = menu_options_osu_blog_post
features[variable][] = menu_parent_osu_blog_post
features[variable][] = node_options_osu_blog_post
features[variable][] = node_preview_osu_blog_post
features[variable][] = node_submitted_osu_blog_post

; FEATURES MANAGES BELOW THIS LINE
features[variable][] = some_new_autodetected dependency
features[variable][] = another_one

I noticed a couple other issues that, while independent of this one, might benefit from it being implemented as it would provide an alternative mechanism to accomplish the same goals.

Generate .info file properties in order consistent with core
https://drupal.org/node/913890

Cleaner .info file format
https://drupal.org/node/2155793

Comments

caschbre’s picture

Along these lines... I have some feature modules that I also want to include Views handlers. To do this I need to add a files[]=/path/to/handler.inc in the module .info file. Unfortunately this gets overridden with each feature export.