-
Notifications
You must be signed in to change notification settings - Fork 5k
Check if distribution url is reachable #8406
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
Conversation
Signed-off-by: Stefan M <[email protected]>
@StefMa Thanks for submitting this PR. I think this touches on some of #6137, but I think there are a few things tied up there:
For 3), one thing we've thought about in the past was to make sure the gradlew scripts and wrapper jar were from the target distribution. If we did this, I think we'd get the validation for "free" since we'd need to download the distribution during the update. This is a bigger change and would need some thinking. For 4), one simple thing we could do is improve the error messages when Gradle can't download a distribution. Instead of just getting a big ugly stacktrace, we could show something more human readable. This could help other situations where someone manually changes the gradle-wrapper.properties file. IMO, this is a low priority annoyance. When I do wrapper upgrades, I just do this out of habit now:
There are questions in my mind about how much other validation should be done (checking full URLs, configuring the build with the new distribution, trying to download the distribution, etc) and maybe it would be worth spending time on something else (better errors, making it easier to upgrade so you're not dealing with versions at all). I think the easiest way to test something like this would be to try to select a version that we know doesn't exist (e.g., 1.2.3) or running a HTTP server that doesn't serve the distribution we look for (there are some tests that do this already). |
Hey @big-guy thanks for the comment 👍 From my point of view - and as a Gradle user - the most used argument is
When I read this I think about to change the |
@StefMa, see http://services.gradle.org/, especially "Version Information" |
Thank you Paul.
What do you think about this solution? Is it worth to implement?
…On Tue, Feb 5, 2019, 11:39 AM Paul Merlin ***@***.***> wrote:
@StefMa <https://github.com/StefMa>, see http://services.gradle.org/,
especially "Version Information"
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#8406 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AJwYe8NxsX-yq5EsTth0QeAttJ3ch9N0ks5vKV9IgaJpZM4ahSMX>
.
|
@StefMa I've just come back around to this PR. I'm trying to work off the backlog of community PRs and respond a bit quicker than we have before. This is what I think we should do to make Gradle a little bit better:
Please keep in mind that the distribution URL doesn't necessarily mean HTTP. It could be a file:// How does that sound? Thanks for your help in advance. |
I'm going to close this PR for now. Please feel free to submit a new one based on my comment above |
Context
See #6137.
TBH I'm not quite sure if this the right/best solution to do so.
If you have a better idea please tell me 👍
I also don't know how to mock this away from the tests... 🤔
Contributor Checklist
Provide integration tests (under<subproject>/src/integTest
) to verify changes from a user perspective<subproject>/src/test
) to verify logic./gradlew <changed-subproject>:check
Gradle Core Team Checklist