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

chore: upgrade Spoon to 10.0.1-beta-2 #676

Merged
merged 6 commits into from
Dec 10, 2021
Merged

Conversation

algomaster99
Copy link
Member

@algomaster99 algomaster99 commented Dec 9, 2021

We are upgrading the version of Spoon to this beta release because it has fixes to our high priority bugs and a workaround. I will push tests for all of them in this PR becasue they all are contingent upon the version upgrade. Moreover, it won't make the PR huge and difficult to review.

Bugs

Issue Spoon PR Commit in this PR
#603 INRIA/spoon#4296 9992719
#600 INRIA/spoon#4309 e326cee
#602 INRIA/spoon#4331 76c1e5b

Workaround

Introduced In Spoon PR Commit in this PR
#617 INRIA/spoon#4298 f3b0280

Comment on lines -359 to -369
<profile>
<id>spoonSnapshot</id>
<repositories>
<repository>
<id>ow2.org-snapshot</id>
<name>Maven Repository for Spoon Snapshots</name>
<url>https://repository.ow2.org/nexus/content/repositories/snapshots/</url>
<snapshots><enabled>true</enabled></snapshots>
</repository>
</repositories>
</profile>
Copy link
Member Author

Choose a reason for hiding this comment

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

I removed this XML config because it was not working for fetching SNAPSHOTs of Spoon when I was trying to debug Sorald using it. For using SNAPSHOT version, we can refer how it is done in diffmin because I know it works there.

Copy link
Collaborator

Choose a reason for hiding this comment

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

You don't want to do it like it is in diffmin, because that adds a repository to anything that depends on diffmin. In general, one should avoid adding repositories in pom files, here's a pretty good article about it.

Putting the repository in a profile means that it won't be included by default in dependent libraries/applications, which is desirable. As a concrete example of why it's bad to put repositories in pom files (without putting them in custom profiles): the old snapshot repository we used for Spoon was in its pom file, and it was pretty unreliable and went down every now and then. And every time it did, it wasn't possible to build Spoon or anything depending on Spoon, as that repository couldn't be reached. Even though nothing was fetched from it.

This works perfectly if you activate spoonSnapshot profile, e.g. mvn -P spoonSnapshot compile, but by default the repository isn't included (which is what we want).

Copy link
Member Author

Choose a reason for hiding this comment

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

I did not know this. Thanks!

I was about to argue that it is still safe to enclose SNAPSHOT URLs in repositories however, sorald is also used as a dependency in some other projects, eg. repairnator. So I get your point. I will revert this change whenever we need the SNAPSHOT version next time.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I will revert this change whenever we need the SNAPSHOT version next time.

@algomaster99 Do you think we should open an issue not to forget this? Or should we do it right now?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think so opening an issue is necessary because it is not needed and whenever we want to work with the SNAPSHOT version again, we will know what we have to do. :)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Fine :)

@algomaster99 algomaster99 force-pushed the upgrade-spoon-10.0.1-beta-2 branch 4 times, most recently from e3cfb91 to f3b0280 Compare December 10, 2021 16:18
@algomaster99

This comment has been minimized.

@algomaster99 algomaster99 force-pushed the upgrade-spoon-10.0.1-beta-2 branch from a3d1936 to 395a18c Compare December 10, 2021 17:08
@algomaster99 algomaster99 force-pushed the upgrade-spoon-10.0.1-beta-2 branch from 395a18c to 76c1e5b Compare December 10, 2021 17:16
@algomaster99
Copy link
Member Author

@khaes-kth Let's wait for tests to turn green and then I think we can merge this.

@algomaster99 algomaster99 marked this pull request as ready for review December 10, 2021 17:24
@khaes-kth khaes-kth merged commit 543f563 into master Dec 10, 2021
@khaes-kth khaes-kth deleted the upgrade-spoon-10.0.1-beta-2 branch December 10, 2021 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants