Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enso Integration with Ideal Graph Visualizer #4692

Closed
5 tasks done
wdanilo opened this issue Feb 5, 2023 · 0 comments
Closed
5 tasks done

Enso Integration with Ideal Graph Visualizer #4692

wdanilo opened this issue Feb 5, 2023 · 0 comments
Assignees
Labels
-compiler p-low Low priority x-new-feature Type: new feature request x-profiling

Comments

@wdanilo
Copy link
Member

wdanilo commented Feb 5, 2023

This task is automatically imported from the old Task Issue Board and it was originally created by jaroslavtulach.
Original issue is here.


Why

As Enso developer or power user
**I want know how my Enso program gets compiled **
**So that I can improve the code at appropriate places **

Acceptance Criteria

Scenario: 
Given an interest in performance of own Enso program
When one enables --dumpGraph
Then one can see how each Enso code construct compiles in IGV

Notes:

IGV by default displays Java code, however it also has the ability to display "guest language" - e.g. JavaScript or in our case Enso. However that requires a special plugin (currently providing TextMate grammar and registration for the IGV). Let's productize this.

Tasks:

  • Create a PR with the code
  • Write documentation with instructions and snapshots
  • Setup CI to build the code and upload artifacts
  • CLI option --dumpGraphs to replace usage of JAVA_OPTS
  • (Not) Sign the NBM file right now

Comments:

Use IGV's Tools/Plugins/Downloaded to install support for Enso. (jaroslavtulach - Jun 6, 2022)


Start IGV with the Enso support plugin installed. Invoke Enso as: ``` JAVA_OPTS=-Dgraal.Dump=:1\ -Dgraal.PrintGraph=Network enso-engine-0.0.0-dev-linux-amd64/enso-0.0.0-dev/bin/enso --run your_program.enso ``` The "Enso icon" shall become available on nodes that have `nodeSourcePosition` property for Enso source code - e.g. where the property says: ``` enso: (file:///home/devel/NetBeansProjects/sieve/enso/sieve.enso:66) (file:///home/devel/NetBeansProjects/sieve/enso/sieve.enso:64) ``` (jaroslavtulach - Jun 6, 2022)
Notes from discussion with @murbanczyk : - separate workflow file - use standard github actions - use GH Actions "upload-artifact" action - license: Apache
upload to s3 bucket to get stable URL
  • one needs credential
  • action "upload to bucket"
      - name: Prepare AWS Session
        shell: bash
        run: |
          aws configure --profile s3-upload <<-EOF > /dev/null 2>&1
          ${{ secrets.LAUNCHER_DEPLOY_ACCESS_KEY_ID }}
          ${{ secrets.LAUNCHER_DEPLOY_SECRET_ACCESS_KEY }}
          eu-central-1
          text
          EOF
      - name: Upload the Linux Launcher Package to S3
        shell: bash
        run: >
          aws s3 cp repo/built-distribution/enso-launcher-${{ env.DIST_VERSION
          }}-linux-amd64.tar.gz s3://launcherfallback/launcher/enso-${{
          env.DIST_VERSION }}/ --profile s3-upload --acl public-read

(jaroslavtulach - Jun 6, 2022)


**Jaroslav Tulach** reports a new **STANDUP** for today (2022-06-17):

Progress: Discussions about hashmaps, modularity in stdlib, etc.: https://discord.com/channels/401396655599124480/987076298461560832/987333140114710568; planning; documenting how to install Enso4IGV, setting up CI: #3533; benchmarking for #182485854 It should be finished by 2022-06-21.

Next Day: Document how to use Enso4IGV. Sign the NBM file. Then: #182485854 (Enso Bot - Jun 17, 2022)


**Jaroslav Tulach** reports a new **STANDUP** for yesterday (2022-06-20):

Progress: Reviewing API for sliders: #3532; Polishing igv4enso documentation: #3533; Rewrite to single literal node #3536; discussions, demos, recruiting emails It should be finished by 2022-06-21.

Next Day: New --dumpGraphs option for Enso4IGV. Fix tests for single LiteralNode. Integrate both. (Enso Bot - Jun 21, 2022)


There is a problem with the CLI `--dump-graphs` option. It is a JVM option and should be processed before the JVM is started. However `enso` launcher options are processed only when the process is on. There is a way to enable IGV dumping while the JVM is running: https://github.com/jaroslavtulach/enso/commit/065a8ddd9d1bc3f981b675c37904481563d4292b - however it only influences Graal compiler, not Truffle compilations. Need to ask the experts and/or investigate deeper. Below is a snapshot of the compilation I get:

Alas, the JMX bean is being deprecated: https://github.com/oracle/graal/blame/master/compiler/CHANGELOG.md#L14 and will likely stop working in the future. We need different solution. Reported PR-4664 to the GraalVM team. Working on bash and .bat launcher changes right now. (jaroslavtulach - Jun 22, 2022)


**Jaroslav Tulach** reports a new **🔴 DELAY** for yesterday (2022-06-22):

Summary: There is 1 day delay in implementation of the Enso Integration with Ideal Graph Visualizer (#182388312) task.
It will cause 1 day delay for the delivery of this weekly plan.

Delivered.

Delay Cause: Implementing --dump-graphs options turned out to be more complicated than expected. Implementing --dump-graphs options turned out to be more complicated than expected.

Possible solutions: Less aggressive estimates with a buffer for unexpected complications. (Enso Bot - Jun 23, 2022)


**Jaroslav Tulach** reports a new **STANDUP** for yesterday (2022-06-22):

Progress: Few comments about parser effort including 45min video about the latest Java features: https://www.youtube.com/watch?v=u0cW7zx3m38; discussion about lazy vs. eager AST mode for IDE. Talking & investigating Array, Date, File interop & co. https://discord.com/channels/401396655599124480/989151208784662568/989151513555394570; Issues implementing --dump-graphs option: https://www.pivotaltracker.com/story/show/182388312/comments/231898946 - few failed attempts, discussion with GraalVM's Tomáš Zezula and an issue for them: oracle/graal#4664; brute force implementation of --dump-graphs in Unix shell and .bat launchers. Finally Enso for IGV integrated: #3533; Recruiting, discussions, AMA. It should be finished by 2022-06-22.

Next Day: #182199750: Benchmarks are unstable: Investigate why! (Enso Bot - Jun 23, 2022)


The documentation is on: https://github.com/enso-org/enso/blob/develop/tools/enso4igv/README.md (commit [479f74c](https://github.com/enso-org/enso/blob/479f74cc84cda064a05cdd3cefcf44eb690eff87/tools/enso4igv/README.md)). The [download area](https://github.com/enso-org/enso/actions/workflows/enso4igv.yml) is populated. Signing of the `.nbm` file isn't currently implemented - reported as #182544676.

(jaroslavtulach - Jun 23, 2022)


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-compiler p-low Low priority x-new-feature Type: new feature request x-profiling
Projects
None yet
Development

No branches or pull requests

2 participants