i cannot rename variables when i try to refactor the code in Vim - vim

I have a code refactoring question.
I am using vim/coc/tsserver in my typescript project. The problem is that coc-rename doesn't work for me.
When I try to rename any variable, I get an error:
Error: request error on "nvim_call_function" - Vim(argglobal):E1156: Cannot change the argument list recursively on api "call_function"
Maybe someone already faced and solved this problem?

Related

How do I force VS Code to import the latest Python source file?

I am working with Python in VS Code. I have two modules, mod_A and mod_b, where mod_A imports a method do_this_thing from mod_B. Everything was going fine until I tried to refactor do_this_thing into _do_this_thing. (The function is an internal function).
I used the Rename Symbol option in VS Code to perform the refactor. I doublechecked that all instances in my fairly simple code base were covered.
The strange behavior that I'm getting is that when I run mod_A and it gets to the renamed function call, I get an AttributeError telling me that there is no function _do_this_thing. The head scratcher, though, is that if I manually change _do_this_thing back into do_this_thing in mod_A, my code executes as expected— even though it is still defined as _do_this_thing in mod_B! Furthermore, I can't step into do_this_thing when I run it in mod_A.
I have tried deleting all __pycache__ files, as that was the first thing that I thought of. I've also tried clearing VS Code's cache, deleting my project, and starting over with the refactor from a fresh pull from GitHub. No dice.
Hopeful that someone here can help me solve this esoteric problem!
Edit: Adding some debugging context for the votes to close my question:
Windows 10, VS Code
Miniconda Python distribution
PYTHONPATH variable has project directory on it
Modules imported correctly; the bug happened when I changed the name of a function in the module being imported
Python appears to be importing a cached verison of the earlier code from somewhere, but I've reset everything and still have the issue

type GraphQl typegoose backend error while linking models error : Error: Prop-Option "ref"'s value is "null" or "undefined" for "User.projects" [E005]

user schema
projects schema
I've been able to fix it as shown here
however this doesn't seem like the right approach as Its throwing some warnings, also feels very make shift and like Its going to cause some bigger issues in future.
What I want is the cause of the problem and if there is anyother way to fix this
Next time you ask a question, please put the code as code blocks and not as pictures and you should also provide what package versions are used
For this error there is a documentation page, see E005.
In your case it looks like you have a "Circular Dependency" Problem, see Reference other Classes: Circular Dependencies on how to fix this.
The Documentation Page basically says: "put all model compilation (getModelForSchema / buildSchema calls) into one file"

Getting a strange error from winnt.h?

I'm trying to write an x2 camera driver for a Hamamatsu camera in Visual Studio 2015. The X2 driver template already has windows.h included as an external dependency, but when trying to include a necessary header file, it throws an error that windows.h is not included (along with 80 or so errors of function calls that therefore don't exist). But when I include windows.h, I think it's causing a double include and is throwing this error:
Severity: Error (active)
Code: none
Description: expected an identifier Project :x2camera
File: c:\Program Files (x86)\Windows Kits\10\Include\10.0.10586.0\um\winnt.h
Line: 524
I'm really new to working with Visual Studio projects - how can I include windows.h into the file so it can get the functions and declarations it needs without actually including it and causing a double inclusion? Like I said, it's in the "project dependencies" list, and I think it's being included in another file (but I'm having a hard time finding that).
Or is that not even my problem?
Any help is appreciated.
​No idea what the problem was but I somehow managed to get it to compile. I think it needed to be included elsewhere first, then built, then included where it needed to be... which doesn't make sense honestly but maybe it was an error with how the inclusion was functioning.
Either way, my question is now resolved, though the questions that now arise such as "why the heck did this work" are baffling.

Setting NODE_PATH from within NodeJS application

We have a node project that does not require our own submodules from a relative path, but instead needs the NODE_PATH environment variable be set to lib to find all submodules.
I wanted to handle this standard case within the program source code but it seems like it is impossible by now.
I found several solutions which all do not work as expected.
module.paths.push("./lib");
Was suggested in another stackoverflow article but this causes an error message in the newer Node versions and refers the developer to using NODE_PATH.
Instead I tried to do the following as the very first line of my program.
process.env['NODE_PATH']="./lib";
This does not cause an error message but it does not work either. I think that this variable is read on the application start and not read lateron when requiering stuff.
All information you can find out from the source: module.js
... NODE_PATH error is thrown only when accessing via require.paths.
Search for _nodeModulePaths function: Module instance has generic Array object paths, with all lookup paths in it.
module.paths.unshift('./foo-baz');
var x = require('some-lib-name');
console.log(x);
So now, if you have the required module under ./foo-baz/some-lib-name/ it would be properly picked up.
What node version and what system you have?

Fail to load manifest error

What does this message means? How to solve this error?
Error 1 general error c1010070: Failed to load and parse the manifest. The system cannot find the file specified. ..\DebugObj\Example1\Example1.exe.intermediate.manifest Example1
I had the same problem on a project I inherited from a pre-2008 Visual studio.
It was not practical for me to add a Main function as sugested by the previous answer. I googled for a while but could not find the root of the problem.
A friend of mine gave me the following solution.
It turns out that the old project included a "example.manifest" file entry in the Resource File Folder in Visual Studio's Solution Explorer for the project. When trying to build the project, VS 2008 was trying to load "example.manifest", which did not exist on the new 2008 folder structor (it was not needed).
So the solution was as simple as removing the entry "example.manifest" from the Resouce Files folder. Rebuilt, and no more errors!. Hope that helps
to fix that error you need to have an entry point in your solution.
just create a main.cpp with a main method... just like this.
in "main.cpp"
void main(){}
then compile and it will get rid of the error.
Had similar issue myself. Converted a VS2005 project to VS2010.
I was using the option, Linker -> Manifest File -> Additional Manifest Dependencies: type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='' publicKeyToken='6595b64144ccf1df' language=''
The conversion garbled it into type=%27win32%27...etc
Fixing this option to the correct format, type='win32'..etc resolved the issue. But not before I accidentally used the format, type=win32...etc and received the same error.

Resources