I use CompUnit::PrecompilationStore::File in a module, which passes all my tests under Rakudo v2022.02 (on my local machine I have not yet upgraded Raku).
Under Rakudo v2022.06, zef test . in the module directory causes a deprecation error (see details below) (reported to me in an issue on the module's github repo).
Simply replacing File with FileSystem in the relevant line locally now causes errors under Rakudo v2022.02.
What is the best way of handling this situation in the Module?
Details of error
Pod::From::Cache] Saw 1 occurrence of deprecated code.
[Pod::From::Cache] ================================================================================
[Pod::From::Cache] Use of the 'CompUnit::PrecompilationStore::File' class seen at:
[Pod::From::Cache] /Users/coke/sandbox/raku-pod-from-cache/lib/Pod/From/Cache.rakumod (Pod::From::Cache), line 46
[Pod::From::Cache] Please use the 'CompUnit::PrecompilationStore::FileSystem' class instead.
[Pod::From::Cache] --------------------------------------------------------------------------------
[Pod::From::Cache] Please contact the author to have these occurrences of deprecated code
[Pod::From::Cache] adapted, so that this message will disappear!
Run your code with the RAKUDO_NO_DEPRECATIONS environment variable set.
%*ENV<RAKUDO_NO_DEPRECATIONS> = 1;
CompUnit::PrecompilationStore::File.new(:prefix(".".IO));
Related
I am getting following exception when trying to call feature file of another module from different module with logs as,
org.graalvm.polyglot.PolyglotException: TypeError: Access to host class utils.Utils is not allowed or does not exist.
Following is the file which I am trying to run as,
https://github.com/bipin-k/karate-automation/blob/master/sample-automation/src/main/java/sample.feature
https://github.com/bipin-k/karate-automation
karate error description
Please read this answer for hints on how to handle re-use across Java modules: https://stackoverflow.com/a/58339662/143475
Recommendation is to avoid it as far as possible. And things like call read('../../../../core-utilities/src/main/java/java-functions-calls.feature') lead to un-maintainable tests: https://stackoverflow.com/a/54126724/143475
Most likely the problem is because in the project where you make the call - the utils.Utils class is simply not on the Java "classpath". You should probably take the help of someone who knows Java well, or stick to a simpler "single module" Java project.
This question already has answers here:
I use gRPC to generate java code '#javax.annotation.Generated' and it reports 'Error:(20,18) java: cannot find symbol'. How to solve it?
(3 answers)
Closed 6 months ago.
This is my first time using IntelliJ so this is probably just a basic question but alas I have it anyways.
I have cloned a github project into IntelliJ that uses gradle. I import and first thing it says is that gradle is not set up right, so I set it up according to the following:
gradle prefrences Java version 14.0.1. Then it said the SDK was still not set up so I again set that up for again version even though I am not using Android.
I can successfully run a few of the grade tests but all of my java code no longer links methods and when I run the tests (directly from github without any changes yet) I get an error: cannot find symbol #javax.annotation.Generated(
Also all of the methods in my example seem to no longer link. I have a screenshot of this too.
Any guidance is appreciated, probably a problem in the set up? I found this symbol error a few times but no resolution that helped. I tried invalidating caches and restarting a few times. I deleted the .idea files a few times. tried a different repository in git and still having the same errors.
Thanks!
Simply add the javax annotation dependency into your build.gradle.
dependencies {
//...
implementation 'javax.annotation:javax.annotation-api:1.3.2'
//...
}
like so.
I am trying to install the fb-caffe-exts extension for Torch from Github fb-caffe-exts, specifically I am trying to use torch2caffe.
I am trying to run the test.lua demo for torch2caffe, but I am getting the following error, which refers to a line in the test.lua file:
t2c.run(opts, module) --attempt to call field 'run' (a nil value)
All the tests fail, with the stack trace referring to this error. I have installed the dependencies (fb.lualib etc) and added the lua packages to my path. Fb.python and the other dependencies import without producing errors.
Any help appreciated.
I'm on OS X 10.11.1 running the latest version of X Code. I installed Lua 5.3 today from source with no problem. Seems to work correctly. No errors installing luarocks and then using it to install moonscript. However, both moon and moonc give the following error when invoked from the command line:
$ moon
/usr/local/bin/lua: /usr/local/share/lua/5.3/alt_getopt.lua:24: attempt to call a nil value (global 'module')
stack traceback:
/usr/local/share/lua/5.3/alt_getopt.lua:24: in main chunk
[C]: in function 'require'
/usr/local/lib/luarocks/rocks/moonscript/0.4.0-1/bin/moon:2: in main chunk
[C]: in ?
Looking at alt_getopt.lua shows that it is indeed using the now-defunct 'module' keyword. The GitHub project for this module appears to be dead with no action in the past 3 years.
How should I proceed to get Moonscript working on my system?
Yes, as you noted, module has been deprecated for quite a while and was only working with earlier versions because of compatibility switches.
You can comment out the line 24 in alt-getopt and add the following line to the end of the alt-getopt.lua file: return {get_opts = get_opts, get_ordered_opts = get_ordered_opts}.
This should make this module Lua 5.2/5.3 compatible (I haven't checked if there are any other compatibility issues with using Lua 5.3 though).
I need help understanding an error why I'm seeing an error.
The feature api is already enabled with the correct ApiListener object, and Api logs are being updated in /var/lib/icinga2/api/log/current .
But I'm getting this error when I restart icinga2:
Error: Error while evaluating expression: The type 'ApiUser' is unknown: in /etc/icinga2/conf.d/api-users.conf: 1:0-1:20
I'm running version r2.3.10-1 of Icinga2 on Ubuntu.
Can someone explain what the problem is?
You are probably mixing the current snapshot packages with the released stable versions. The 'ApiUser' object is part of the upcoming Icinga 2 v2.4 release and only available in git master (and therefore snapshot packages as well as docs). The stable 2.3.x tree does not have that kind of configuration object type and therefore bails out with an error.
Remove that file or its content, you don't need it for 2.3.x.