-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[Feature] Add --verbose
or respect npm loglevel in yarn installation step
#6187
Comments
In yarn classic, the |
I can't believe Yarn states they have improved so much from v1.22 and still don't have this option supported. |
I'm of the opinion that debug logs in a software don't provide a lot of value compared to adding your own logs at the exact place you're interested in (which, admittedly, isn't always easy). Taking your situation as an example, the old-style
In the open-source we work on things because we find pleasure in working on them. Not sure what made you think starting with essentially an insult was the right way to motivate anyone to work on something you'd like. |
You are right, it's just an open source project, unless you are paid to support this project, you can always ignore such complains (like mine above). Yarn is not a simple software, and beside of that, it has plugins. Who knows what these plugins do. It's better to explain what software does. One example: I'm migrating to yarn v4 from yarn v1. I run 'yarn install' and yarn exists with error:
Guess what - there is no variable with name 'offlineMirrorName' across the source code of my project, nor the source code of Yarn. Where does that string come from ? After debugging yarn source code for couple hours I found it - yarn reads variables from environment file .env, takes those having 'yarn_' prefix, converts them to camel case and checks if he supports them. Not only this is not clear, but also not covered by verbose output, like someone may add to verbose mode messages like
Btw, the file '.env' is not listed on page https://yarnpkg.com/features/scripting#environment-files. People love logs. People love debug messages. And verbose. |
It is here
Given you already read the code, would that "someone" be you? Not even verbose, I think the error message itself can be better.
Because the |
Thanks !
Sure, I don't mind.
I was wrong in the moment I stated yarn reads '.env' file, no, it doesn't I just completely forgot I was using dotenv command, sorry about that. I saw how I change .env file and yarn reacts on its content, and assumed that. |
Also, one thought: I'm using environment variables in my project and sometimes my style of naming vars comes into conflicts with Yarn's logic of reading vars. Bottom line: I don't see reason for yarn to exit if he faces some vars he thinks belong to him. Nope, that can be just coincidence because it's a sharable space across many programs. |
@DimaGorbenko Can you create a new feature request for this suggestion for the website?
@DimaGorbenko Can you create a new bug report for this issue? I wanted to stick this issue to how a verbose mode in yarn modern may look like, if it's introduced in future. |
I'd like to +1 this. Yarn is currently failing to install dependencies after logging a bunch of |
It doesn't need a verbose mode, it needs to be better at surfacing the relevant information from these request errors - a flag doesn't make sense when it should be the default behavior. And we welcome improvement PRs 🙂 |
I'm currently trying to migrate from Yarn 1 to Yarn 4 for our CI servers, which need to have prefilled dependency caches to reduce the load on our internal registries. But I'm having a very hard time trying to figure out whether Yarn 4 is actually using the cached artifacts or whether it's downloading them from our internal registry. This was trivial to diagnose in Yarn 1 due to Yes of course I could monitor the network traffic, but that is an absolute p.i.t.a. compared to just having Yarn show exactly what it's doing during the install. A Especially with massive Yarn "workspaces" like ours (we have a mono-repo), it's absolutely critical to know what the hell Yarn is doing if you ever hope to have a chance of diagnosing performance issues. A I can't even perform the analysis with Yarn 4 at the moment. +10 ;) Edit: I realize that I could use:
But that's an incredibly blunt way for diagnosing issues and has very limited value. |
Describe the user story
The install step of yarn modern does not have a verbose logging mode.
Describe the solution you'd like
Add
--verbose
option to yarn which documents every change yarn is doing, or where configuration is being read from.For example, I was interested to find where bin object is converted to string in #6184
Describe the drawbacks of your solution
N/A. The folks who explicitly pass
--verbose
would like to know what yarn is doingDescribe alternatives you've considered
Switching to alternate providers which provide verbose mode
The text was updated successfully, but these errors were encountered: