-
-
Notifications
You must be signed in to change notification settings - Fork 435
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
Spring Boot starter does not bring spring-boot-starter
#2866
Comments
Hello @snicoll and thanks for the feedback. We'll discuss internally how we want to handle this. Is it the naming that contains One of the reasons is our auto install feature (not released yet) in https://github.com/getsentry/sentry-android-gradle-plugin where we could be causing problems (e.g. circular dependency lookups) in combination with other libraries that analyze / manipulate dependencies. While we could look into sending PRs to fix those cases in each of the affected libraries (at least for open source ones), that would still mean we can't support versions before the fix. If this is mostly just for having a better experience on start.spring.io, can we somehow automatically add Edit: Sorry I missed the following statement in the linked issue:
|
I don't know. Is it a Spring Boot starter? If so, it should bring
What framework?
Sorry I didn't get any of that.
No. The concept of a starter is that adding it is all that's needed to get started with X (where X is the target of the starter).
I did, but only as of workaround until we find a fix for this issue. Unfortunately, we're in an odd situation right now. Either the starter should comply with our requirement or it shouldn't be named like one. Either way is fine, even if I have a preference for the former. But the current state is not okay. |
Is there a definition as to what should be called a starter and what not? Or is this the full definition?
Spring (boot) in this case.
Basically we'd be causing builds to break (with exceptions making it hard to find the cause like |
I gave a link to the reference guide already. Here it is again. This section a bit below is also of interest.
Sorry, I don't understand. If you have a Spring Boot starter or, rather an artifact called "sentry-spring-boot-starter", I don't get why users would have to bring Spring Boot. It's very obvious from the name it's tied to Spring Boot.
OK, that looks like something that should be fixed in the Gradle plugin and unrelated to Spring Boot. |
@adinauer Alex I think we should not auto-install sentry-spring-boot-starters. As I understood this is supposed to be like a convenient BOM of dependencies that has everything to get you started (lol) with an integration/framework/technology, so there's nothing really to auto-install from our side (no dependency to tie the starter with). |
@snicoll sorry I skimmed the link but didn't read far enough up and down. Thanks for linking again. tl;dr: Our auto install feature in our gradle plugin should add dependency on a new module that should have
I think of it this way: A user decides on a certain library to solve their problem. In this case the user would chose to build their application using Spring. They then decide they want Sentry features on top of that so they add our dependency for Spring (Boot). It's not like they choose Sentry first and then use our Starter that brings in Spring Boot. Will try to provide more detail below.
That's true for
This makes me think our existing modules should rather be called
Makes me think we should have separate starters for WebFlux and WebMVC, maybe even GraphQL (not released yet). We currently rely on conditional checks for our auto configuration. IMO it's easier for users to add a single dependency and it automatically figures out what features can / should be enabled rather than requiring them to add a starter per feature. This again ties in with what I wrote further up where users chose libraries that solve their problem and then add Sentry for getting more insights into errors / performance etc. of those libraries.
This would include
Yes, this has nothing to do with Spring Boot. And I agree it should be fixed somewhere else in theory but doing so has drawbacks where we break users builds with cryptic exceptions. A workaround would be to have another module that is added by the auto install feature. If I understand what I read correctly, this should be called
@romtsn we can tie it to @snicoll please let me know if you agree with the module names and structure of dependencies. |
@snicoll is there any urgency to changing our module structure or can we keep the existing workaround in start.spring.io? |
That doesn't matter. The semantic of a Spring Boot starter should not change based on the fact that a particular starter is likely to be added on top of other starters.
I think you lost me now. What do you mean by "makes me think". This is what I am reporting and asking in this issue since the very beginning.
You are going in the opposite direction now. Spring Boot with web, security and JPA is very popular. Yet we haven't created a "spring-boot-starter-web-security-data-jpa". Rather we have auto-configuration that reacts on the presence of certain libraries and combining starters does the right thing. In your case, the sentry starter + the "official" graphQL starter could enable whatever is necessary without the need of a dedicated starter on your end.
That could be an option, yes. However, the doc does not suggest to name it auto-configure (but that's fine if you prefer that). Basically rename the current module to
I wouldn't have accepted the entry before this issue was handled one way or another. However, given how much time we took to process it, I added it with the workaround for now. No urgency no, but this will need to be adressed for the entry to stay on start.spring.io. |
I just tried to write down my thoughts while reading through the docs you linked. Mostly for myself when I come back and reread in the future.
Sounds good. That's the way it works at the moment.
Thanks. We'll discuss naming internally as people come back from vacation. We can also discuss changing the whole jakarta and javax naming in the next major. Majority of our users at the moment is still on Spring Boot 2 though so might be too early for us to rename it now.
Thanks, we'll make sure to resolve this. |
Integration
sentry
Java Version
17
Version
6.26.0
Steps to Reproduce
sentry-spring-boot-starter-jakarta
to a Spring Boot applicationSee also https://docs.spring.io/spring-boot/docs/current/reference/html/features.html#features.developing-auto-configuration.custom-starter.starter-module
Expected Result
compilation succeed.
Actual Result
The text was updated successfully, but these errors were encountered: