smithy-language-server icon indicating copy to clipboard operation
smithy-language-server copied to clipboard

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

Open mcmasn-amzn opened this issue 1 year ago • 3 comments

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

mcmasn-amzn avatar Jan 25 '24 17:01 mcmasn-amzn

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/.

kubukoz avatar Jan 26 '24 21:01 kubukoz

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

mcmasn-amzn avatar Jan 26 '24 21:01 mcmasn-amzn

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

kubukoz avatar Jan 26 '24 22:01 kubukoz

#146 should fix this by no longer generating that file

milesziemer avatar Jul 29 '24 16:07 milesziemer