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

Document local development and profiling process #1830

Closed
1 of 2 tasks
remorses opened this issue Sep 10, 2020 · 2 comments · Fixed by #4059
Closed
1 of 2 tasks

Document local development and profiling process #1830

remorses opened this issue Sep 10, 2020 · 2 comments · Fixed by #4059
Labels
enhancement New feature or request

Comments

@remorses
Copy link

remorses commented Sep 10, 2020

  • I'd be willing to implement this feature
  • This feature can already be implemented through a plugin

Describe the user story

I want to work on #1829 and #1817 but i can't find any docs about running and profiling yarn locally

Describe the solution you'd like

What i would like to know is

  • How to use the local version of yarn (now i am using node /berry/packages/yarnpkg-cli/bin/yarn.js)
  • Document the need of env vars YARN_IGNORE_PATH=1 YARN_IGNORE_CWD=1 to profile successfully yarn (node --inspect yarn.js will fail because yarn binary forks itself (using execFileSync) if you don't pass the env vars YARN_IGNORE_PATH)
  • How to run yarn with source maps enabled (when i profile berry/packages/yarnpkg-cli/bin/yarn.js i get a lot of webpack minified functions)
@remorses remorses added the enhancement New feature or request label Sep 10, 2020
@larixer
Copy link
Member

larixer commented Sep 10, 2020

@remorses These are all valid points and should be added to the Documentation. But the easiest way to contribute is to join our Discord chat, ask quick questions and quickly receive answers to move forward fast.
https://discord.com/invite/yarnpkg

@arcanis
Copy link
Member

arcanis commented Sep 10, 2020

In case someone lands on this issue later:

How to use the local version of yarn (now i am using node /berry/packages/yarnpkg-cli/bin/yarn.js)

Running yarn build:cli and executing the generated bundle is the best way to test perfs. Note that the bundle is in the bundle directory, not bin (the bin directory contains a checked-in version that we only use to reference the last formal release).

How to run yarn with source maps enabled (when i profile berry/packages/yarnpkg-cli/bin/yarn.js i get a lot of webpack minified functions)

I don't really trust source maps in general, so I'd recommend to just build an unminified bundle using yarn build:cli --no-minify. That should be good enough for most purposes.

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

Successfully merging a pull request may close this issue.

3 participants