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

Get rid of Guava? #136

Closed
LorenzoBettini opened this issue May 15, 2021 · 13 comments · Fixed by #160
Closed

Get rid of Guava? #136

LorenzoBettini opened this issue May 15, 2021 · 13 comments · Fixed by #160
Labels
a: question ❓ Ask further information an: enhancement 📈 Improve something
Milestone

Comments

@LorenzoBettini
Copy link
Collaborator

Motivation

Do we really need Guava? With Java 8 we could do without.
While working on #135 I have already gotten rid of Guava Optional (in favor of Java 8 Optional, as reported by Sonar); similarly for Guava Object that can be replaced by Java Objects.

We could also do without Immutable Collections, couldn't we? Do we really need Immutable Collections properties?

My main concerns about our use of Guava is that in future versions of Eclipse a newer version of Guava might be present that is not more compatible with the one we use

@LorenzoBettini LorenzoBettini added an: enhancement 📈 Improve something a: question ❓ Ask further information labels May 15, 2021
@LorenzoBettini
Copy link
Collaborator Author

Of course we could keep Guava in tests if that's strictly necessary

@echebbi
Copy link
Collaborator

echebbi commented May 15, 2021

Guava is only there for legacy reasons. Now that Pitclipse relies on Java 8+ I see no obvious reason to keep the dependency to the library.

@LorenzoBettini
Copy link
Collaborator Author

NOTE: WorkspaceLevelClassFinder should use ProjectUtils, just like WorkspaceLevelProjectFinder does

@LorenzoBettini
Copy link
Collaborator Author

Maybe we can simply reorder the definition of enum values so that we don't need this guava Ordering?

    private enum StatusComparator implements Comparator<Status> {
        INSTANCE;

        private static final Ordering<DetectionStatus> STATUSES_IN_ORDER = Ordering.explicit(ImmutableList.of(SURVIVED,
                NOT_STARTED, STARTED, KILLED, TIMED_OUT, NON_VIABLE, MEMORY_ERROR, RUN_ERROR, NO_COVERAGE));

        @Override
        public int compare(Status lhs, Status rhs) {
            return STATUSES_IN_ORDER.compare(lhs.getDetectionStatus(), rhs.getDetectionStatus());
        }
    }

@LorenzoBettini
Copy link
Collaborator Author

    private List<String> splitBasedOnComma(String elements) {
        return Arrays.stream(elements.split(","))
                .map(String::trim)
                .filter(s -> !s.isEmpty())
                .collect(Collectors.toList());
    }

to an utils class

@LorenzoBettini LorenzoBettini mentioned this issue Aug 24, 2022
29 tasks
LorenzoBettini added a commit that referenced this issue Aug 28, 2022
LorenzoBettini added a commit that referenced this issue Aug 28, 2022
LorenzoBettini added a commit that referenced this issue Aug 28, 2022
LorenzoBettini added a commit that referenced this issue Aug 28, 2022
LorenzoBettini added a commit that referenced this issue Aug 28, 2022
LorenzoBettini added a commit that referenced this issue Aug 28, 2022
LorenzoBettini added a commit that referenced this issue Aug 28, 2022
LorenzoBettini added a commit that referenced this issue Aug 28, 2022
Task-Url: #136
LorenzoBettini added a commit that referenced this issue Aug 28, 2022
LorenzoBettini added a commit that referenced this issue Aug 28, 2022
@LorenzoBettini
Copy link
Collaborator Author

For .runner project, MutationsModel remains

LorenzoBettini added a commit that referenced this issue Aug 28, 2022
LorenzoBettini added a commit that referenced this issue Aug 28, 2022
LorenzoBettini added a commit that referenced this issue Aug 28, 2022
@LorenzoBettini
Copy link
Collaborator Author

todo org.pitest.pitclipse.ui

LorenzoBettini added a commit that referenced this issue Aug 28, 2022
LorenzoBettini added a commit that referenced this issue Aug 29, 2022
LorenzoBettini added a commit that referenced this issue Aug 29, 2022
LorenzoBettini added a commit that referenced this issue Aug 29, 2022
@LorenzoBettini
Copy link
Collaborator Author

REMOVED from bundles, now we can remove it from the classpath built when running PIT and from the dependencies of our features (probably also remove the repository reference?)

@Bananeweizen
Copy link
Contributor

If I got it right, the 2.7.5 fixes the issue. It's meanwhile released, so you may want to upgrade again.

@LorenzoBettini
Copy link
Collaborator Author

@Bananeweizen I'm not sure I understand what you mean related to this very issue

@Bananeweizen
Copy link
Contributor

Bananeweizen commented Sep 19, 2022

Sorry for the confusion. The Tycho downgrade from 2.7.4 to 2.7.3 was attributed to this issue. Meanwhile 2.7.5 is released, and I had the understanding that the required/included behavior is as before, making the downgrade to 2.7.3 superfluous.

14b04b2

@LorenzoBettini
Copy link
Collaborator Author

Mh... the downgrade wasn't actually attributed to this issue. However, for sure now I can upgrade to Tycho 2.7.5 :)

@LorenzoBettini
Copy link
Collaborator Author

Oh, now I see that commit. It was part of the branch for this issue, but it's not related to that.

@LorenzoBettini LorenzoBettini added this to the 2.2.1 milestone Sep 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a: question ❓ Ask further information an: enhancement 📈 Improve something
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants