stimulus-parser icon indicating copy to clipboard operation
stimulus-parser copied to clipboard

Detect deprecated `esbuild-rails` gem and warn about it

Open marcoroth opened this issue 1 year ago • 3 comments

The Stimulus Parser currently doesn't know how to handle https://github.com/rails/esbuild-rails.

We should detect the usage and warn the user that the Stimulus Parser doesn't work with this deprecated gem.

Reported by @asilano, thank you!

marcoroth avatar Jul 14 '24 15:07 marcoroth

Hey - thanks for picking up my email!

I realise I rambled a bit, but it looks to me like Stimulus Parser supports esbuild-rails (analyzeEsbuildRails, called from ControllersIndexFile#analyze().

Our project - where the LSP isn't picking up registered controllers - is using (recommended replacement) jsbundling-rails with esbuild-plugin-stimulus; I think the parser doesn't know how to handle that.

asilano avatar Jul 14 '24 15:07 asilano

Hey Chris, I'm not done yet, but wanted to respond to your email too!

The esbuild-rails support the parser supports is for the esbuild-rails NPM package.

I personally wasn't aware of esbuild-plugin-stimulus, but I guess it would make sense to support that too!

Looking at it, it seems that esbuild-rails and esbuild-plugin-stimulus are very similar.

marcoroth avatar Jul 14 '24 16:07 marcoroth

I opened an issue to add support for esbuild-plugin-stimulus too 🙌🏼

marcoroth avatar Jul 14 '24 16:07 marcoroth