Repository navigation
#49 use jcabi-aether for dependency resolving - #159
Conversation
|
Great PR, thanks for this lovely piece of work. Will it reuse the local .m2 cache as commented on by @gildor in #49? Some (@stephenbyrne-mfj) commented that aether is no longer under development. So hopefully we're not betting on the wrong horse here. I am mostly worried about backward compatibility but it's hard/tedious to test it. So I'll just test the PR locally for a few days, before merging it into master. |
Well, that's a bit of a problem. Currently I do: So M2_HOME can be different than ~/.m2 and I currently ignore any settings.xml which overwrites the localRepo location.
True. Gildor mentioned "Also, even Gradle uses Aether for maven (at least for publication, as I see, but cannot be sure)."
I have the same doubts, and I won't be disappointed if you decide to stick with the maven solution. I just wanted to share it and hey, maybe it's working well. |
|
@andreas-mausch Could you add some tests, please? |
|
@dimiii Do you have a special test in mind? I see this more as a refactoring. All scripts in the test folder use the new method, so as long as they are green, it should be fine. |
|
I agree with @andreas-mausch , as long as the tests are green the PR is ready for merging. Sorry for the delayed process. But since kscript maybe merged into the offical kotlin-core soon, we may want/need to use the official scripting aether integration instead. |
|
I tested on mingw (gtibash) and resolution works, execution still fails though, but it is a great step forward. But the Kotlin version needs to be updated to |
|
This was to be expected because of the same issue as described in #154: Before calling |
|
On thing at a time, what is needed to merge this? |
|
Not much, it's a great PR. There's two arguments
Clearly |
Would not the whole project become obsolete? |
|
The idea is rather to make it part of the core distribution of Kotlin :-). So technically this repo would become obsolete, but conceptually it would imho be a great grand finale for the idea of providing an easy-to-use, very flexible, and almost zero-overhead solution to write self-contained mini-applications with Kotlin. (quoting myself from the readme) it's an ongoing process so let's see if we manage. Until then I'll keep working on it. |
|
Glad to hear that! I'd like to give it a try to fix the issues to make it run with Windows. |
|
I have fixed most of Windows issues (https://github.com/abelsromero/kscript/tree/add_windows_support) but I am finding problems with the current maven resolution due to issues parsing the output of the mvn command from cygwin (line ending + pathing stuff). Honestly, I don't see the point in fixing those having this PR which makes the resolution much more stable and clean. So, apologies if I sound rude, I just want to be 100% clear here, so I ask can this PR be merged?. As soon as this is merged I can rebase and test it with my fixes. Note I am also testing on Mac and Linux, and checking with Answering the arguments given before:
|
|
Apologies again, I admit I was a bit heated yesterday and overreacted. |
|
I agree waiting for v1.3 or some future conversion/migration is not really helpful. So let's do it then. I've cleaned most open tickets this morning and pushed out a new release, so that we can focus on this PR now. We need to
I think your windows-compat improvements (thanks!) should be done separately (like in a different PR/branch). Not sure if we should merge before or after this one. What do you think? We also need to think about testability: Is there any way we can test windows compat on Travis or some other CI platform that integrates with github? |
|
Thanks for you comprehension.
I agree it should be a separate PR, but after this one, I found issues with running mvn command that honestly I had not clue. For instance, some poms resolved correctly, others not, but only form shell, running from a junit they resolved correctly.
Travis has just recently added windows, or else we can integrate AppVeyor. I have used AppVeyor in many project before, shouldn't be hard to begin with. I can add that to the windows PR, but you'll have to enable it for your repo. |
|
@abelsromero Hi, luckily I'm on vacation for the next weeks, so I should find some time to take care of the conflicts. From my memory: There was also an issue to support a version format like the "1.2+" notation, like gradle supports it. Imo this will require some more effort and I wouldn't implement it (right now). I also really dislike non-fixed versions, so it's also a matter of my personal choice here. ;) Just want to mention it because of "moving the dependency resolution from mvn to gradle". |
# Conflicts: # build.gradle.kts # src/main/kotlin/kscript/app/DependencyUtil.kt # src/test/kotlin/Tests.kt
|
Conflicts in the PR with master: Resolved. |
|
Thanks @andreas-mausch for this great PR and sorry again for the endless delay on my end. |
I missed that too 🤦♂️ |
|
Np, glad you like it. Thanks for merging. |
Sample output:
Some excludes were even needed, otherwise we would see:
Sep 07, 2018 4:03:24 AM org.hibernate.validator.internal.util.Version
INFO: HV000001: Hibernate Validator 5.1.2.Final
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Feedback is welcomed.