Skip to content

docs(examples): Add Bazel example for core utilities #2022

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

Merged
merged 4 commits into from
Aug 7, 2025

Conversation

phipag
Copy link
Contributor

@phipag phipag commented Aug 7, 2025

Summary

This PR adds a new code example sam-bazel showcasing how to use the Core Utilities including AspectJ compile-time weaving using Bazel.

Changes

Issue number: #2021


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

@phipag phipag self-assigned this Aug 7, 2025
@phipag phipag added documentation Improvements or additions to documentation and removed size/XL labels Aug 7, 2025
@phipag phipag requested a review from dreamorosi August 7, 2025 14:57
@phipag phipag linked an issue Aug 7, 2025 that may be closed by this pull request
1 task
Copy link

sonarqubecloud bot commented Aug 7, 2025

@phipag phipag moved this to Pending review in Powertools for AWS Lambda (Java) Aug 7, 2025
Copy link
Contributor

@dreamorosi dreamorosi left a comment

Choose a reason for hiding this comment

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

Should we add a mention/link to the main docs to this example? If someone is reading the docs they won't know it exists unless they go browse the example dir in the repo.

I don't think we need to add a full blown section for now, but maybe a callout box along the lines of "Looking to use Bazel to bundle your function? Check this example in our repo" or similar.

@phipag
Copy link
Contributor Author

phipag commented Aug 7, 2025

At the moment we have this section: https://docs.powertools.aws.dev/lambda/java/latest/core/logging/#getting-started. Which references the examples folder on GitHub. Although this is only the case for the Logging utility.

I don't think we should specifically highlight the Bazel example and not the other examples. One could argue why Bazel is more important than for example our Gradle or Kotlin examples.

But I agree with your comment that the examples are not referenced in our documentation in a popular way. Do you have something in mind what we can do? Maybe on your homepage? We can add a box such as

Looking for examples?
Checkout the full list of LINK TO EXAMPLES including usage examples for Gradle, Bazel, and Kotlin.

@dreamorosi
Copy link
Contributor

Fair, then let's leave it as is for now.

Not in this PR, but in the near future we could consider introducing a similar structure as we have in TypeScript with a "Getting Started" collection of pages, for example this one shows how to install different packages and this shows different patterns, and this one TypeScript settings.

Obviously in the case of Java the content would be different, but this would probably be a good place to show these type of things, explain nuances around AspecJ, Crac, GraalVM, and similar things - in addition to utility-specific info on the respective pages.

@dreamorosi dreamorosi self-requested a review August 7, 2025 15:23
Copy link
Contributor

@dreamorosi dreamorosi 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 working and adding this quickly!

@phipag
Copy link
Contributor Author

phipag commented Aug 7, 2025

Thanks. I like these sections.

@phipag phipag merged commit ee995f7 into main Aug 7, 2025
12 checks passed
@phipag phipag deleted the phipag/bazel-example branch August 7, 2025 15:26
@github-project-automation github-project-automation bot moved this from Pending review to Coming soon in Powertools for AWS Lambda (Java) Aug 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation size/XL
Projects
Status: Coming soon
Development

Successfully merging this pull request may close these issues.

Docs: Create example for using Bazel build system
2 participants