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: enable jbang [email protected] and jbang tree@https:/jbang.dev #1274

Merged
merged 2 commits into from
Mar 9, 2022

Conversation

maxandersen
Copy link
Collaborator

some times creating a root jbang-catalog repo can be problematic or the base github user/org is not really related so instead of jbang cli@awesomefwk it becomes jbang cli@l33t1974/awesomefwk

For a while I had the idea jbang alias should support allowing jbang [email protected] where awesome.fwk is treated as https://awesome.fwk instead of looked up in github/gitlab names.

It is only a draft for now but if you build this (with -x test as the test is broken for now) you can do:

jbang [email protected] because I created https://jbang.dev/jbang-catalog.json

similar jbang [email protected] works.

imagine, jbang [email protected] as opposed to jbang quarkus@RedHatOfficial - as an example.

wdyt ?

btw. this also enables jbang yourscript@https://whatever.path/sdf/sf/jbang-catalog.json - not pretty but there for completenes.

even yourscript@file:///path/on/idsk should work but something goes wrong with relative resolve.

@maxandersen maxandersen requested a review from quintesse March 6, 2022 00:56
quintesse
quintesse previously approved these changes Mar 6, 2022
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

@maxandersen maxandersen force-pushed the implicithost branch 2 times, most recently from 8c959d7 to cb4c50c Compare March 9, 2022 20:42
@codecov
Copy link

codecov bot commented Mar 9, 2022

Codecov Report

Merging #1274 (9d2ce04) into main (238ef90) will increase coverage by 0.33%.
The diff coverage is 17.64%.

❗ Current head 9d2ce04 differs from pull request most recent head d4a32ed. Consider uploading reports for the commit d4a32ed to get more accurate results

Impacted file tree graph

@@             Coverage Diff              @@
##               main    #1274      +/-   ##
============================================
+ Coverage     58.75%   59.09%   +0.33%     
- Complexity     1126     1151      +25     
============================================
  Files            96       97       +1     
  Lines          5962     6016      +54     
  Branches        991      998       +7     
============================================
+ Hits           3503     3555      +52     
+ Misses         1955     1952       -3     
- Partials        504      509       +5     
Flag Coverage Δ
Linux 57.86% <17.64%> (+0.34%) ⬆️
Windows 57.91% <17.64%> (+0.34%) ⬆️

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

Impacted Files Coverage Δ
...ain/java/dev/jbang/catalog/ImplicitCatalogRef.java 56.00% <17.64%> (-3.53%) ⬇️
src/main/java/dev/jbang/source/Jar.java 78.57% <0.00%> (-2.39%) ⬇️
src/main/java/dev/jbang/util/JavaUtil.java 51.19% <0.00%> (-1.83%) ⬇️
src/main/java/dev/jbang/cli/Edit.java 46.55% <0.00%> (-0.41%) ⬇️
src/main/java/dev/jbang/util/Util.java 56.35% <0.00%> (ø)
src/main/java/dev/jbang/source/ResourceRef.java 45.28% <0.00%> (ø)
...c/main/java/dev/jbang/source/ResourceResolver.java 100.00% <0.00%> (ø)
.../jbang/source/resolvers/AliasResourceResolver.java 88.23% <0.00%> (ø)
src/main/java/dev/jbang/source/RunContext.java 90.57% <0.00%> (+0.72%) ⬆️
...a/dev/jbang/source/generators/JshCmdGenerator.java 76.81% <0.00%> (+1.05%) ⬆️
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 238ef90...d4a32ed. Read the comment docs.

quintesse
quintesse previously approved these changes Mar 9, 2022
@maxandersen maxandersen enabled auto-merge (squash) March 9, 2022 21:46
@maxandersen maxandersen disabled auto-merge March 9, 2022 21:47
@maxandersen maxandersen merged commit 64d7a27 into jbangdev:main Mar 9, 2022
@maxandersen maxandersen deleted the implicithost branch March 9, 2022 21:47
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