smithy4s icon indicating copy to clipboard operation
smithy4s copied to clipboard

`smithy4sUpdateLSPConfig` should render Maven Central if it's in `resolvers`

Open kubukoz opened this issue 1 year ago • 3 comments

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 avatar Dec 24 '24 18:12 kubukoz

Relevant code (filtering out Maven Central):

https://github.com/disneystreaming/smithy4s/blob/b25cefe4d7d6b503dcb856f8b1ac2ad1a09d58bd/modules/mill-codegen-plugin/src/smithy4s/codegen/LSP.scala#L48-L50

kubukoz avatar Dec 24 '24 18:12 kubukoz

Agreed

Baccata avatar Jan 02 '25 09:01 Baccata

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)

kubukoz avatar Jan 02 '25 15:01 kubukoz