Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npe in BowerRegistry #17

Closed
zyro23 opened this issue Mar 1, 2016 · 6 comments
Closed

npe in BowerRegistry #17

zyro23 opened this issue Mar 1, 2016 · 6 comments
Milestone

Comments

@zyro23
Copy link

zyro23 commented Mar 1, 2016

somehow i am seeing NullPointerExceptions for bower dependencies that used to resolve with bower-installer-gradle. while this one works:

clientDependencies {
    bower {
        jquery "2.0.0"
    }
}

this one gives a npe:

clientDependencies {
    bower {
        angular "1.5.0"
    }
}

stacktrace:

Caused by: java.lang.NullPointerException: Cannot get property 'fullVersion' on null object
        at com.craigburke.gradle.client.registry.BowerRegistry.loadDependency(BowerRegistry.groovy:125)
        at com.craigburke.gradle.client.plugin.ClientDependenciesPlugin$_installDependencies_closure4$_closure10.doCall(ClientDependenciesPlugin.groovy:75)
        at groovyx.gpars.pa.CallClosure.call(CallClosure.java:47)

from a quick look at the repositories, i can just offer a wild guess: maybe a mismatch of the bower.json version and the actual tag name has something to do with it? they seem to be the same for jquery but not for a lot of other packages (v prefix)..

@craigburke
Copy link
Owner

Huh, Interesting. I've been using npm for almost all my dependencies with this so I haven't run into this, but I'll bet your hunch is correct.

I'm planning on pushing a new release out today and I'll try to get a fix for this in there too.

@craigburke craigburke added this to the 0.3.0 milestone Mar 1, 2016
@craigburke
Copy link
Owner

@zyro23 give 0.3.0 a spin if you would.

@zyro23
Copy link
Author

zyro23 commented Mar 2, 2016

looks like tags with a v prefix do work now. however, i am still seeing a npe, now for angular-material. that one defines its bower.json dependencies like "dependencies": { "angular": "^1.4.8" }

@craigburke craigburke reopened this Mar 2, 2016
@craigburke
Copy link
Owner

@zyro23 hmmm.... it should support "caret ranges" like that. I'll take a look and see what I messed up.

@craigburke
Copy link
Owner

@zyro23 I see the issue. angular-material has the following 4 dependencies:

    "angular": "^1.4.8",
    "angular-animate": "^1.4.8",
    "angular-aria": "^1.4.8",
    "angular-messages": "^1.4.8"

Those resolve fine. But those last three have an additional dependency on angular@1.5.0 So they're colliding as they all try to resolve those at the same time. I'll fix that.

In the meantime, this works:

clientDependencies {
    bower {
        'angular'('1.5.0')
        'angular-material'('1.0.6', exclude: 'angular')
    }
}

@craigburke
Copy link
Owner

I'm going to close this ticket and add a new one. I really appreciate the bug reports. This is incredibly helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants