christianvoigt / argdown

a simple syntax for complex argumentation
https://argdown.org
923 stars 30 forks source link

Is .yarnrc really required here? #188

Closed im-0 closed 4 years ago

im-0 commented 4 years ago

"Hardcoded" yarn-path caused problem when I tried to build VSCode extension myself, before trying to add it into Open VSX (see https://github.com/open-vsx/publish-extensions/pull/145).

christianvoigt commented 4 years ago

Hi, cool that you are taking care of adding Argdown to open-vsx!

As far as I know .yarnrc files should be committed to git.

In the yarn FAQ the question "Which files should be gitignored" is answered with: ".yarnrc.yml (and its older counterpart, .yarnrc) are configuration files. They should always be stored in your project.".

What do you think?

By the way, on Windows I had no success in building the extension after running lerna bootstrap because vsce did not find dependencies that were linked to other packages. I had to run yarn install in packages/argdown-vscode.

im-0 commented 4 years ago

The problem is not in .yarnrc itself, but in one particular variable: https://classic.yarnpkg.com/en/docs/yarnrc/#toc-yarn-path. So, if you really need it, you should add specified path into your repository as well. In this case, it would be .yarn/ with all its contents.

It seems to be safe to remove .yarnrc completely if yarn-path (implying one particular version of yarn) is not needed to build argdown. It is the only variable in this file anyway.

I'm not familiar with javascript development, so my conclusions may be wrong though.

christianvoigt commented 4 years ago

In general I think it is a good idea to "lock" the yarn version so that everyone uses the same version to build the project.

The real issue here is that the .yarn folder is currently completely ignored. Instead .yarn/releases/ should actually be checked in into git. This is not explicitely mentioned in the docs, but can be learned from this issue.

This should fix your problem. If you agree I will reject this pull request and push my .yarn/releases/ folder.

christianvoigt commented 4 years ago

I have pushed the changes. You already mentioned this solution in your previous answer, sorry for missing that. I hope this fixes your problem.

(It is actually also mentioned in the yarn docs, I just missed it the first time I read them.)

im-0 commented 4 years ago

Thanks!