-
Notifications
You must be signed in to change notification settings - Fork 166
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: Added support for script dependencies #1641
Conversation
They were too lenient and matched invalid URLs
They were too lenient and would match too many invalid coordinates.
Awesome. Does swizzled urls work too? Ie. For gist and fully qualified catalogs? |
@@ -11,17 +11,17 @@ | |||
|
|||
public class JitPackUtil { | |||
private static final Pattern GITHUB_TREE_PATTERN = Pattern.compile( | |||
"^https?://github.com/(.+?)/(.+?)(/tree/(.+?)(/(.+?))?)?/?$"); | |||
"^https?://github.com/([^/]+?)/([^/]+?)(/tree/([^/]+?)(/(.+?))?)?/?$"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are these patterns changing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because they are too lenient, they match URLs that are not valid JitPack URLs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For example it will match https://github.com/jbangdev/jbang/blob/main/itests/SankeyPlotTest.java , even though that's obviously neither a "tree" nor a "commit".
Haven't tried yet, this is the first working version 😉 Edit: I don't think aliases will work, though... |
first quick test with this beauty:
at first glance worked - even vscode picked up the new deps. a few things:
The Building jar should have some indication of what its building now. If touch just the hello.java I still get:
shouldn't there only be one Building Jar in that case ? |
instant stack overflow :) |
btw. |
|
Source dependencies would always be rebuilt whenever the parent script was built. This was because they were really built a part of (meaning inside of) the parent's build folder, not as an independent artifact. This is now no longer the case and building a script as part of a dependency or standalone will now result in the same artifact.
You can now do:
And those files will be compiled, if needed, and added as dependencies on the classpath.