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

fix: we don't blindly import JAR metadata anymore #1549

Merged
merged 1 commit into from
Feb 2, 2023

Conversation

quintesse
Copy link
Contributor

We added a way to skip importing metadata into a Project if a JAR was available locally, but that was still causing problems in certain situations. For example if you would compile with Java 19 and then uninstall Java 19 leaving an earlier version, let's say Java 11, jbang would try to download Java 19 just to run the code, even though nothing in the source indicated that was necessary. In that case it's much more convenient to simply recompile the code with Java 11. The solution now is to not import the metadata into the Project anymore, but to make it an explicit action of reading the information and let the code that does the reading decide what to do with it.

We added a way to skip importing metadata into a Project if a JAR was
available locally, but that was still causing problems in certain
situations. For example if you would compile with Java 19 and then
uninstall Java 19 leaving an earlier version, let's say Java 11, jbang
would try to download Java 19 just to run the code, even though nothing
in the source indicated that was necessary. In that case it's much more
convenient to simply recompile the code with Java 11. The solution now
is to not import the metadata into the Project anymore, but to make it
an explicit action of reading the information and let the code that does
the reading decide what to do with it.
@quintesse quintesse marked this pull request as ready for review January 31, 2023 11:02
@codecov
Copy link

codecov bot commented Jan 31, 2023

Codecov Report

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

Coverage data is based on head (3ba9529) compared to base (41012eb).
Patch coverage: 0.00% of modified lines in pull request are covered.

Additional details and impacted files
@@          Coverage Diff          @@
##            main   #1549   +/-   ##
=====================================
  Coverage   0.00%   0.00%           
=====================================
  Files        121     121           
  Lines       7377    7376    -1     
  Branches    1199    1199           
=====================================
+ Misses      7377    7376    -1     
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 Δ
src/main/java/dev/jbang/cli/BaseBuildCommand.java 0.00% <0.00%> (ø)
src/main/java/dev/jbang/cli/Export.java 0.00% <0.00%> (ø)
src/main/java/dev/jbang/cli/Info.java 0.00% <0.00%> (ø)
src/main/java/dev/jbang/source/AppBuilder.java 0.00% <0.00%> (ø)
src/main/java/dev/jbang/source/ProjectBuilder.java 0.00% <0.00%> (ø)
src/main/java/dev/jbang/cli/Alias.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 merged commit 006959a into jbangdev:main Feb 2, 2023
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.

2 participants