-
-
Notifications
You must be signed in to change notification settings - Fork 331
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
GenIdea/idea task should generate appropriate config from libs build.sc depends on #347
Comments
Perhaps Mill could ask Ammonite what jars it has loaded into the classpath by the time the script is running, and use those? Ammonite already tracks all this stuff, and it should accurately reflect what code you are able to utilize in your |
Is there an easy way to access ammonite's interpreter from mill ? My initial idea was :
but if we can replace the Also, a quick look at the sources tells me that ammonite resolves the sources as well as the jars by default. Can you confirm ? |
For now just grab the SpecialClassloader however you can; once it's working we can put a nice API in place for Mill to use Yeah ammonite resolves sources to make the |
This is still not working. In my build.sc I have this dependency: import $ivy.`com.github.pureconfig::pureconfig:0.13.0` The actual Mill build works fine, compiles, produces artifact, etc. It finds and downloads the pureconfig dependency. My environment: |
@lilyevsky Can you please open a new issue with a repro? |
@lefou I started working on the new issue, and I created some simple example, and it actually worked. So there was no problem there. However, my other projects where I use my special predefScript.sc has this problem. The difference is, in that predefScript.sc I set it to take all libraries from our Nexus:
I use this predefScript.sc in all my projects - I have to, because we are behind the firewall, and so the official build on buildserver would not work otherwise. In my own workspace I can get artifacts from internet directly, this is how I can test. So I am not sure how to give you something that you can reproduce. You need to have Nexus, set up predefScript.sc similar to mine, and then in your build.sc put something like this:
Then you will see, when you do GenIdea thing and open the project in IntelliJ, that pureconfig library was not added to the list of external libraries. If you think this is enough information to reproduce, let me know, then I can create a new issue. Related question: do you know if anybody is planning to create a real mill Idea plugin? That would be really nice. |
If the build depends on external libraries (imported through
import $ivy
), the GenIdea/idea task should generate configuration for those libraries accordingly.I assume the difficulty comes from the fact that the references to those libraries are not easily inspectable from the task. Maybe by looking at the classloader (ammonite has a SpecialClassLoader that keeps track of the urls of loaded jars) and inferring the various libs from where they are stored in the coursier cache ?
The text was updated successfully, but these errors were encountered: