hooks icon indicating copy to clipboard operation
hooks copied to clipboard

[conan-center] Hook to check short-paths in Windows

Open jgsogo opened this issue 5 years ago • 3 comments

We have deactivated the short-paths limitation in CCI, but still it would be useful to check if a package has any file with a path longer than 250(?) and raise an error if the recipe doesn't add the short_paths = True attribute. If the recipe has the attribute, a warning could be useful.

jgsogo avatar Jun 22 '20 10:06 jgsogo

So we need to check post package, and look into the package folder.

uilianries avatar Jun 22 '20 20:06 uilianries

This is still no guarantee that it works, since the Conan directory can be literally everywhere

How long is the path to the Conan folder itself on CCI Windows machines?

Croydon avatar Jun 22 '20 22:06 Croydon

Yes, we are aware of the problem, but the best we can do in CCI is to add the short_paths=True when we detect those long paths. If, even with that patch, due to the user home or to the package nested directories, it has a path too long for Windows there is nothing we can do (I can't imagine how to know a build has failed because of this issue).

The hook need to check files at every step: unpackaged sources, build folder and package folder. It needs to check for paths longer than XXX (relative to its base path) and raise if the recipe doesn't activate short_paths.

jgsogo avatar Jun 23 '20 07:06 jgsogo