Webstorm 10 lodash methods "private member not accessible" warning - webstorm

I've just started using WebStorm 10 EAP and all my lodash methods are highlighted with a warning "Private member is not accessible". I do have bower_components folder that has lodashadded as a library. Is there anything special I need to do to to fix this warning, since these methods are available to call?

Related

Problems with Boost when using Point Cloud Library (PCL)

I work under Windows 10 64 bit and use Visual Studio 2017 (15.9.5). Via vcpkg I got PCL with all dependencies installed (vcpkg install pcl:x64-windows). I have the versions: BOOST 1.68.0, PCL 1.9.1-1.
For example, if I just add #include <pcl/io/pcd_io.h>, I get:
E0145 member "boost::filesystem::path::separator" may not be initialized
E0145 member "boost::filesystem::path::preferred_separator" may not be initialized
E0145 member "boost::filesystem::path::dot" may not be initialized
E2512 the argument to a feature-test macro must be a simple identifier
E0434 A reference of type "boost::filesystem::path::iterator &" (not const-qualified) cannot be initialized with "boost::filesystem::path::iterator"
Inserting #define BOOST_FILESYSTEM_SOURCE from E0145 Member may not be initialized- cmake - VS2017 looks like it's fixing the E0145 error. I still have the E2512 and E0434.
I searched Boost, PCL and other repositories for solutions but found nothing. Any help will be appreciated.
In the project file (accessed using the project properties property sheet), C/C++ section, 'General' entry, you have the Additional Include Directories field, where you can set the search path for the header files.

The type of namespace 'Logging' does not exist in the namespace 'Sitecore'

Added Sitecore.Logging dll (from nuget) in the project but I still get the error.
It was working fine until I added a log4net dll (as part of some other nuget dependency). After this there was an ambiguous reference error. Then when I tried to specify Sitecore.Logging.LogManager/ Sitecore.Logging.ILog I get the error .
The type of namespace 'Logging' does not exist in the namespace 'Sitecore'
The Sitecore.Logging.dll does not contain classes in the Sitecore.Logging namespace, though you may be forgiven for expecting that to be the case - it is certainly the convention.
Opening it up with a decompiler reveals a forked version of log4net hiding in there.
You are probably looking for the log factory in Sitecore.Diagnostics.Log in the Sitecore.Kernel.dll
Right click the newly added log4net dll -> properties -> Aliases-> give a different name like 'log'. This will resolve the ambiguity in the code.

Why am I NOT getting C4192 when importing msxml6?

We been instructed to eliminate all level 3 warnings and have been specifically told to address C4192.
My code does fall into the "bad code" example that causes C4192
#import "msxml6.dll" named_guids
and the "good code" is easy enough to implement
#import "msxml6.dll" exclude("ISequentialStream","_FILETIME")named_guids
The only problem, is that I just do not get this warning. I'm importing version 6.30.7601.18431 of msxml6.dll, and no matter what I do, this warning just does not manifest.
I also imported it again, specifying the no_auto_exclude option and could find no reference to ISequentialStream or _FILETIME in the generated tli and tlh files.
I'm about to simply update to use the "good" code and go on, but I'd still like to know what is happening.
This is specifically an issue because new version of MSXML6.0 changed declarations , especially from Win10 OS onwards.
We already encountered this warning message with our legacy code base having 'bad code' , which you mentioned in your question.
In your case, your system is having older version of MSXML6.DLL (present in "C:\Windows\System32 or SysWow64").
Hope this calrifies your query.

Project Settings Recommends Compiler Warning: "Suspicious Moves"

In an Xcode project, I'm getting a weird warning. What is it and is it a bad thing?
Here's the warning:
Project 'Little Hoot' - Enable Recommended Warning
This will enable the following recommended compiler warning:
Suspicious Moves
It is also recommending I updated another setting too.
Target 'Little Hoot' - Update C++ Standard Library
The 'libstdc++' C++ Standard Library is deprecated. This will update the setting for Target 'Little Hoot' to 'Compiler Default', which is the recommended value.
I have looked online and I'm unable to find an answer for at least the first warning.
The "Suspicious Moves" Project/Target setting seems to control the -Wmove compiler warning optionin LLVM/Clang, which is a group of 3 other warning options: -Wpessimizing-move, -Wredundant-move and -Wself-move.
Those options generate these warnings:
warning: moving a temporary object prevents copy elision
warning: moving a local object in a return statement prevents copy elision
warning: redundant move in return statement
warning: explicitly moving variable of type A to itself
(From the Clang documentation at http://clang.llvm.org/docs/DiagnosticsReference.html)
So it's probably not a big deal whether you accept the recommendation and enable the warning, or go without it. You just won't be told if you make things slower with those suspicious moves.
I also got this message from Xcode recently while setting up a new project. My steps were removing the reference from files (such as Info.plist), creating folders directly on Finder, and adding files back to Xcode. I suppose it's a security feature but if your case is like mine, it's only a warning.
Both of these warnings refer to settings in your project not reflecting the recommended defaults. They were probably both triggered after you upgraded your version of Xcode or imported an old project into a later version of Xcode.
Unless you have good reasons to do otherwise, it is best to follow the recommendation. The easiest way to do that is click in the yellow triangles that accompany the warnings and allow Xcode to make the appropriate changes to the settings.
You should turn all warnings on, with the exceptions of pedantic warnings, unused parameters, and auto-synthesised properties; these three warnings warn for tons of good code. Same for static analyser warnings.
Then you look at what warnings you get and fix them. If you haven't done this before, then I'll estimate that 20-40% of all warnings are actual bugs in your code.
You’ll be able to see warning detail in issue navigator section. You can fix it by selecting issue. This will show an alert stating necessary changes to be done in project settings.
Click on Perform Changes button. This will make necessary changes in Project settings and thereby removing this warning.

no override found for 'vtkPolyDataMapper'

I'm trying to use vtk in my code, but I'm having problems running an example. I have almost no clue about the reasons since it's the first time I'm using it and I'm not very experienced.
I'm using visual studio 2012 and x64 platform.
Since I don't really know which libs should I use I added all of them to the "Additional Dependencies".
The example is given in this link.
The problem is that when I run it, the window shows this message
Generic Warning: In C:\location\VTK6.0.0\Rendering\Core\vtkPolyDataMapper.cxx, line 27
Error: no override found for 'vtkPolyDataMapper'.
which corresponds to this line
// Return NULL if no override is supplied.
vtkAbstractObjectFactoryNewMacro(vtkPolyDataMapper)
And the error that visual studio shows is
First-chance exception at 0x000007F7AA106C8F in Test.exe: 0xC0000005: Access violation reading location 0x0000000000000000.
Does anyone know how to solve this problem or at least what does this error mean?
I too was getting this error. The error means that the linker can't find the definition for the vtkPolyDataMapper method. One has to note which vtk rendering backend they used, during build. It will probably be either vtkRenderingOpenGL, or vtkRenderingOpenGL2. Go to your build/lib folder and search for either one of these. I have VS 2015 Community and had the vtkRenderingOpenGL2, with vtk-7.1 built on Windows 8.1, x86_64 Platform, Release configuration.
I fixed the issue by inserting the 3 following lines at the very top of my source files, before any other preprocessor directives:
#include "vtkAutoInit.h"
VTK_MODULE_INIT(vtkRenderingOpenGL2); // VTK was built with vtkRenderingOpenGL2
VTK_MODULE_INIT(vtkInteractionStyle);
This initializes the specified VTK modules. CMake includes these by default, but other compilers such as VS do not.
The last two lines can be combined into the following:
#define vtkRenderingCore_AUTOINIT 2(vtkRenderingOpenGL2, vtkInteractionStyle)
According to the VTK migration guide, if you are not using CMake to compile your code, you need to add some #defines. For VTK 6.0, these lines need to go before any other VTK #includes:
#define vtkRenderingCore_AUTOINIT 4(vtkInteractionStyle,vtkRenderingFreeType,vtkRenderingFreeTypeOpenGL,vtkRenderingOpenGL)
#define vtkRenderingVolume_AUTOINIT 1(vtkRenderingVolumeOpenGL)
You are missing include(${VTK_USE_FILE}) in your CMakeLists.txt file.
Assuming your are using OpenGL2, you should initialise the vtkRenderingOpenGL2 module, ensuring its object factory is correctly registered:
VTK_MODULE_INIT(vtkRenderingOpenGL2)
You should call this macro in the global scope (ex. main.cpp) as documented in the source code:
Initialize the named module, ensuring its object factory
is correctly registered and unregistered. This call must be made in
global scope in the translation unit of your executable (which can
include a shared library, but will not work as expected in a static
library).
#include "vtkAutoInit.h"
VTK_MODULE_INIT(vtkRenderingOpenGL);
The above snippet if included in the global scope will ensure the
object factories for vtkRenderingOpenGL are correctly registered and
unregistered.
How do you know which module to include?
The easiest method is to search in the VTK build folder for "vtkClassThatNeedsAnOverride", i.e. "vtkPolyDataMapper" in your case (note the use of quotes ".) and looking for a *ObjectFactory in your search results:
Rendering/OpenGL2/vtkRenderingOpenGL2ObjectFactory.cxx:
this->RegisterOverride("vtkPolyDataMapper",
"vtkOpenGLPolyDataMapper",
"Override for vtkRenderingOpenGL2 module", 1,
vtkObjectFactoryCreatevtkOpenGLPolyDataMapper);
It may be even more beneficial to look for RegisterOverride("vtkPolyDataMapper".
Which object factories exist?
To obtain a list of all existing modules that you could initialise, you can search for _AutoInit_Construct. *_AutoInit_Construct is the method that is called by VTK_MODULE_INIT.
As an alternative, you can look at all classes that derive from vtkObjectFactory.
A second alternative is to look for all calls to RegisterOverride.
Further information
VTK 6 Migration: Factories now require defines
Build System Migration: You do not need to call VTK_MODULE_INIT manually using cmake by calling include(${VTK_USE_FILE}) in your CMakeLists.txt
Note that I originally wrote this answer for a duplicate question, but I think the general information about solving this problem may be of interest for other people with the same error message.
I would recommend following the guide here, with the VTK_MODULE_INIT macro being the most reliable, with the guide here providing a high level overview of the changes needed. You must link to vtkRenderingOpenGL for example to get most of the standard overrides. If you use CMake then specifying it on the COMPONENTS argument to find_package would cause it to be added to VTK_LIBRARIES, and including VTK_USE_FILE would cause the correct compiler definitions to be added.
I had the same issue at my platform;
Visual Studio 2015
Windows 7
VTK 6.3
I followed VTK/Build System Migration from Marcus D. Hanwell's post, and it works. My additonal lines are;
#include <vtkAutoInit.h>
VTK_MODULE_INIT(vtkRenderingOpenGL);
VTK_MODULE_INIT(vtkInteractionStyle);
on the top of preprocessor. The difference from RestlessC0bra's post is probably OpenGL version.
When using ParaView's Catalyst libraries you have to add the following in addition to include("${PARAVIEW_USE_FILE}"):
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS ${VTK_DEFINITIONS})
A quick hack solution: In CMakeList.txt file, replace vtkRendering${VTK_RENDERING_BACKEND} with vtkRenderingOpenGL2. The reason why we need this is because Cmake does not know where the rendering core is. By specifying it, we can use the rendering core to override the proper method.
The proper solution should be replace the whole find_package paragraph with:
find_package(VTK REQUIRED COMPONENTS vtkCommonCore)
find_package(VTK COMPONENTS
vtkFiltersSources
vtkInteractionStyle
vtkRendering${VTK_RENDERING_BACKEND})
The first find_package lets the CMake know where to find the packages, then second find_package would know where to find vtkRendering${VTK_RENDERING_BACKEND}.