Conversation
|
I'd appreciate a review. |
|
LGTM. Only problem is that the name Could you add a test? |
|
Does anyone have any naming suggestions? |
|
|
|
|
There was a problem hiding this comment.
I think @L-as's suggestion of builtins.traceVerbose is great. In addition to the below suggestions, I'm not entirely sure whether using -v for this is a good idea, though I don't have any good reasons against it.
Here's a branch where I implemented the below two suggestions (and also having a separate flag instead of -v, but not sure if we want that): infinisil@3cfde43
|
I like the idea, as long as you can't "lift" the verbosity level to the Nix language itself. |
6eec8f2 to
35a4262
Compare
|
Finally got around to this. I think its ready for review |
I think this does matter, why shouldn't it? This isn't an implementation detail, this is the user interface. It's the difference of requiring the user to learn an extra flag, or being able to reuse So I guess I'm leaning towards having the new |
|
Alright, I would prefer |
|
Regarding
If this feature was implemented, it'd subsume |
|
This also reminds me of NixOS/nixpkgs#140763, which makes (A |
|
@roberth |
Do we have first-class traces yet? Afaik, they're hidden behind the implicit C++ exception stack. Otherwise, realistically, we can only do |
|
This is related to #749, ping @Profpatsch |
|
I don’t see how it’s related to displaying warnings. Warnings should show even if the user does not use |
|
I think it's related because of different verbosities of messages:
|
|
At this point I have lost hope that nix will ever have a sensible way of displaying warnings tbh. The hydra and |
|
@Profpatsch What misdesign are you referring to? |
|
@edolstra @gytis-ivaskevicius : apart from the (small) merge-conflict, anything preventing this from being merged? |
|
@gytis-ivaskevicius I’ve merged the branch with master, but now the build is failing. Can you have a look? |
|
We discussed that a bit during the last UX meeting. There's a broad consensus on this being great, just needs to fix the build. @gytis-ivaskevicius think you can take a bit of time to do that? |
|
Alright, will do! (Expect a push tomorrow/day after tomorrow) |
Co-Authored-By: Silvan Mosberger <contact@infinisil.com> Add builtins.traceVerbose tests
e7ce8bd to
b2703c7
Compare
|
Sorry, a little late. Took me 2 attempts to resolve the issue 😅 |
Once the CI agrees, that is |
|
Duh, forgot about the release notes. I'll add them in another PR |
Add a release notes entry for #4914
When working on tests I thought that it would be useful to have some sort of logger which would be enabled by increasing verbosity level. This PR adds
builtins.debugwhich evaluates the first argument when-vvis specified.Exact use case:
I and @blaggacao started working on these check utils https://github.com/numtide/flake-utils/blob/master/check-utils.nix and plan is to add this kind of logging to simplify the debugging process for the end-users
PS: Please be gentle, I don't do CPP :D