Rewrite of `drupal-detect-drupal-version' needed#12
Conversation
|
@arnested, What about using 'drush dd' as a fallback method as done here: https://github.com/kostajh/subDrush/blob/f9d8ba0c9a9d7153a883329c9bec88679cda64f8/lib/drush.py#L180 |
|
I just added a rewrite that doesn't use dir-locals. It is definitely not the fancy cleanup of I'm going to try this branch for some days before merging and releasing. @dhaley, I have considered using |
|
I just pushed a newer version that fixes some issues with the new approach. The current version also uses temporary buffers for finding versions so you won't have a lot of visited files around that you haven't visited yourself.
I'll keep using this version some days before merging it. |
|
It didn't reveal any problems today - so I just merged it to develop. |
The use of dir-locals (
dir-locals-set-class-variables' anddir-locals-set-directory-class' in `drupal-detect-drupal-version' has proved not to be an ideal solution.The "project local" variables is not always set correctly resulting in some buffers not entering drupal-mode and/or not having drupal-rootdir set. This limits usabilty of drupal-mode a lot.
We have to redo the handling of the project local variables. And a cleanup of the detection and parsing of drupal-rootdir, drupal-version, etc. could also be a good idea.