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

Keeps trying to yardoc my node projects #13

Closed
corbinu opened this issue Sep 27, 2017 · 7 comments
Closed

Keeps trying to yardoc my node projects #13

corbinu opened this issue Sep 27, 2017 · 7 comments
Assignees
Labels

Comments

@corbinu
Copy link

corbinu commented Sep 27, 2017

So I installed the extension as I am starting to work on a legacy Ruby project but now all day whenever I open an Node project in VSCode yardoc keeps generating a .yardoc and a doc directory despite the project I have open having no Ruby code in it. Seems like a bug.

Thanks!

@castwide
Copy link
Owner

Are you using any sort of Ruby-based software for builds or deployment, e.g., Capistrano? It's possible that opening files like Rakefile or Gemfile activate Solargraph and cause it to build a yardoc. I noticed this happens when I created a Gemfile in an Electron project that didn't contain any other Ruby.

It's also possible that you're getting false positives based on a common file extension that VS Code thinks might be Ruby, such as .spec or .builder.

At any rate, it does seem like a bug. The best solution might be to skip generating a yardoc unless the workspace contains .rb files.

@castwide castwide added the bug label Sep 28, 2017
@castwide
Copy link
Owner

I'm working on a possible solution in the Solargraph gem. I added a routine that checks the list of files that YARD would process. If the list is empty, the yardoc does not get generated.

@castwide castwide self-assigned this Sep 28, 2017
@corbinu
Copy link
Author

corbinu commented Sep 28, 2017

Thanks. No I am not. Maybe a .spec or .rb file is in the node_modules folder that's the only thing I can think of will dig a little deeper.

@castwide
Copy link
Owner

Okay, thanks. I have a feeling this WIP will resolve your issue, but it would definitely help to know what activated the extension.

@castwide
Copy link
Owner

castwide commented Oct 3, 2017

Upcoming changes to the gem and extension should render this issue moot. The new Solargraph::ApiMap no longer requires a local yardoc file, so the extension will stop generating it. (See castwide/solargraph#9 for more info)

@corbinu
Copy link
Author

corbinu commented Oct 3, 2017

cool thanks!

@castwide
Copy link
Owner

castwide commented Oct 4, 2017

Gem version 0.13.0 and extension version 0.9.0 are released. Yardocs are no longer generated automatically. YARD is still used for external gems, but it's not required in the workspace.

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

No branches or pull requests

2 participants