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

Have apply-error-prone-suggestions.sh download JitPack-hosted artifacts #441

Merged
merged 1 commit into from
Jan 6, 2023

Conversation

Stephan202
Copy link
Member

@Stephan202 Stephan202 commented Jan 4, 2023

Suggested commit message:

Have `apply-error-prone-suggestions.sh` download JitPack-hosted artifacts (#441)

While there, tweak the usage message of both `apply-error-prone-suggestions.sh`
and `run-mutation-tests.sh`.

@Stephan202 Stephan202 added this to the 0.7.0 milestone Jan 4, 2023
@Stephan202 Stephan202 requested a review from rickie January 4, 2023 08:24
@github-actions
Copy link

github-actions bot commented Jan 4, 2023

Looks good. No mutations were possible for these changes.
Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed.

Copy link
Member Author

@Stephan202 Stephan202 left a comment

Choose a reason for hiding this comment

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

So as indicated this is not a perfect fix, but it's the easiest thing I can do on short notice. (Modifying pom.xml isn't harder, but then there are more cases I'd have to reason about, including any possible impact on the next release to Maven Central.) As this is an improvement regardless, I think it's an acceptable change.

CC @benhalasi in case you want to try it :)

@@ -9,13 +9,14 @@
set -e -u -o pipefail

if [ "${#}" -gt 1 ]; then
echo "Usage: ./$(basename "${0}") [PatchChecks]"
echo "Usage: ${0} [PatchChecks]"
Copy link
Member Author

Choose a reason for hiding this comment

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

We no longer assume that the script is executed from the directory in which it resides.

exit 1
fi

patchChecks=${1:-}

mvn clean test-compile fmt:format \
-s "$(dirname "${0}")/settings.xml" \
Copy link
Member Author

Choose a reason for hiding this comment

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

This fix has downsides of its own: it overrides the user's settings.xml, which may contain other useful or even required settings. For Picnic devs it means that our Nexus deployment is bypassed, triggering one extra round of downloads.

The alternative is to move the settings.xml contents into a profile in the top-level pom.xml, but I seem to recall that Maven Central doesn't like that. (Or perhaps is does allow it when part of a profile? I'd have to check.)

Copy link
Member

Choose a reason for hiding this comment

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

Based on Setting up multiple repositories (esp. the order) and Using mirrors for repositories; as Picnic devs mirror everything anyway, could we instead just place repositories in the root of the pom (i.e. not in a profile)? Then we can also omit the settings.xml altogether.

To my understanding, this would behave the same as that the super pom defines a repository to Maven central, which is always included too.

Copy link
Member

@rickie rickie left a comment

Choose a reason for hiding this comment

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

Thanks for the quick fix @Stephan202 !

Would indeed be nice if @benhalasi is up for checking if with these changes it'd work 😄.

Verified that it still works for me :).

@rickie rickie force-pushed the sschroevers/use-custom-maven-settings branch from 3922e27 to 82a929f Compare January 5, 2023 16:57
@github-actions
Copy link

github-actions bot commented Jan 5, 2023

Looks good. No mutations were possible for these changes.
Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed.

@rickie rickie force-pushed the sschroevers/use-custom-maven-settings branch from 82a929f to 11cc582 Compare January 6, 2023 07:49
@github-actions
Copy link

github-actions bot commented Jan 6, 2023

Looks good. No mutations were possible for these changes.
Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed.

Copy link
Member

@Badbond Badbond left a comment

Choose a reason for hiding this comment

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

LGTM. An approvement nonetheless indeed.

exit 1
fi

patchChecks=${1:-}

mvn clean test-compile fmt:format \
-s "$(dirname "${0}")/settings.xml" \
Copy link
Member

Choose a reason for hiding this comment

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

Based on Setting up multiple repositories (esp. the order) and Using mirrors for repositories; as Picnic devs mirror everything anyway, could we instead just place repositories in the root of the pom (i.e. not in a profile)? Then we can also omit the settings.xml altogether.

To my understanding, this would behave the same as that the super pom defines a repository to Maven central, which is always included too.

…acts

While there, tweak the usage message of both `apply-error-prone-suggestions.sh`
and `run-mutation-tests.sh`.
@rickie rickie force-pushed the sschroevers/use-custom-maven-settings branch from 11cc582 to 4c4794b Compare January 6, 2023 09:28
@github-actions
Copy link

github-actions bot commented Jan 6, 2023

Looks good. No mutations were possible for these changes.
Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed.

@benhalasi
Copy link
Contributor

I've checked and works well for me too. @rickie

@rickie
Copy link
Member

rickie commented Jan 6, 2023

I've checked and works well for me too. @rickie

Thanks for verifying @benhalasi !

@rickie rickie changed the title Have apply-error-prone-suggestions.sh download Jitpack-hosted artifacts Have apply-error-prone-suggestions.sh download JitPack-hosted artifacts Jan 6, 2023
@rickie rickie merged commit 9a9ef3c into master Jan 6, 2023
@rickie rickie deleted the sschroevers/use-custom-maven-settings branch January 6, 2023 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore A task not related to code (build, formatting, process, ...)
Development

Successfully merging this pull request may close these issues.

None yet

4 participants