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

smithy4sUpdateLSPConfig should render Maven Central if it's in resolvers #1631

Open
kubukoz opened this issue Dec 24, 2024 · 3 comments
Open

Comments

@kubukoz
Copy link
Member

kubukoz commented Dec 24, 2024

If you have any custom resolvers added in your build, then they'll be the only ones rendered into smithy-build.json. However, the default behavior for an empty resolver list is to use Maven Central (and probably m2 local), and using a different list removes that default.

It looks like our task deliberately doesn't write default resolvers, so as a result, adding a custom resolver means the LSP / smithy-cli won't use Maven Central anymore. I think we should be generating that repo, at least in situations where there are customer resolvers present.

@kubukoz
Copy link
Member Author

kubukoz commented Dec 24, 2024

Relevant code (filtering out Maven Central):

.collect {
case r: MavenRepository if !r.root.contains("repo1.maven.org") =>
r.root

@Baccata
Copy link
Contributor

Baccata commented Jan 2, 2025

Agreed

@kubukoz kubukoz changed the title smithy4sUpdateLSPConfig should render Maven Central smithy4sUpdateLSPConfig should render Maven Central if it's in resolvers Jan 2, 2025
@kubukoz
Copy link
Member Author

kubukoz commented Jan 2, 2025

amended the title to be more precise - if the resolvers value doesn't contain maven central, we should still not render it (e.g. in cases you're working for an org that deliberately wants to avoid hitting MC)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants