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

Update dependencies #1211

Merged
merged 3 commits into from
Oct 4, 2022
Merged

Conversation

git-machete-bot
Copy link
Collaborator

No description provided.

@@ -117,7 +117,7 @@ public void inner_classes_should_not_be_instantiated_from_constructor_of_enclosi
new DescribedPredicate<JavaConstructorCall>(
"an inner class is instantiated in a constructor of the enclosing class") {
@Override
public boolean apply(JavaConstructorCall input) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

from https://github.com/TNG/ArchUnit/releases/tag/v1.0.0-rc1:

DescribedPredicate now extends the JDK 8 Predicate, so apply(..) has to be replaced by test(..)

I think it only required change to get it working. However, all the changes and features may be worth reviewing and possibly applied

Copy link
Collaborator

Choose a reason for hiding this comment

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

Potentially relevant changes:

Accesses from inside of lambdas are now correctly detected. Before, the origin was set as a synthetic method like lambda$xxx$123 instead. JavaAccess can now be queried for isDeclaredInLambda() to distinguish this from an access outside of a lambda (see TNG/ArchUnit#847; thanks a lot to @oberprah, @FrederikFinckh)

New methods codeUnits().should().onlyBeCalled().by{Classes/Methods/...}That(..)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Opened #1212

Copy link
Collaborator

Choose a reason for hiding this comment

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

Accesses from inside of lambdas are now correctly detected

Copy link
Collaborator

Choose a reason for hiding this comment

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

ok, i got it

Copy link
Collaborator

Choose a reason for hiding this comment

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

somehow it lambdas pass this check:

if (method.getName().startsWith("access$") || method.getName().startsWith("lambda$")) {
     return;
}

Copy link
Collaborator

Choose a reason for hiding this comment

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

but we can now use:

if (call.isDeclaredInLambda()) {
    // ignore
}

Copy link
Collaborator

Choose a reason for hiding this comment

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

To be fixed within #1212

@PawelLipski
Copy link
Collaborator

PawelLipski commented Oct 4, 2022

Sum-Ting-Wong with UI thread tests... I'll take care of that okay already patched by 🎅🏻

@mkondratek mkondratek force-pushed the update-deps/5b1e835fce66e904a9446767948cf846 branch 3 times, most recently from 5e3440e to 01c15e8 Compare October 4, 2022 08:57
@mkondratek mkondratek force-pushed the update-deps/5b1e835fce66e904a9446767948cf846 branch from 01c15e8 to b5a6ca8 Compare October 4, 2022 10:15
@mkondratek mkondratek enabled auto-merge (rebase) October 4, 2022 10:15
@mkondratek mkondratek merged commit 18d37f6 into develop Oct 4, 2022
@mkondratek mkondratek deleted the update-deps/5b1e835fce66e904a9446767948cf846 branch October 4, 2022 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants