Q: Is it possible to specify required LESS version? Can I specify a LESS compiler version, that is required to compile the file? E.g. in a comment at the beginning of the file:
// use 1.5.0

I've searched the docs, but it seems like there are no such option.

A: Basically no, there's no such option. And even if it's added in future LESS versions, an older versions still won't have it so this does not help too much soon. Besides older less.js versions, there're a few LESS ports which are also a bit behind the official implementation so you never know what happens with your LESS sources when you give it away.
(Not mentioning that each LESS compiler also usually has several options that affect CSS output, e.g.: --strict-math).
Well, there's possibility to put a sort of version guard into your code, for example once I tried something like this:
.version-guard__() when not(length(-) = 1) {
    -:@@-;@-:': requires LESS version 1.5.0 or higher';
} .version-guard__();

But it works in less.js only, and it's not so easy to craft an universal trick that will work with other LESS implementations since each one handles errors in slightly different ways (though, to be honest, I did not bother with that too much since my main goal was to get a reasonable error message).
P.S. Alternative version guard method:
.version-guard__ {
    -+: requires LESS version 1.5.0 or higher;
}

This one works in less.js and lessphp (at least) but generates dummy CSS output (unlike the first one).
