esy-issues
esy-issues copied to clipboard
Allow multiple version of a package in the same dependency tree
We need to support buildTimeDependencies
for that but there's a workaround suggested by @jordwalke:
So let's say I have two versions of Reason. And you're building the two separate packages that depend on those two separate versions. I think that in their build environment they should see their own respective versions of Reason. But then if they go and try to combine two link time artifacts into an executable it could fail.
So this "punting the error until link time failure" should be a hack way to support "buildTimeDependencies"
^ That was just a suggestion. I'm sure there's more elegant solutions like actually tracking buildTimeOnlyDependencies. Alternatively - perform a detection that there are multiple versions of the same package, and then only if the final executable fails to link then provide possible explanation of why. That is not a totally perfect solution either because some libraries provide dynamically linked libraries, and the errors are deferred to link time! So really proper support of relaxing the error message for multiple versions based on buildTimeOnly dependencies is the best solution and I merely suggested a quick hack.