sls-packaging icon indicating copy to clipboard operation
sls-packaging copied to clipboard

detectConstraints doesn't work if the dependency is transitive

Open jroitgrund opened this issue 7 years ago • 1 comments

Three projects, TransitiveDep, Dep, and Main.

Main depends on Dep.

Dep depends on TransitiveDep.

TransitiveDep publishes the following:

apply plugin: 'com.palantir.sls-recommended-dependencies'

recommendedProductDependencies {
    productDependency {
        productGroup = 'com.transitive.dep'
        productName = 'dep'
        minimumVersion = rootProject.version
        maximumVersion = "1.x.x"
        recommendedVersion = rootProject.version
    }
}

Main has the following:

   productDependency {
         productGroup = 'com.transitive.dep'
         productName = 'dep'
         productName = 'multipass'
        detectConstraints = true
    }

I would expect this to work, but I get

Product dependency 'com.transitive.dep:dep' has constraint detection enabled, but could not find any recommendations in assetBundle configuration

jroitgrund avatar May 10 '18 12:05 jroitgrund

I believe this was intentional in the original implementation. The library that wraps the dependency needs to redeclare the dependency itself.

On May 10, 2018, at 5:03 AM, jroitgrund <[email protected]mailto:[email protected]> wrote:

Three projects, TransitiveDep, Dep, and Main.

Main depends on Dep.

Dep depends on TransitiveDep.

TransitiveDep publishes the following:

apply plugin: 'com.palantir.sls-recommended-dependencies'

recommendedProductDependencies { productDependency { productGroup = 'com.transitive.dep' productName = 'dep' minimumVersion = rootProject.version maximumVersion = "1.x.x" recommendedVersion = rootProject.version } }

Main has the following:

productDependency { productGroup = 'com.transitive.dep' productName = 'dep' productName = 'multipass' detectConstraints = true }

I would expect this to work, but I get

Product dependency 'com.transitive.dep:dep' has constraint detection enabled, but could not find any recommendations in assetBundle configuration

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub [github.com]https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_palantir_sls-2Dpackaging_issues_278&d=DwMFaQ&c=izlc9mHr637UR4lpLEZLFFS3Vn2UXBrZ4tFb6oOnmz8&r=Vp81aOxWZvuVgVK_wp-VF3pIYG92B19LcCw6XKeYC0U&m=3u1NigYZo0DzS2QVTCF6u37SXkOye_3rwL4wxGB2CfM&s=wcFc0GQ7mGmKj9q011BIlvVsluBknCVH4W124wLN6vs&e=, or mute the thread [github.com]https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AAp3Q13X7-5FCIkWEjFR3wKpUZPF-2D5vlD-5Fks5txCx9gaJpZM4T5yfe&d=DwMFaQ&c=izlc9mHr637UR4lpLEZLFFS3Vn2UXBrZ4tFb6oOnmz8&r=Vp81aOxWZvuVgVK_wp-VF3pIYG92B19LcCw6XKeYC0U&m=3u1NigYZo0DzS2QVTCF6u37SXkOye_3rwL4wxGB2CfM&s=-oukdecDWYcFRWleN8YEIShoD7vgo72XF59LIMk8GE8&e=.

markelliot avatar May 10 '18 14:05 markelliot