Giter Club home page Giter Club logo

Comments (7)

boris-spas avatar boris-spas commented on June 24, 2024

Hey @RoySRose,
Thanks for taking the time to look into GraalVM instrumentation!
Yeah, the documentation for instrumentation is currently a work in progress (as is this repo which is meant to be a starting point for development), hopefully we will have some better guides soon :)

So, I just double checked that the setup here works for me. What I did was point JAVA_HOME to GRAALVM_HOME and run
mvn clean package && ./runJsWithCoverage.sh
Seems like you are on a mac and I am running linux so maybe (though not likely) there is a subtle difference of some kind...

Maybe we can do a few sanity checks:

  • Is the simpletool-19.2.0.jar in the target folder?
  • could you provide the output of ./simpletool js --version:graalvm
  • check that ./simpletool js --help:tools contains a Simple Code Coverage entry

from simpletool.

RoySRose avatar RoySRose commented on June 24, 2024

@boris-spas
Hello, Thank you for your time taking look at this. As you've commented I also don't think it's the mac that causes this. Well, it's what Graalvm is for, 'running multiple languages on one vm'. (of course, there is also native part)
I've followed your instructions and checked as below

  1. I've changed $JAVA_HOME to $GRAALVM_HOME in simpletool script
    image

  2. my $GRAALVM_HOME points to graalvm-ce-19.2.1
    image

  3. Yes there is simpletool-19.2.0.jar in the target folder?
    image
    (just added few print in example.js)

  4. I can't run ./simpletool js --version:graalvm with below error.
    image

But I can run it if I remove --simple-code-coverage \ from simpletool script, and the result is as below
image

  1. I'm trying to check ./simpletool js --help:tools contains a Simple Code Coverage entry, I've run the command but I'm afraid I don't know how to check the entry. posting the results below. If you can guide me more on this. I will check right away.

image

Please let me know if there is anything for me to check additionally.

from simpletool.

boris-spas avatar boris-spas commented on June 24, 2024

Unusual... Seems that the tool is not picked up when being appended to the classpath.
Would you please run the following to make sure it's not a path issue.
$GRAALVM_HOME/bin/js --jvm --vm.Dtruffle.class.path.append=/absolute/path/to/simpletool-19.2.0.jar --simple-code-coverage -e '1+1'
for me the output is as follows:

==
Coverage of null is 100.00%
+ 1+1

from simpletool.

RoySRose avatar RoySRose commented on June 24, 2024

Unfortunately... no luck

image

seems --simple-code-coverage option(?)/tool(?) is still not recognized.

So far I know, Graalvm CE 19.2 is the latest version. Do you think I should try with another version?


Have tried with graalvm-ce-19.1.1, still no luck..

image

any suggestions? that I can try?

from simpletool.

boris-spas avatar boris-spas commented on June 24, 2024

As a sanity check I re-ran the gate with 19.2.0 (https://travis-ci.org/boris-spas/simpletool/jobs/614411116?utm_medium=notification&utm_source=github_status) and with 19.2.1 (https://travis-ci.org/boris-spas/simpletool/jobs/614414957?utm_medium=notification&utm_source=github_status) and both pass.

I'm running low on ideas about whats special about your machine :/

from simpletool.

RoySRose avatar RoySRose commented on June 24, 2024

@boris-spas

First of all, Once again thank you for your time.
I looked at your travis link.
Decided to start from scratch.

Fortunately, It worked.

Got back and searched for the reason.
I found out the option was not being registered.

@Option(name = "", help = "Enable Simple Coverage (default: fa......

Something wrong about auto generated SimpleCoverageInstrumentOptionDescriptors.class

But it was due to some kind of dependency error. I couldn't dig it deeper. But it was solved after re-updating the dependencies.

Anyway. Thank you again.
I'll start looking into truffle instrument api, hope to reach you with good new.

from simpletool.

boris-spas avatar boris-spas commented on June 24, 2024

Good stuff! I'll close the issue then!

from simpletool.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.