Is there any reason why EclEmma(JaCoCo based) in Eclipse falsely reports the code coverage while using the GwtMockitoTestRunner?
Looking at it's source code, it does install it's own class loader and does byte code manipulation using the Javassist library. Could this affect the code coverage tool anyhow?
It looks like the issue is that EclEmma/JaCoCo doesn't work well with final methods and with native methods(GWT JSNI code).
Fixing these methods everything returned to normal, the coverage is reported correctly.
Related
Good afternoon. In the clang documentation, I found a way to generate and paste code. So far, I have not used this method for the plugin, but if I understand correctly, it is possible (correct if not right - thanks).
I would like to know if it is possible to change the code at the bytecode level in the plugin, i.e. insert new stmt(clang::Stmt and its derivatives) into existing ones and give them to the compiler?
Pasting code at the source code level (clang::Rewriter) changes the project's source files, so it adds extra work.
Thank you
Has anyone run into this error message before? Google found it for me in the source code (https://github.com/fsharp/fsharp/blob/master/src/fsharp/tast.fs), but I haven't the slightest idea what is causing it.
This started happening when I tried to upgrade my library project from .NET 5 to .NET 6, so the real answer to my question may be an explanation of what I did wrong there. All I did was the following:
In the fsproj, changed "TargetFramework" from "net5.0" to "net6.0"
In my paket.dependencies file, changed "framework" from "net5.0" to "net6.0". (I've also tried commenting out the "framework" line.)
Then after running "paket update" and "dotnet build" I get the obscure error. ("error FS0192 : internal error : No compiled representation for provided namespace")
UPDATE: After some laborious code commenting/uncommenting, etc., I believe I've narrowed this down to my code's use of the Fable.RegexProvider assembly. (I use the SafeRegex component.) RegexProvider hasn't been updated in a couple years. I'll alert the folks over there to this issue, and I'll post an update here if/when I learn anything. (In case anybody else runs into this.)
In case anyone else runs into this, here is the solution (which is the solution #CaringDev recommended above, though it only works for Fable 3.7.18 and after):
When I raised this issue on the Fable.RegexProvider github (see thread here: https://github.com/fable-compiler/Fable.RegexProvider/issues/9), the initial thought was to try a .NET 6 build of Fable.RegexProvider. But then Alfonso Garcia-Caro realized that subsequent improvements to Fable may have obviated the need for SafeRegex.
He ultimately needed to tweak something in Fable, but as of version 3.7.18, the Fable transpiler supports the use of FSharp.Text.RegexProvider, such that Fable.RegexProvider is now unnecessary.
I have supposedly 2 security vulnerabilities in the iOS app I developed. This medium article enlisted both issues I faced.
Look for:
Usage of Insecure Random Number Generator
and
Usage of Banned/Deprecated APIs
Those are the two issues I faced in my iOS app as well. I used Xcode's and ran the terminal command like shown in the link above and saw that these deprecated methods like _random and insecure methods like _memcpy and _strlen are being used in the app.
What I want to do here is to understand where in my source code I am using these methods. I have searched my entire source code of my Xcode Project, I don't have it used or called directly.
otool outputs in assembly language format and shows random address
How can I find out in source code where I must be using these methods? or decipher the assembly code to ObjC source code? so that I can remove that code and use a better alternative which in turn will remove the security vulnerability.
According to the docs, both the swift and Obj-C sonar scanners want code coverage data and in different ways (build-wrapper vs xccov). But this got me thinking, code coverage is for an entire target/project in xcode, not just files for a particular language. So for a mixed Obj-C and swift project, does SonarQube want the same entire-project-xcode-generated coverage data twice (once per scanner)? If not, how does it relate code coverage for a particular language in a sonar project, or does it not care at all?
Only asking this because again, and much to my surprise, the docs for the 2 scanners list different code coverage instructions, leading the user to wonder if each scanner doesn't expect the data to be mixed together like it is with xcode and a mixed obj-c swift project (i.e. its the same data)
Even i am facing same scanario. What we are currently doing is we setup build-wrapper utility as indicated at https://docs.sonarqube.org/latest/analysis/languages/cfamily/.
So, initially it worked fine for a month or so. Later, we start getting following error:
====================================================================================
02:36:25.658 INFO: ------------------------------------------------------------------------
02:36:25.658 ERROR: Error during SonarQube Scanner execution
java.lang.IllegalStateException: The "build-wrapper-dump.json" file was found but 0 C/C++/Objective-C files were analyzed. Please make sure that:
* you are using the latest version of the build-wrapper and the SonarCFamily analyzer
* you are correctly invoking the scanner with correct configuration * your compiler is supported
* you are wrapping your build correctly
* you are wrapping a full/clean build
* you are providing the path to the correct build-wrapper output directory
====================================================================================
So, we have decide to install a backelite plug-in / jar (that handles sonar coverage reports for a mix of Swift and Objective-C) to our sonar server (Enterprise edition) , but, it led to the following error:
error message screenshot
So, basically you can set uo build wrapper utility and try performing the sonar scan. Make sure sonar-scanner is installed and you are passing relevant switches to the sonar-scanner command.
Just curious if MonoTouch has support for "Module Initializers"?
http://blogs.msdn.com/b/junfeng/archive/2005/11/19/494914.aspx
Related question: Does Mono support "Module Initializers"?
Your first link answer, at least half, your own question. The Mono runtime supports Module Initializers and the test done (to prove this) was executed with Mono's JIT.
MonoTouch uses the JIT when executing on the iOS simulator, so there's no reason why it would not work there.
It likely works (or it's a bug) for devices too, i.e. where the AOT compiler is being used. As Jason said, it's a matter of testing it. If you cannot test it yourself simply fill a bug report and attach a (self-contained) test case to it and we'll confirm if it works (or keep the bug open until it does).
From the MSDN article you linked to
Since C# does not support global functions, C# does not support module
initializer.