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

Downloadable VSCode extension #7861

Merged
merged 8 commits into from
Sep 23, 2023
Merged

Conversation

JaroslavTulach
Copy link
Member

@JaroslavTulach JaroslavTulach commented Sep 21, 2023

Pull Request Description

Updating the Enso4Igv GitHub action to also archive the .vsix extension.

Checklist

Please ensure that the following checklist has been satisfied before submitting the PR:

  • The documentation has been updated including installation instructions
  • Screenshots/screencasts have been attached
  • All code follows proper XML formatting
  • All code has been tested:
    • CI produces and uploads the right the artifact

@JaroslavTulach
Copy link
Member Author

JaroslavTulach commented Sep 21, 2023

CI actions run has just produced a ZIP file with VSCode Extension.

Download "VSCode Extension" artifact from the latest actions run, unzip, install into VSCode:

Install VSIX

Your Enso files will get proper syntax coloring. You'll be able to debug Java/Enso code interchangeably.

Copy link
Member

@Akirathan Akirathan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very cool! I have just downloaded the VSIX artifact and installed it in my VSCode. Everything works as expected. Thanks.

@Akirathan
Copy link
Member

In the future, we might want to add these artifacts as additional assets to nightly releases.

@JaroslavTulach
Copy link
Member Author

JaroslavTulach commented Sep 21, 2023

One can test "pristine" code with:

code --extensions-dir /tmp/code/ext --user-data-dir /tmp/code/usr

then the code starts with completely empty configuration. After installing the Enso .vsix file (and reloading window) I see two extensions:
Installed VSCode extensions
With such configuration I can choose File/Open Folder... and open root of Enso Git Repository (presumably already built with sbt buildEngineDistribution). Following set of projects is opened and ready for use:
Enso Projects

With the workspace opened, you an open any Enso or Java file. Let's for example open Vector_Spec.enso - a set of unit tests for Vector:

Openning Vector

It is possible place breakpoints into the Vector_Spec.enso file. For example:

Breakpoint

Let's do a bit of debugging. Select "Listen to 5005" debug configuration:

Listen to 5005

And then just execute the engine distribution in debug mode:

sbt:enso> runEngineDistribution --debug --run test/Tests/src/Data/Vector_Spec.enso

Breakpoint in Enso

The same way you can place breakpoint into Java class like PanicException.java and continue debugging:

Breakpoint in Java

Enjoy. And if you ever want to jump from Java to Enso, please remember there is the "Pause in GraalVM Script" action. Select it and continue with F5 - as soon as the code reaches a statement in Enso, it stops:

Pause in GraalVM

@JaroslavTulach JaroslavTulach force-pushed the wip/jtulach/BuildVsixExtension branch 4 times, most recently from 367a8e0 to 7999dfc Compare September 21, 2023 13:44
tools/enso4igv/vscode.md Outdated Show resolved Hide resolved
Copy link
Member

@radeusgd radeusgd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool that it will be now much easier for users to get the extension.
And the docs look great!

@@ -5,7 +5,7 @@
<artifactId>enso4igv</artifactId>
<packaging>nbm</packaging>
<name>Enso Language Support for NetBeans &amp; Ideal Graph Visualizer</name>
<version>1.13-NAPSHOT</version>
<version>1.15-SNAPSHOT</version>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the "major and minor" version of the .nbm file and .vsix extension. Bump it up when some important functionality changes.

@@ -30,7 +27,7 @@ jobs:
- name: Update project version
working-directory: tools/enso4igv
run: |
mvn versions:set -DnewVersion=`mvn -q -DforceStdout help:evaluate -Dexpression=project.version | cut -f1 -d -`.$GITHUB_RUN_NUMBER
mvn versions:set -DnewVersion=`mvn -q -DforceStdout help:evaluate -Dexpression=project.version | cut -f1 -d -`.`expr $GITHUB_RUN_NUMBER - 1666`
Copy link
Member Author

@JaroslavTulach JaroslavTulach Sep 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Every build of enso4igv.yml github action produces extension with a unique version. The major and minor numbers are specified by human and are taken from the pom.xml. The "micro" version is the $GITHUB_RUN_NUMBER.

To avoid the "micro" version to reach the sky, feel free to bump the minor version and then decrease the $GITHUB_RUN_NUMBER by a constant (currently 1666) to start counting from zero again.

@JaroslavTulach JaroslavTulach changed the title Build VSCode extension Downloadable VSCode extension Sep 21, 2023
@enso-bot
Copy link

enso-bot bot commented Sep 22, 2023

Jaroslav Tulach reports a new STANDUP for yesterday (2023-09-21):

Progress: - publishing VSCode extension: #7861

Next Day: Getting ready for next week's GraalVM workshop

@JaroslavTulach JaroslavTulach merged commit 7a31dcd into develop Sep 23, 2023
28 checks passed
@JaroslavTulach JaroslavTulach deleted the wip/jtulach/BuildVsixExtension branch September 23, 2023 07:15
@enso-bot
Copy link

enso-bot bot commented Sep 23, 2023

Jaroslav Tulach reports a new STANDUP for yesterday (2023-09-22):

Progress: - merged GraalVM21 support: #7855

Next Day: Getting ready for next week's GraalVM workshop

@JaroslavTulach JaroslavTulach mentioned this pull request Jan 18, 2024
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants