smithy-lang / smithy-language-server

A Language Server Protocol implementation for the Smithy IDL
https://smithy.io
Apache License 2.0
33 stars 18 forks source link

build/smithy/classpath.json interferes with my build system #140

Open mcmasn-amzn opened 5 months ago

mcmasn-amzn commented 5 months ago

I'm using the VS Code Smithy plugin. It appears that the Smithy LS is generating a file at build/smithy/classpath.json. Because the build/ folder has special meaning for my build system, this file is causing my build system to fail with file conflict issues.

Request

Is there a way to change the location of this cache file? For example, in my build system, nesting the file in build/private/ would be a better subfolder to use.

Workaround

I frequently have to run rm */build/smithy/classpath.json to get my project to compile

kubukoz commented 5 months ago

IMO it should be something like .smithy/build.

This is an issue with smithy-cli btw, not with the LSP, so you might want to have it moved to https://github.com/smithy-lang/smithy/.

mcmasn-amzn commented 5 months ago

Possibly. I'll let the experts route here to the correct place. I made a best guess based on what I was finding in code. I came across this in the LSP project: https://github.com/smithy-lang/smithy-language-server/blob/fea1fd7638f5595b21f906e557df15da6338a380/src/main/java/software/amazon/smithy/lsp/SmithyTextDocumentService.java#L165-L182

kubukoz commented 5 months ago

ah, very well, I stand corrected - I thought it was only in the other repo, but it seems like it's in both.

https://github.com/smithy-lang/smithy/blob/e671ac92cf6ce5fe14f645d7088e27c652d4373f/smithy-build/src/main/java/software/amazon/smithy/build/SmithyBuild.java#L441