Warning:scalac: there was one deprecation warning; re-run with -deprecation for details - intellij-idea

Notice this in the message output:
Warning:scalac: there was one deprecation warning; re-run with -deprecation for details
What does this mean? And what should I re-run?
I tried rebuilding and syncing the project. But the warning message is still there.

Found a solution from command line:
sbt
set scalacOptions in ThisBuild ++= Seq("-unchecked", "-deprecation")
compile
And found the cause of the warning:
[warn] Blah.scala:53: Adaptation of argument list by inserting () has been deprecated: leaky (Object-receiving) target makes this especially dangerous.
[warn] signature: Logger.error(x$1: Any): Unit
[warn] given arguments: <none>
[warn] after adaptation: Logger.error((): Unit)
[warn] logger.error()
[warn] ^
[warn] one warning found
The problem is that I used a deprecated function call logger.error(). It is weird that IntelliJ does not give any lint error though.
Reference: https://stackoverflow.com/a/9578787/1035008

Related

meshcat_visualizer_test fails fetching repository 'yaml_cpp'

I'm trying to run drake/bindings/pydrake/systems/test/meshcat_visualizer_test.py as per the commented instructions at the top of said file, but I am unfamiliar as to how I would add yaml-ccp, which I believe is causing errors. I have the drake repo cloned and pydrake configured, and was able to Run Server (the first required command), but do not know how to add the yaml-cpp package if it is missing.
phil#philpc:~/drake/bindings/pydrake/systems/test$ bazel run --run_under='env TEST_ZMQ_URL=tcp://127.0.0.1:6000' //bindings/pydrake/systems:py/meshcat_visualizer_test -- 'TestMeshcat.test_point_cloud_visualization'
INFO: Repository yaml_cpp instantiated at:
no stack (--record_rule_instantiation_callstack not enabled)
Repository rule pkg_config_repository defined at:
/home/phil/drake/tools/workspace/pkg_config.bzl:276:25: in <toplevel>
ERROR: An error occurred during the fetch of repository 'yaml_cpp':
Unable to complete pkg-config setup for #yaml_cpp repository: error 1 from [/usr/bin/pkg-config, "yaml-cpp"]:
INFO: Repository remotejdk11_linux instantiated at:
no stack (--record_rule_instantiation_callstack not enabled)
Repository rule http_archive defined at:
/home/phil/.cache/bazel/_bazel_phil/a5ca8dfa5bc97606d4bf1d23312635a2/external/bazel_tools/tools/build_defs/repo/http.bzl:336:16: in <toplevel>
INFO: Repository remote_java_tools_linux instantiated at:
no stack (--record_rule_instantiation_callstack not enabled)
Repository rule http_archive defined at:
/home/phil/.cache/bazel/_bazel_phil/a5ca8dfa5bc97606d4bf1d23312635a2/external/bazel_tools/tools/build_defs/repo/http.bzl:336:16: in <toplevel>
INFO: Repository fmt instantiated at:
no stack (--record_rule_instantiation_callstack not enabled)
Repository rule _github_archive_real defined at:
/home/phil/drake/tools/workspace/github.bzl:102:24: in <toplevel>
INFO: Repository lcm instantiated at:
no stack (--record_rule_instantiation_callstack not enabled)
Repository rule _github_archive_real defined at:
/home/phil/drake/tools/workspace/github.bzl:102:24: in <toplevel>
ERROR: /home/phil/drake/tools/install/libdrake/BUILD.bazel:251:1: //tools/install/libdrake:libdrake_runtime_so_deps depends on #yaml_cpp//:yaml_cpp in repository #yaml_cpp which failed to fetch. no such package '#yaml_cpp//': Unable to complete pkg-config setup for #yaml_cpp repository: error 1 from [/usr/bin/pkg-config, "yaml-cpp"]:
ERROR: Analysis of target '//bindings/pydrake/systems:py/meshcat_visualizer_test' failed; build aborted: no such package '#yaml_cpp//': Unable to complete pkg-config setup for #yaml_cpp repository: error 1 from [/usr/bin/pkg-config, "yaml-cpp"]:
INFO: Elapsed time: 0.515s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (6 packages loaded, 0 targets configured)
FAILED: Build did NOT complete successfully (6 packages loaded, 0 targets configured)
Try running /usr/bin/pkg-config yaml-cpp --libs on the command line and see what happens. It should report no error and just print -lyaml-cpp.
Have you installed Drake's dependencies using https://drake.mit.edu/ubuntu.html command? It should have installed libyaml-cpp-dev at that point, which should be all that is needed for pkg-config to succeed.

IntelliJ cannot resolve jsDependency when connected to corporate VPN

When I'm connected to my company's VPN, IntelliJ is unable to resolve certain jsDependencies.
I have set proxy settings in IntelliJ to point to my corporate proxy server, but this seems to make no difference.
If I disconnect from the VPN, then everything builds fine...
Error:Error while importing SBT project:<br/>...<br/><pre>[info]
Resolving org.eclipse.jetty#jetty-util;8.1.16.v20140903 ...
[info] Resolving org.eclipse.jetty#jetty-io;8.1.16.v20140903 ...
[info] Resolving org.eclipse.jetty#jetty-http;8.1.16.v20140903 ...
[info] Resolving org.eclipse.jetty#jetty-server;8.1.16.v20140903 ...
[info] Resolving org.eclipse.jetty.orbit#javax.servlet;3.0.0.v201112011016 ...
[info] Resolving org.eclipse.jetty#jetty-continuation;8.1.16.v20140903 ...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: org.webjars#jquery;2.1.3: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Unresolved dependencies path:
[warn] org.webjars:jquery:2.1.3 ((org.scalajs.sbtplugin.ScalaJSPluginInternal) ScalaJSPluginInternal.scala#L996)
[warn] +- weatherreportui5:weatherreportui5_sjs0.6_2.11:0.1
[trace] Stack trace suppressed: run 'last *:ssExtractDependencies' for the full output.
[trace] Stack trace suppressed: run 'last *:update' for the full output.
[error] (*:ssExtractDependencies) sbt.ResolveException: unresolved dependency: org.webjars#jquery;2.1.3: not found
[error] (*:update) sbt.ResolveException: unresolved dependency: org.webjars#jquery;2.1.3: not found
[error] Total time: 1 s, completed 04-Sep-2017 17:31:13</pre><br/>See complete log in file:/Users/i003638/Library/Logs/IdeaIC2017.2/sbt.last.log
The sbt.last.log file complains:
[error] Server access Error: Connection refused url=https://repo1.maven.org/maven2/org/webjars/jquery/2.1.3/jquery-2.1.3.pom
[warn] module not found: org.webjars#jquery;2.1.3
[warn] ==== local: tried
[warn] /Users/xxxxxx/.ivy2/local/org.webjars/jquery/2.1.3/ivys/ivy.xml
[warn] ==== local-preloaded-ivy: tried
[warn] /Users/xxxxxx/.sbt/preloaded/org.webjars/jquery/2.1.3/ivys/ivy.xml
[warn] ==== local-preloaded: tried
[warn] file:////Users/xxxxxx/.sbt/preloaded/org/webjars/jquery/2.1.3/jquery-2.1.3.pom
[warn] ==== public: tried
[warn] https://repo1.maven.org/maven2/org/webjars/jquery/2.1.3/jquery-2.1.3.pom
If this is a problem with my company's proxy server, then I'm not sure why putting the Maven URL into my browser (when connected to the VPN) displays the POM file without any problems.
Also, the path name to the Ivy2 cache shown in sbt.last.log does not match the actual path to the cache on disk. It should be ~/.ivy2/cache.
Any ideas?
Thanks
It was the VM parameter settings in IntelliJ.
Preferences -> Build, Execution and Deployment -> SBT.
Needed to add:
-Dhttp.proxyHost=hostname
-Dhttp.proxyPort=8080
-Dhttps.proxyHost=hostname
-Dhttps.proxyPort=8080

Error when installing mod_perl2

I am trying to install mod_perl2 with below configuration: OS: CentOS release 5.5 (Final) Uname -a result: x86_64 x86_64 x86_64 GNU/Linux Perl version: v5.8.8 built for x86_64-linux-thread-multi apache version: Apache/2.2.3 I have downloaded mod_perl2 from Cpan site
when I try to run the "perl Makefile.PL MP_APXS=/usr/local/httpd/bin/apxs" it gives below output:
Subroutine set_version redefined at ./Makefile.PL line 137.
[ info] generating script t/TEST
[ info] generating script ./t/cgi-bin/cookies.pl
[ info] generating script ./t/cgi-bin/next_available_port.pl
Checking for Cwd...ok
Checking for File::Spec...ok
[ info] generating script t/TEST
Generating a Unix-style Makefile
Writing Makefile for mod_perl2
[warning] mod_perl dso library will be built as mod_perl.so
[warning] You'll need to add the following to httpd.conf:
[warning]
[warning] LoadModule perl_module modules/mod_perl.so
[warning]
[warning] depending on your build, mod_perl might not live in
[warning] the modules/ directory.
[warning] Check the results of
[warning]
[warning] $ /usr/local/httpd/bin/apxs -q LIBEXECDIR
[warning]
[warning] and adjust the LoadModule directive accordingly.
After "make" command runs below error occurs:
modperl_env.c: In function ‘modperl_env_magic_local_all’:
modperl_env.c:544: error: ‘MGf_LOCAL’ undeclared (first use in this function)
modperl_env.c:544: error: (Each undeclared identifier is reported only once
modperl_env.c:544: error: for each function it appears in.)
modperl_env.c: At top level:
modperl_env.c:642: warning: excess elements in struct initializer
modperl_env.c:642: warning: (near initialization for ‘MP_vtbl_env’)
modperl_env.c: In function ‘modperl_env_init’:
modperl_env.c:661: warning: passing argument 2 of ‘Perl_mg_find’ discards qualifiers from pointer target type
modperl_env.c:673: warning: implicit declaration of function ‘mg_free_type’
modperl_env.c:678: error: ‘MGf_LOCAL’ undeclared (first use in this function)
modperl_env.c: In function ‘modperl_env_unload’:
modperl_env.c:690: warning: passing argument 2 of ‘Perl_mg_find’ discards qualifiers from pointer target type
make1: * [modperl_env.lo] Error 1
make1: Leaving directory `/opt/mod_perl-2.0.10/src/modules/perl'
make: * [modperl_lib] Error 2
any help is appriciated, if i have asked somthing wrong please guide further (no down votes please :) )
This constant as been introduced in perl 5.9.3, and mod_perl use it from 2.0.10.
http://search.cpan.org/~vpit/Variable-Magic-0.62/lib/Variable/Magic.pm#MGf_LOCAL
https://perl5.git.perl.org/perl.git/commit/a5063e7cd8fef802efd25ffe9df2c3748f4254f6
https://github.com/apache/mod_perl/commit/82827132efd3c2e25cc413c85af61bb63375da6e
https://perldoc.perl.org/perlguts.html
to overcome this you must modify mod_perl to use this constant conditionaly of the perl version:
diff -ruw mod_perl-2.0.11/src/modules/perl/modperl_env.c mod_perl-2.0.11.patched/src/modules/perl/modperl_env.c
--- mod_perl-2.0.11/src/modules/perl/modperl_env.c 2017-12-06 11:08:55.000000000 -0500
+++ mod_perl-2.0.11.patched/src/modules/perl/modperl_env.c 2018-03-27 15:02:14.174790000 -0400
## -541,7 +541,9 ##
nmg = sv_magicext(nsv, mg->mg_obj, mg->mg_type, &MP_vtbl_env, (char*)NULL, 0);
nmg->mg_ptr = mg->mg_ptr;
nmg->mg_flags |= MGf_COPY;
+#if MP_PERL_VERSION_AT_LEAST(5, 9, 3)
nmg->mg_flags |= MGf_LOCAL;
+#endif
return 1;
}
## -679,7 +681,9 ##
/* Add our version instead */
mg = sv_magicext((SV*)ENVHV, (SV*)NULL, PERL_MAGIC_env, &MP_vtbl_env, (char*)NULL, 0);
mg->mg_flags |= MGf_COPY;
+#if MP_PERL_VERSION_AT_LEAST(5, 9, 3)
mg->mg_flags |= MGf_LOCAL;
+#endif
}
void modperl_env_unload(pTHX)
A modified/enhanced version of Mathieu Carbonneaux's patch above was committed to the mod_perl SVN repository on October 8th, 2019:
http://svn.apache.org/viewvc?view=revision&revision=1868115
With this patch, mod_perl 2.0.11 will compile and install using Perl <= 5.8.8.
(Sorry, I don't have the reputation to comment, only answer.)
Why are you trying to build your own version of mod_perl? Centos has a pre-built version of mod_perl which will work with the pre-built version of Perl that is already installed.
$ sudo yum install mod_perl
(Of course, this won't help if you're not using the system Perl)
dont know how but mod_perl-2.0.6 has got installed successfully. had no success with the mod_perl-2.0.10 :(

How do i build apache Tez on hadoop 2.2.0

I am new to Apache Tez and Maven, I tried to install Apache Tez on my system. I used the following link to install ,
http://tez.apache.org/install.html
In that pom.xml present in the apache tez i have only changed hadoop and protobuf version equal to my environment which are following,
hadoop 2.2.0
libprotoc-2.4.1,
Tez-0.5.0
maven 3.0.5
java -1.7.0_65
While doing
“ mvn clean package -DskipTests=true -Dmaven.javadoc.skip=true “
i got the following error,
Error :
[ERROR] /home/karthick/work/apache-tez-0.5.0-src/tez-plugins/tez-yarn-timeline-history/src/main/java/org/apache/tez/dag/history/logging/ats/ATSHistoryLoggingService.java:[195,9] cannot find symbol
[ERROR] symbol: class TimelinePutError
[ERROR] location: class org.apache.tez.dag.history.logging.ats.ATSHistoryLoggingService
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :tez-yarn-timeline-history
I have gone through that file ATSHistoryLoggingService.java present in the apache tez, but i couldn't understand what was happening there. I dont know how to clear History logging Service.So I have tried again as newly. That time also i got the same error. I dont know how to proceed my installation process.
Can anyone help me to solve this problem ?
Thanks in advance.
Check the BUILDING.txt file at the top of the source tree. It has a pointer for "Building against a specific version of hadoop". You are missing a "-P!hadoop24" in your maven command. Also, I believe you need protobuf-2.5.0.

SBT xalan#serializer error in IntelliJ

I'm using Intellij to build a Play 2 web app in Scala. However, I keep getting this error inside Intellij.
SBT project import
[warn] [FAILED ] xalan#serializer;2.7.1!serializer.jar(src): (0ms)
[warn] ==== typesafe-ivy-releases: tried
[warn] http://repo.typesafe.com/typesafe/ivy-releases/xalan/serializer/2.7.1/srcs/serializer-sources.jar
[warn] ==== sbt-plugin-releases: tried
[warn] http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/xalan/serializer/2.7.1/srcs/serializer-sources.jar
[warn] ==== local: tried
[warn] C:\Users\ *** \.ivy2\local\xalan\serializer\2.7.1\srcs\serializer-sources.jar
[warn] ==== public: tried
[warn] http://repo1.maven.org/maven2/xalan/serializer/2.7.1/serializer-2.7.1-sources.jar
[warn] ==== Typesafe repository: tried
[warn] http://repo.typesafe.com/typesafe/releases/xalan/serializer/2.7.1/serializer-2.7.1-sources.jar
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: FAILED DOWNLOADS ::
[warn] :: ^ see resolution messages for details ^ ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: xalan#serializer;2.7.1!serializer.jar(src)
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] [FAILED ] xalan#serializer;2.7.1!serializer.jar(doc): (0ms)
[warn] ==== local: tried
[warn] C:\Users\ *** \.ivy2\local\xalan\serializer\2.7.1\docs\serializer-javadoc.jar
[warn] ==== public: tried
[warn] http://repo1.maven.org/maven2/xalan/serializer/2.7.1/serializer-2.7.1-javadoc.jar
[warn] ==== Typesafe Releases Repository: tried
[warn] http://repo.typesafe.com/typesafe/releases/xalan/serializer/2.7.1/serializer-2.7.1-javadoc.jar
[warn] ==== Typesafe Releases: tried
[warn] http://repo.typesafe.com/typesafe/releases/xalan/serializer/2.7.1/serializer-2.7.1-javadoc.jar
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: FAILED DOWNLOADS ::
[warn] :: ^ see resolution messages for details ^ ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: xalan#serializer;2.7.1!serializer.jar(doc)
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
When running the project from a command line everything works correctly, it's just really annoying having this error pop up everytime I open Intellij.
Cheers
After getting the same error and trying lots of stuff, I finally specified a newer version of the missing jar. I added the following to my build.sbt:
libraryDependencies += "xalan" % "serializer" % "2.7.2"
The root problem is that the Javadoc and sources aren't available for xalan serializer v2.7.1 in the public repos that sbt checks, but they are available for the newer version. The small bump in version shouldn't affect anything.
An alternate solution is to not specify that sbt download Javadocs and sources.
Turn off [Project Settings] - [SBT] - [Download source and docs] checkbox
Well IntelliJ IDEA is great, but the sbt plugin has a lot of bugs... You should submit an error report here.
When you create the project check the box for 'Use auto-import'