I have direnv installed, and I was wondering if there was a way of stopping it from showing all of the environment variables it loads? The output lines it currently shows are:
direnv: loading .envrc
direnv: export +FOO +BAR +FOO2 +BAR2 +FOO3 +BAR3 +FOO4 +BAR4
I'm fine with having the first line show, but since my second line has something like 50 variables in it, it's slightly annoying to have the lot of them shown every time I go into the directory.
It's possible to remove the logs entirely by setting export DIRENV_LOG_FORMAT= but then the rest of the logs are also missing
As far as I know, you cannot change that behavior through configuration.
If that behavior was part of the stdlib, you could override it. In fact, the first ouput, direnv: loading .envrc comes from source_env which uses log_status to output to stderr, so you could override either of source_env or log_status in ~/.config/direnv/.direnvrc or ~/.direnvrc.
However, the second output is coming from diffString in cmd_export.go (via log_status in log.go). Short of compiling your own, modified version of direnv, I don't see how you can change that behavior as of the current release (v2.17.0).
Related
I am making my first steps with QtCreator and I see some issues. I designed a simple widget, see the image below. On this screenshot the bottom view is what I designed and the top view is the result of running the design. I say they are similar, but I expected more. It looks like the running version compresses the components. Is there something I should set in QtCreator?
I also attempted to check the functionality of my widget, using debugging, but I receive the Warning 'This does not seem to be a "Debug" build.' Shall I set something to produce a debug build?
In the meantime I found out that if I do not put the widgets in a layout box,then I receive as output what I expected. Why a layout has such side effect?
Also, in the meantime I added some signal/slot connections. Since I did, I am presented with error message ui_registerwidget.h:13: error: QtWidgets/QAction: No such file or directory. It is a file/code generated by the QtCreator.
While debugging my React Native app in Chrome, I'm often unable to set breakpoints in the Sources tab. When I click on a line of code to add the breakpoint, a breakpoint is added instead to the next function declaration line in my module.
This doesn't happen in all of my source modules, but often enough that it prevents me from debugging efficiently.
I'm currently using RN 0.22 but this has been happening on older versions of RN as well (e.g. RN 0.18).
This problem maybe caused by babel. When use normal function and arrow function together, it happened.
"sourceMaps": "inline" in .babelrc fixed this for me.
I've only experienced this issue under the following conditions:
1) The .js file contains multiple functions, and
2) Attempting to set a breakpoint within a function that is not the last function in the .js file
So, a partial workaround is to move a function such that it is the last function in the .js file. Or, you could assign a single function per file. Either way, you will be able to set breakpoints.
This is far from ideal, but it's the only "solution" I've found so far.
I had the same issue, and I have a cozy solution for now :
I put the word "debugger" in the file which I want to debug.
I refresh the browser to see that it stops.
after it stops, I can add as much as breakpoints as I want and remove the "debugger" word from file
Try this package
https://www.npmjs.com/package/react-breakpoint-fix
just install the package and run react-breakpoint-fix from the terminal.
This fixed it for me. I'm using react-scripts#3.x
Whenever I try to read the frame of an UIView for example while debugging, I get this error:
error: property 'frame not found on object of type 'UIView *'
error: 1 errors parsing expression
After searching for a solution, I found out that I can use this command to solve this without adding (annoying and in some cases complicated) casts:
expr #import UIKit;
But I still find it annoying to have to do this every time (why doesn't Xcode do this by default?!), so I thought I should be able to do this using the .lldbinit file, but I couldn't get it to work.
I don't know much about that file, I have this in it atm:
command script import /usr/local/opt/chisel/libexec/fblldb.py
so I tried adding the UIKit import command at the end of the file but it didn't look that it worked. I also tried prefixing it with command to no avail. Is this possible or not? (please say yes; it will save my life)
lldb will auto-import modules that the debug info tells us the program imports fairly soon now. All the pieces weren't in place to do that for the first Xcode 7 releases.
Statements in the .lldbinit get run before the main file is read in, it is supposed to help set up the environment to read in your program. But at that point there's nothing into which to import these symbols. You need to do it after the main binary is read in (and you really need to do it after you have run, since I think we need to run some code to do this.)
At present, the simplest way to do this is to make an auto-continue breakpoint at main, and attach the expr #import UIKit statement as a debugger command in that breakpoint. You'll have to do this once per new project you make, but if you're working on the same project for a while, it's not such an inconvenient workaround.
I just updated to v2.4 of angular-translate: http://angular-translate.github.io
and found that translate-cloak is not working. It used to work in v2.2.
The 'translate-cloak' class is now never removed from the tag which has the
translate-cloak attribute.
I have a plunker to demonstrate the problem:
http://plnkr.co/edit/NOxGMEqTy4FsZBSIK0zl
If it works, it should show two lines. The second line is in a div which has the
translate-cloak attribute.
You can change line 9 of index.html to the line below (change from v2.4 to v2.2
of angular-translate) to see it works in v2.2.
<script src="angular-translate.v2.2.js"></script>
Did I missed something?
The commit 98fe64 is a fix for https://github.com/angular-translate/angular-translate/issues/658 (event was not fired always). Actually it should be fired MORE often than before instead of less than before.
Looking at your example, I can see the language seems to be loaded right before parsing the directive and therefor the listener w/ console outputs.
console.log('$translateChangeEnd');
This means that issue is not related to the change ~success -> ~end, but related to non deterministic (even not in this particular example) order of resource loading, xhr responses and component parsings and compiles.
I've added a
$rootScope.$emit('$translateChangeEnd', { language: translation.key });
but we have to check if this covers all.
See fork http://plnkr.co/edit/kawPEyjPpPRtJvJzqLeD?p=preview
See my outstanding patch https://github.com/angular-translate/angular-translate/commit/e5ef6ab609d6a58defd371ca8239e8054cab718e
(Disclaimer: I'm from the angular-translate core team.)
https://github.com/angular-translate/angular-translate/commit/98fe649a241b79c245fb32d838b84f0fac319f5a
I think this is bug caused by above commits.
Actually you replace the '$translateChangeEnd' to '$translateLoadingSuccess' in angular-translate.v2.4.js line 924, it is OK.
I'm working on a script to interact with Perforce, which among other things needs to be able to understand pending changelists. For this I use 'p4 describe' and 'p4 opened', which are pretty straightforward. For instance, a file opened for edit shows up like this (from p4 opened):
//source/stuff/things.h#1 add default change (text)
What I can't seem to figure out is how to detect cases where a user has branched a file and then used the 'Reopen for edit' command on that file (which amounts to using 'p4 edit' on the file to be branched) prior to submitting it. Same thing goes for integrating a file and then using 'Reopen for edit' before submitting the integration. In the branch case, the file shows up as an 'add' with no indication that there's also a branch going on (so the above example could be either a true add or a reopened branch). In the integrate case it, shows up as an 'edit'. In both cases, after I submit the change I can see that the file was branched/integrated, but I need to be able to do this for pending changes. In theory I would hope to see something like this, where things.h is being branched and edited from thangs.h:
//source/stuff/things.h#1 add default change (text)
branch from //source/other/thangs.h#42
Does anybody know of a way to accomplish this? I'll also mention that I'm running an old-ish version of Perforce (from 2004), so perhaps it's doable in newer versions and I just need to update my software.
"p4 resolved" does almost exactly what you want, but unfortunately it is new in 2007.2.
[C:\dfp\Common\Code\Python]p4 opened foo.py
//buddha/Common/Code/Python/foo.py#1 - add default change (kxtext)
[C:\dfp\Common\Code\Python]p4 resolved foo.py
c:\dfp\Common\Code\Python\foo.py - branch from //buddha/Common/Code/Python/memdump.py#1,#30
You probably won't be able to detect problems before the user runs "resolve", but they're going to have to resolve before they submit.
I do not think that this is possible when issuing a "reopen for edit". As you have already indicated, the reopen command will change a files status to something different. I ran a local test (I'm running 2008.2). There do seem to be some changes in the way that perforce reports on the add/edit status of files since your version, but what you are trying to do still doesn't seem possible
d:\sandbox\ctg_test>p4 integ test.txt test_branch.txt
//ctg_test/test_branch.txt#1 - branch/sync from //ctg_test/Test.txt#1,#15
d:\sandbox\ctg_test>p4 opened
//ctg_test/test_branch.txt#1 - branch default change (text)
Note that the opened command now shows 'branch' for the file status instead of add which I think it might have shown with your version of the server. But the kicker:
d:\sandbox\ctg_test>p4 edit test_branch.txt
//ctg_test/test_branch.txt#1 - reopened for add
d:\sandbox\ctg_test>p4 opened
//ctg_test/test_branch.txt#1 - add default change (text)
I tried looking with the -ztag option to see if more info was given:
d:\sandbox\ctg_test>p4 -ztag opened
... depotFile //ctg_test/test_branch.txt
... clientFile //client-mark.allender/ctg_test/test_branch.txt
... rev 1
... action add
... change default
... type text
... user mark.allender
... client client-mark.allender
p4 fstat was no help either.