bedatadriven / renjin

JVM-based interpreter for the R language for the statistical analysis.
https://www.renjin.org
GNU General Public License v2.0
514 stars 82 forks source link

library(pso) failing without info (xcode9 & Java8) #497

Open yannrichet opened 4 years ago

yannrichet commented 4 years ago

Same issue as described here : https://stackoverflow.com/questions/59379206/renjin-cannot-install-default-packages Should be reproduced with

AetherPackageLoader loader = new AetherPackageLoader();
loader.setRepositoryListener(new ConsoleRepositoryListener(System.out));
loader.setTransferListener(new ConsoleTransferListener(System.out));

Session session = new SessionBuilder()
        .withDefaultPackages()
        .setPackageLoader(loader)
        .build();

RenjinScriptEngineFactory factory = new RenjinScriptEngineFactory();
RenjinScriptEngine engine = factory.getScriptEngine(session);

String code = "library('digest')";

SEXP sexp = (SEXP)engine.eval(code);
System.out.println(sexp);

On a travis-CI system :

language: java
cache:
  directories:
    - $HOME/.m2
matrix:
  include:
    - name: "MacOS JDK8"
      os: osx
      osx_image: xcode9.3
...
akbertram commented 4 years ago

What is the problem exactly?

yannrichet commented 4 years ago

I have that trace, while it works well if yuou replace osx_image: xcode9.3 by osx_image: xcode10.1 in travis-ci :

org.renjin.eval.EvalException: Could not find package 'pso'

    at org.renjin.primitives.packaging.NamespaceRegistry.getNamespace(NamespaceRegistry.java:141)

    at org.renjin.primitives.packaging.NamespaceRegistry.getNamespace(NamespaceRegistry.java:114)

    at org.renjin.primitives.packaging.Packages.library(Packages.java:39)

    at org.renjin.primitives.R$primitive$library.doApply(R$primitive$library.java:68)

    at org.renjin.primitives.R$primitive$library.applyPromised(R$primitive$library.java:33)

    at org.renjin.sexp.BuiltinFunction.apply(BuiltinFunction.java:100)

    at org.renjin.primitives.special.InternalFunction.apply(InternalFunction.java:46)

    at org.renjin.sexp.FunctionCall.eval(FunctionCall.java:80)

    at org.renjin.primitives.special.BeginFunction.apply(BeginFunction.java:39)

    at org.renjin.sexp.FunctionCall.eval(FunctionCall.java:80)

    at org.renjin.sexp.Closure.applyPromised(Closure.java:200)

    at org.renjin.sexp.Closure.apply(Closure.java:133)

    at org.renjin.sexp.FunctionCall.eval(FunctionCall.java:80)

    at org.renjin.sexp.ExpressionVector.eval(ExpressionVector.java:85)

    at org.renjin.eval.Context.evaluate(Context.java:280)

    at org.renjin.script.RenjinScriptEngine.eval(RenjinScriptEngine.java:174)

    at org.renjin.script.RenjinScriptEngine.eval(RenjinScriptEngine.java:133)

    at org.math.R.RenjinLibraryTest.testLoadPackage(RenjinLibraryTest.java:29)