Cannot run genhtml in dart project - dart

I'm a newbie, I wanna learn Dart language.So basically I wanna display my coverage report. Follow in this https://pub.dev/packages/test_coverage. When I using genhtml command it not working
'genhtml' is not recognized as an internal or external command,
operable program or batch file.
And in my pubspec.yaml
name: fordart
description: A sample command-line application.
# version: 1.0.0
# homepage: https://www.example.com
environment:
sdk: '>=2.7.0 <3.0.0'
#dependencies:
# path: ^1.6.0
dev_dependencies:
pedantic: ^1.8.0
test: ^1.6.0
test_coverage: ^0.4.1
dependencies:
lcov: ^*
What I missing and can all you guys advice more coverage tools supported Dart language.I searched in Google there are many coverage tools like CodeCOV, Coverall, Codacy,... but it's so hard to set up in Dart projects beacause Dart language is not a popular language and the coverage tools maybe not supported for it .If you guys know how to set up please contact me.Thanks

Right now doesn't seem like repositories with only Dart work with Codacy

The lcov package puts down the genhtml command.
If you're on OSX:
❯ brew install lcov
Warning: lcov 1.15 is already installed and up-to-date.
To reinstall 1.15, run:
brew reinstall lcov
❯ command -v lcov
/opt/homebrew/bin/lcov
❯ command -v genhtml
/opt/homebrew/bin/genhtml
If you're on other Linux, including Amazon Linux 2:
❯ yum install lcov
❯ command -v genhtml
/usr/bin/genhtml
❯ command -v lcov
/usr/bin/lcov
If you get a message the package cannot be found, you might need to enable the repo, especially true on Amazon Linux 2:
❯ yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
See: Add repositories on an Amazon Linux instance

Related

install MongoDB C++ Driver problem in ubuntu 16.04

I want to install MongoDB C++ Driver, so first is mongocxx
I follow this installation:
http://mongocxx.org/mongocxx-v3/installation/
but I can not pass step 4
when I run this in mongo-cxx-driver/build
sudo cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local ..
it shows
-- Auto-configuring bsoncxx to use MNMLSTC for polyfills since C++17 is inactive
CMake Error at src/mongocxx/CMakeLists.txt:37 (find_package):
By not providing "Findlibmongoc-1.0.cmake" in CMAKE_MODULE_PATH this
project has asked CMake to find a package configuration file provided by
"libmongoc-1.0", but CMake did not find one.
Could not find a package configuration file provided by "libmongoc-1.0"
(requested version 1.13.0) with any of the following names:
[![enter image description here][1]][1]
libmongoc-1.0Config.cmake
libmongoc-1.0-config.cmake
Add the installation prefix of "libmongoc-1.0" to CMAKE_PREFIX_PATH or set
"libmongoc-1.0_DIR" to a directory containing one of the above files. If
"libmongoc-1.0" provides a separate development package or SDK, be sure it
has been installed.
second question,
Step 2: Choose a C++17 polyfill how can I set MNMLSTC/core?
does anyone can help me,I already trap here for a long time ?
my env:
mongo-c-driver 1.15.1
libmongoc-1.0
mongocxx-3.4.x
Cmake is complaining about not finding a package configuration file (xxx.cmake), probably because you didn't build libmongoc/libbson.
I've tried to reproduce your issue and hit the same problem when I only installed them (apt-get install), so my suggestion is that you get the sources and build them as described at: http://mongoc.org/libmongoc/current/installing.html
Here's the list of commands (with the latest version of mongo-c-driver=1.15.1) which I just tried and worked fine:
wget https://github.com/mongodb/mongo-c-driver/releases/download/1.15.1/mongo-c-driver-1.15.1.tar.gz
tar xzf mongo-c-driver-1.15.1.tar.gz
cd mongo-c-driver-1.15.1
mkdir cmake-build
cd cmake-build
cmake -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF ..
make
sudo make install
At this point you can go back into mongocxx/build and run again the command you were stuck at:
cd ../../mongo-cxx-driver/build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local ..

bazel installation to version 0.5.4 or higher to build TensorFlow

I'm building a container for TensorFlow with Bazel using docker build --pull -t $USER/tensorflow-serving-devel -f Dockerfile.devel . and running it docker run -it $USER/tensorflow-serving-devel as instructed here: https://www.tensorflow.org/serving/docker
However after when running the ./configure command I get this error
root#4489fe3513fc:/serving/tensorflow# ./configure
Extracting Bazel installation...
You have bazel 0.5.1 installed.
Please upgrade your bazel installation to version 0.5.4 or higher to build TensorFlow!
Configuration finished
root#4489fe3513fc:/serving/tensorflow# cd ..
root#4489fe3513fc:/serving# bazel test tensorflow_serving/...
................
ERROR: /serving/WORKSPACE:23:1: Traceback (most recent call last):
File "/serving/WORKSPACE", line 23
tf_serving_workspace()
File "/serving/tensorflow_serving/workspace.bzl", line 16, in tf_serving_workspace
tf_workspace(path_prefix = "", tf_repo_name = "...")
File "/root/.cache/bazel/_bazel_root/f8d1071c69ea316497c31e40fe01608c/external/org_tensorflow/tensorflow/workspace.bzl", line 146, in tf_workspace
check_version("0.5.4")
File "/root/.cache/bazel/_bazel_root/f8d1071c69ea316497c31e40fe01608c/external/org_tensorflow/tensorflow/workspace.bzl", line 56, in check_version
fail("\nCurrent Bazel version is {}, ...))
Current Bazel version is 0.5.1, expected at least 0.5.4
Trying to update bazel just gives me the same version number 0.5.1. I'm not sure on how to approach this. Is there a docker supported tag that I'm missing when I try to update?
Even I wanted 0.5.4 version of bazel for tensorflow 0.8.
Tried brew install bazel#0.5.1. Didnt work..
So, I downloaded bazel 0.5.4 version from bazel git release and installed it as follows:
Download bazel-0.5.4-without-jdk-installer-darwin-x86_64.sh from
https://github.com/bazelbuild/bazel/releases
chmod +x bazel-0.5.4-without-jdk-installer-darwin-x86_64.sh
./bazel-0.5.4-without-jdk-installer-darwin-x86_64.sh
bazel version in your terminal should give 0.5.4
Took barely couple of minutes to install it this way :) Hope that helps!!
(I shared similar answer here)

Installation of Torch not working

I have installed Torch by following the instructions here, which comes with Lua 5.1, but Lua 5.3 was installed previously on my system. Now when I try to run a program using Torch, I get the following error messages:
/Users/Marcel/torch/install/share/lua/5.1/trepl/init.lua:389: module 'Settings.arguments' not found:No LuaRocks module found for Settings.arguments
no field package.preload['Settings.arguments']
no file '/usr/local/share/lua/5.1/Settings/arguments.lua'
no file '/usr/local/share/lua/5.1/Settings/arguments/init.lua'
It would seem as if Torch is looking for its own version of Lua in the system directories, which only contain the previously installed version. Is there any way to fix this, or must I uninstall the Lua 5.3?
Thanks!
Simply change TORCH_LUA_VERSION value to LUAXX, as it is explain in installation instructions with 5.2 version. For 5.3 version, use LUA53:
git clone https://github.com/torch/distro.git ~/torch --recursive
cd ~/torch
# clean old torch installation
./clean.sh
# optional clean command (for older torch versions)
# curl -s https://raw.githubusercontent.com/torch/ezinstall/master/clean-old.sh | bash
# https://github.com/torch/distro : set env to use lua
TORCH_LUA_VERSION=LUA53 ./install.sh

Clang Code Coverage Invalid Output

So I've checked out and built the clang trunk by following these instructions http://clang.llvm.org/get_started.html. I can build my binary with --coverage and run it to get the .gcno and .gcda files, but when I run lcov I get "GENINFO: ... reached unexpected end of file".
Now I'm stuck and came to SO to look for help :)
I'm working with Ubuntu 13.04 and writing c++11, just in case that makes a difference.
I had the same problem with clang with lcov on Ubuntu 13.04.
Here is the solution which worked for me on more than one Ubuntu setup.
You will find there are two versions of gcov on Ubuntu. gcov-4.6.4 & gcov-4.7.3. By default the gcov link is set to gcov-4.7.3. Change that to gcov-4.6.4
Furthermore, use lcov version 1.10 instead of what is available via apt-get install
This should generate the code coverage report.
EDIT: Mine was a upgrade from Ubuntu 12.04 to 13.04. Just in case you don't see two versions of gcov.
Just summarising the steps for the answer already shared by #Himanshu in case somebody's looking for the exact steps to go about it:
Install gcc 4.6
sudo apt-get-install -y gcc-4.6
I couldn’t find locv 1.10 version out of the box so I compiled it myself:
git clone https://github.com/linux-test-project/lcov.git
cd lcov
Switch to a new branch with the commit that published lcov 1.10 version as base
git checkout -b 1_10 b5c1bdd
Compile lcov
sudo make install
Confirm that lcov installed is 1.10
lcov --version
With all these things in place, use the command:
lcov --gcov-tool /usr/bin/gcov-4.6 --capture -d gcov_data/ -o gcov_data/coverage.info
This avoids tinkering with the link of the default gcov on the system.
Then generate the visual coverage file
genhtml -o gcov_data/html gcov_data/coverage.info
where gcov_data is the folder containing the gcno and gcda files.

Javac not installed with openjdk-6-jdk

I have been trying some different java compilers over the weekend and decided to stick with javac this morning. I then proceeded to clean up the mess that was caused by my testing and removed every last trace of java and did a fresh 'apt-get install openjdk-6-jdk' after autoremove and autoclean.
The following weirdness was then encountered:
tarskin#5-PARA-11-0120:~$ javac
The program 'javac' can be found in the following packages:
* openjdk-6-jdk
* ecj
* gcj-4.4-jdk
* gcj-4.6-jdk
* gcj-4.5-jdk
* openjdk-7-jdk
Try: sudo apt-get install <selected package>
I had allready installed openjdk but i tried it anyhow yielding:
tarskin#5-PARA-11-0120:~$ sudo apt-get install openjdk-6-jdk
[sudo] password for tarskin:
Reading package lists... Done
Building dependency tree
Reading state information... Done
openjdk-6-jdk is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
tarskin#5-PARA-11-0120:~$
I know i must be doing something stupid but I have no idea what, if anyone else could give a pointer in the right direction that would be very much appreciated...
Cheers
EDIT: Found some other weird aspects about the 'new' instance of my java distro, it doesn't seem to recognise for example 'Pattern' or 'Matcher' that should be coming from the regex import shrugs.
TL;DR: install java-1.6.0-openjdk-devel
I had a similar issue on Fedora, but used rpm -q -l to list the contents of the (pre-installed) java-1.6.0-openjdk package, and discovered that it doesn't include javac. It is in fact only a JRE, not a JDK, as implied by the installation instructions on http://openjdk.java.net/install/ . To get javac, I installed java-1.6.0-openjdk-devel . Not exactly what I expected, because the usual packaging conventions would indicate that is the package for doing openjdk development (i.e., working on the JVM), not for developing programs with it.
Basically, openjdk's package naming doesn't follow either standard Java conventions (would require calling it a JRE somewhere), or standard Linux packaging conventions (using -devel indicates it is used for developing the package w/o -devel itself).
As per http://openjdk.java.net/install/, to install the OpenJDK-6 JRE only:
$ sudo apt-get install openjdk-6-jre
To install the full JDK:
$ sudo apt-get install openjdk-6-jdk
Check /etc/alternatives and /usr/bin. One or both will contain links to old Java versions which you had installed. When those links are broken, you can get the error message above.
To update the links after installing a new version of Java, try update-alternatives
First to check if javac is installed try to look for that file:
1. locate javac
2. or find / -name javac
And also you can check at this website with instrucions on how to install java on Ubuntu (i suppose you are on ubuntu):
http://openjdk.java.net/install/
You can also check:
http://packages.ubuntu.com/hardy/i386/openjdk-6-jdk/filelist for the files installed by the pacakge, and you can notice that javac should be installed.
Maybe you also need to run:
Open the terminal and run this command to install OpenJDK 7.0 on Ubuntu Oneiric:
sudo update-alternatives --config java

Resources