WordPoints / dev-lib

Developer tools for WordPoints projects
MIT License
4 stars 0 forks source link

autoloaders: dependencies not provided with verifying classmaps #207

Closed JDGrimes closed 7 years ago

JDGrimes commented 7 years ago

In the Grunt task we allow an array of dependencies for each classmap to be provided. However, we don't do this when running from the command line. Really, the list of dependencies should be provided to the verification command directly, rather than being specified in the Gruntfile.js.

JDGrimes commented 7 years ago

To some degree we should automatically detect this. When running against a module, for example, we ought to know that we need to provide the main WordPoints classmap as a dependency.

JDGrimes commented 7 years ago

Unfortunately, we may have to continue to do this in the Grunt config as well. The problem is that we run the command directly against the PHP script that verifies the classmaps, instead of invoking the dev-lib's command. So we either need to place the special handling directly into the PHP script, or we need to change the way we verify the classmaps in the Grunt script. Really, I think that we should probably just verify all of the classmaps at once after building them anyway, rather than running against each one as it is rebuilt. So it wouldn't matter that by invoking the dev-lib's command we'd run against all of them at once then.

JDGrimes commented 7 years ago

Note that this does mean that it won't be as obvious which file it was that generated the error. But that is partly an issue with our underlying command, not so much a concern of Grunt itself.

I guess if we wanted though, we could support passing the file to the command. But that's not necessary here.

We could support passing dependencies though, so that we could better maintain back-compat.