Page MenuHomePhabricator

Allow version dependencies to be specified for external linters
Closed, ResolvedPublic

Description

I think that it would be useful to be able to specify (in an .arcconfig or .arclint file) minimum versions for external linters (ArcanistExternalLinter). There are a couple of reasons that this makes sense:

  1. The ArcanistExternalLinter may rely on some flags which were introduced in a certain version of the linter.
  2. The project owner may wish to enforce a minimum version due to, perhaps, a new type of lint that was introduced.

There would be a few steps involved here that could be tackled incrementally:

  1. Adding a getVersion function to the ArcanistExternalLinter. This would be conceptually quite similar to the getCacheVersion function but a bit simpler (doesn't need to account for flags, for example).
  2. Providing a method for comparing version numbers in libphutil. This might be more difficult to handle all cases, but shouldnt be too hard in the general case. For example, most (if not all) linters from NPM should be using semantic versioning.
  3. Providing a configuration for .arcconfig or .arclint to specify version dependencies.

Event Timeline

joshuaspence claimed this task.
joshuaspence raised the priority of this task from to Needs Triage.
joshuaspence updated the task description. (Show Details)
joshuaspence added a project: Arcanist.
joshuaspence updated the task description. (Show Details)
joshuaspence added subscribers: joshuaspence, epriestley.

I think version_compare() can handle (2), at least in almost all cases.

I'm strongly supportive of this feature in general, your plan looks good to me, and D8971 is a solid first step. Thanks!

Ok, so D8971 didn't fix this, at least not completely.

epriestley triaged this task as Normal priority.May 6 2014, 2:17 PM
joshuaspence renamed this task from Allow version dependencies to be specified for external linters. to Allow version dependencies to be specified for external linters.Jul 9 2014, 7:08 PM
joshuaspence lowered the priority of this task from Normal to Low.