immutant

http://immutant.org Note: dev discussion happens in #immutant on FreeNode IRC.
2017-06-21T01:49:53.843378Z

@donyorm what is webjars-locator-jboss-vfs? And are your dependency trees the same for boot and lein?

2017-06-21T01:50:37.849106Z

can you share the output of lein deps :tree and the equivalent in boot (I think it is boot show -d maybe?)

donyorm 2017-06-21T13:00:35.367128Z

@tcrawley lein deps :tree outputs:

donyorm 2017-06-21T17:38:13.088260Z

@tcrawley the dependencies should be the same. webjars-locator-jboss-vfs is a (possibly optional) dependency of immuntant as far as I know. It's part of a luminus project

donyorm 2017-06-21T17:38:34.095884Z

yogthos sent me here with this question

2017-06-21T17:43:51.214359Z

@donyorm webjars-locator-jboss-vfs isn't a dep from immutant, I don't know where it comes from. And you should only need it when deploying an Immutant app to WildFly, as that's the only place where vfs will exist.

2017-06-21T17:44:07.220135Z

can you share the app where you see this problem? and when does the error manifest?

donyorm 2017-06-21T17:55:29.482334Z

@tcrawley the app is a standard luminus project (created with lein new luminus app-name) but I'm trying to make it run under boot. The error only manifests when I run the app with boot. I'll try and get the project on github

donyorm 2017-06-21T17:57:11.523037Z

Here it is: https://github.com/DonyorM/luminus-boot

donyorm 2017-06-21T17:57:29.530048Z

obviously build.boot and project.clj contain the most relevant items

donyorm 2017-06-21T17:57:43.535826Z

you can run the project under boot with boot dev run

2017-06-21T18:00:10.595170Z

cool, thanks. I'll take a look

donyorm 2017-06-21T18:08:22.787697Z

thanks for helping me with this. It's a weird (and frustrating) issue

2017-06-21T18:14:26.923563Z

are you trying to get a specific Luminus app working with boot, or just trying to solve the case generally? If it's the former, a quick solution is to remove that dependency if you aren't going to be deploying to WildFly. I think the proper answer is only include that dep when building an Immutant war file. I think we have provisions for that in the plugins.

2017-06-21T18:14:49.932094Z

But that doesn't identify why you see the error with one tool and not the other

2017-06-21T18:17:39.995721Z

I suspect that boot is doing something to trigger the reading and instantiation of https://github.com/webjars/webjars-locator-jboss-vfs/blob/master/src/main/resources/META-INF/services/org.webjars.urlprotocols.UrlProtocolHandler

2017-06-21T18:17:42.996947Z

and lein isn't

donyorm 2017-06-21T18:27:54.231114Z

Hmmm

donyorm 2017-06-21T18:28:02.234045Z

I'm trying to get luminus working with boot

donyorm 2017-06-21T18:28:18.240228Z

so I need to figure out how to solve the issue with the dependncy in place

2017-06-21T18:29:11.260468Z

I don't think the dependency should be there though - it should only be in a profile that gets applied when you are building an immutant war file, because it has no value outside of WildFly

2017-06-21T18:29:24.265704Z

so I think luminus itself needs to change there

donyorm 2017-06-21T18:29:37.270944Z

I'll ask on that channel

2017-06-21T18:29:51.276203Z

I'll join there

donyorm 2017-06-21T18:31:49.323331Z

give me a sec to ask, I'm in the middle of something

2017-06-21T18:32:07.330196Z

sure, no problem. I'll just observe at first :)

donyorm 2017-06-21T19:01:08.993670Z

looks like the error is being thrown on line 89 of this class: https://github.com/webjars/webjars-locator-core/blob/master/src/main/java/org/webjars/WebJarAssetLocator.java#L89

2017-06-21T19:22:37.461767Z

Ah, yeah. That code is using ServiceLoader to search the classpath for UrlProtocolHandler service definitions, which finds the one in webjars-locator-jboss-vfs, which triggers registration of it

2017-06-21T19:22:52.466913Z

but I have no idea why that code doesn't get triggered under lein

donyorm 2017-06-21T19:24:21.499165Z

it's definetely weird

donyorm 2017-06-21T19:30:03.621096Z

welp, I figured out that error

donyorm 2017-06-21T19:30:53.639340Z

for some reason, [org.webjars/webjars-locator-core "0.27"] was causing issues. When I excluded it from a different dependency it kind started working. Now I have another error 🙂