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

feat: adding auto download for sources via edit and JBANG_DOWNLOAD_SOURCES=true #1539

Merged
merged 1 commit into from
Jan 12, 2023

Conversation

maxandersen
Copy link
Collaborator

adding option to have jbang download sources for dependencies.

approach is a bit a naive and will only work if all //DEPS resolves properly but simply
takes the resolved set and then one by one try resolve matching sources classifier.

@codecov
Copy link

codecov bot commented Jan 11, 2023

Codecov Report

Base: 0.00% // Head: 0.00% // No change to project coverage 👍

Coverage data is based on head (6bd8b4d) compared to base (ce15aae).
Patch coverage: 0.00% of modified lines in pull request are covered.

Additional details and impacted files
@@          Coverage Diff          @@
##            main   #1539   +/-   ##
=====================================
  Coverage   0.00%   0.00%           
=====================================
  Files        110     110           
  Lines       6984    7014   +30     
  Branches    1141    1143    +2     
=====================================
- Misses      6984    7014   +30     
Flag Coverage Δ
Linux 0.00% <0.00%> (ø)
Windows 0.00% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...c/main/java/dev/jbang/cli/DependencyInfoMixin.java 0.00% <ø> (ø)
src/main/java/dev/jbang/cli/Edit.java 0.00% <0.00%> (ø)
.../java/dev/jbang/dependencies/ArtifactResolver.java 0.00% <0.00%> (ø)
...ava/dev/jbang/dependencies/DependencyResolver.java 0.00% <0.00%> (ø)
...in/java/dev/jbang/dependencies/DependencyUtil.java 0.00% <0.00%> (ø)
src/main/java/dev/jbang/util/Util.java 0.00% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@maxandersen maxandersen force-pushed the downloadsources branch 2 times, most recently from 3d7dcec to 453279f Compare January 12, 2023 07:10
@maxandersen
Copy link
Collaborator Author

for now we'll change this to use JBANG_DOWNLOAD_SOURCES env var to turn on/off.

in future when we have the resolver pluggable/configurable we can expose a more explicit flag.

@maxandersen maxandersen changed the title feat: adding --ds/--download-sources and auto download for edit feat: adding auto download for sources via edit and JBANG_DOWNLOAD_SOURCES=true Jan 12, 2023
@maxandersen
Copy link
Collaborator Author

@fbricon fyi - if you set JBANG_DOWNLOAD_SOURCES=true env when running jbang it will soon resolve sources.

@maxandersen maxandersen marked this pull request as ready for review January 12, 2023 15:33
Copy link
Contributor

@quintesse quintesse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. We do this quick & dirty solution and then do it properly once we factor out that resolver, as we discussed.

@maxandersen maxandersen merged commit 28957ce into jbangdev:main Jan 12, 2023
@fbricon
Copy link
Contributor

fbricon commented Jan 12, 2023

you merged too soon ;-)

jbang-eclipse doesn't rely on jbang edit, but calls jbang info tools, that's when I expect sources to be downloaded

@maxandersen
Copy link
Collaborator Author

Jbang edit will do it automatically.

Set JBANG_DOWNLOAD_SOURCES=true to have it happen on any command.

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

Successfully merging this pull request may close these issues.

3 participants