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

Compilation warning when using powertools logging utility #945

Closed
Wynndow opened this issue Oct 5, 2022 · 2 comments
Closed

Compilation warning when using powertools logging utility #945

Wynndow opened this issue Oct 5, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@Wynndow
Copy link

Wynndow commented Oct 5, 2022

What were you trying to accomplish?

Compile a Java lambda using the Powertools logging utility without receiving compilation warnings.

Expected Behavior

No compilation warning when compiling.

Current Behavior

We introduced the powertools logging utility to our lambdas, compiled with Gradle. We're using the AspectJ Weaving Plugin to
bring in the package.
Now, when compiling the Java for each lambda in the project we receive a warning:

[warning] no match for this type name: SqsLargeMessageAspect [Xlint:invalidAbsoluteTypeName]

I’ve found the SqsLargeMessageAspect class defined in the powertools-sqs package - but we’re not using it. I’ve tried including it in the project to see if it helps with the warning, but it doesn’t.

The only other reference I can find to it is in software.amazon.lambda.powertools.logging.internal.LambdaLoggingAspect where it’s declared in a DeclarePrecedence annotation.

Steps to Reproduce (for bugs)

  1. Clone https://github.com/alphagov/di-ipv-core-back
  2. Run ./gradlew clean :lambdas:select-cri:compileJava
  3. Observe warning

Environment

  • Powertools version used: 1.12.2
  • Packaging format (Layers, Maven/Gradle): Gradle
  • AWS Lambda function runtime: java11
  • Debugging logs

How to enable debug mode**

> Task :lambdas:select-cri:compileJava
/di-ipv-core-back/lambdas/select-cri/build/classes/java/main/uk/gov/di/ipv/core/selectcri/SelectCriHandler.class [warning] no match for this type name: SqsLargeMessageAspect [Xlint:invalidAbsoluteTypeName]
(no source information available)
        [Xlint:invalidAbsoluteTypeName]

1 warning
@Wynndow Wynndow added the bug Something isn't working label Oct 5, 2022
@jhuiting
Copy link

I'm also facing the same error locally, with 1.12.3.

@msailes
Copy link
Contributor

msailes commented Dec 14, 2022

This has been fixed in v1.13.0

@msailes msailes closed this as completed Dec 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants