-
-
Notifications
You must be signed in to change notification settings - Fork 15.3k
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
picom: add withDebug option #85490
picom: add withDebug option #85490
Conversation
226bc29
to
4fd00e2
Compare
Maintainers @ertes @Enzime @Twey and the author of the latest update @thiagokokada, I've now updated this PR. What do you think? |
Result of 1 package built:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested building with debug
set to false
and true
.
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please revert the nix-fmt changes.
@SuperSandro2000 Ok, I can do that. Is there a particular reason why? Is the formatting by |
Reformatting a file while changing inputs makes it really hard to review because I cannot spot the difference easily. For new packages it is great as long as you do not have to many inputs. |
@SuperSandro2000 But they are already two separate commits exactly for that reason so that you can check the commits separately. Isn't that sufficient? Would you rather have two separate PRs? |
Upsi. didn't check the commit history. @jluttine can you fix the merge conflict? |
@SuperSandro2000 Alright, solved! Not sure if the new maintainer @thiagokokada wants to review too? Also, I'm still not quite sure if |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Diff wise LGTM.
Also, I'm still not quite sure if debug is the right/best argument name or if it should be withDebug or enableDebug. I'm happy to change it, but I would like it to follow some generic guideline if there exists one for this kind of arguments..
I think withDebug
is better, but I also don't know if there is a guideline for it.
Thanks! I renamed the option to |
Result of 1 package built:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested both with withDebug = true;
and withDebug = false;
. Got gdb
to work with it:
GNU gdb (GDB) 10.1
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from picom...
(gdb)
Sadly don't know too much about gdb
, so I will just believe it works as it should.
Motivation for this change
This makes it easy to build picom in such a way that it supports debugging. Just install
picom.override {debug=true;}
. (The first commit appliesnixpkgs-fmt
.)I asked on IRC if it's ok to add this kind of
debug ? false
options to packages if someone just bothers to do it and I was told by one person that it sounds reasonable. I can see this kind of convention in a few packages but there seems to be inconsistency whether to usedebug
,withDebug
orenableDebug
as the option name. I'm more than happy to pick any of those if there's some consensus.cc maintainers @ertes @Enzime @Twey
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)