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

Allow attaching sources to dependencies #2591

Closed
cursive-ide opened this issue Sep 28, 2021 · 0 comments
Closed

Allow attaching sources to dependencies #2591

cursive-ide opened this issue Sep 28, 2021 · 0 comments
Labels
new Marks issues describing new features released Marks issues which have had the fixes released in a stable build
Milestone

Comments

@cursive-ide
Copy link
Owner

Often, especially when working with e.g. Java dependencies, it's useful to be able to attach sources to the libraries that are created when a project is imported. IntelliJ does this by default for all Maven or Gradle dependencies, but this is very slow when using Clojure since most artefacts are published without source (or, more correctly, the sources are actually the binary artefact). If Cursive tries to download sources for all artefacts, it is very slow since the Maven resolver will go out to all the remote repositories for every artefact looking for sources which will never exist.

Maven-like things publish the source artefacts using the "sources" classifier. In deps, these can be downloaded using, e.g.:

junit/junit {:mvn/version "4.13.2"}
junit/junit$sources {:mvn/version "4.13.2"}

Cursive should detect if a downloaded artefact contains sources for another, and attach it if so. The sources could also be specified in an alias which is used to sync to Cursive, meaning that the sources will not be resolved for other uses, e.g:

{:deps    {junit/junit {:mvn/version "4.13.2"}}
 :aliases {:ide {:extra-deps {junit/junit$sources {:mvn/version "4.13.2"}}}}}

This will allow the user to specify which dependencies they want sources downloaded for in a non-intrusive way.

@cursive-ide cursive-ide added this to the 1.11.1 milestone Sep 28, 2021
@cursive-ide cursive-ide added the new Marks issues describing new features label Oct 24, 2021
@cursive-ide cursive-ide modified the milestones: 1.12.0, 1.12.0-eap1 Oct 25, 2021
@cursive-ide cursive-ide added the released Marks issues which have had the fixes released in a stable build label Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new Marks issues describing new features released Marks issues which have had the fixes released in a stable build
Projects
None yet
Development

No branches or pull requests

1 participant