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

Fixing Enso project classpath while updating to IGV 1.20 #11195

Merged
merged 11 commits into from
Oct 1, 2024

Conversation

JaroslavTulach
Copy link
Member

@JaroslavTulach JaroslavTulach commented Sep 27, 2024

Pull Request Description

Classpath of projects with module-info.java is incorrectly computed and thus we cannot stop on breakpoints in VSCode, NetBeans nor new IGV version 1.20 that was integrated into GraalVM repository. Fixing generator of .enso-source* files, adjusting documentation and functionality.

Checklist

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

  • The documentation has been updated, if necessary.
  • Screenshots/screencasts have been attached, if there are any visual changes. For interactive or animated visual changes, a screencast is preferred.
  • All code follows the
    Scala,
    Java,
    TypeScript,
    and
    Rust
    style guides. In case you are using a language not listed above, follow the Rust style guide.
  • Unit tests have been written where possible.

@JaroslavTulach
Copy link
Member Author

There are stop and re-run buttons in the output tab now:

IGV output

@JaroslavTulach JaroslavTulach added the CI: No changelog needed Do not require a changelog entry for this PR. label Sep 27, 2024
@JaroslavTulach JaroslavTulach self-assigned this Sep 27, 2024
@JaroslavTulach
Copy link
Member Author

89545ef adds tighter integration with IGV:

Enable IGV Integration

It checks the properties IGV is using. Obtains the port it listens to and passes that to the JVM executing Enso. If the IGV isn't listening, it asks the user whether listening should be enabled.

download _IGV_. Or follow
[this link](https://lafo.ssw.uni-linz.ac.at/pub/idealgraphvisualizer/idealgraphvisualizer-0.31-cb98bbf5fef-all.zip)
[this link](https://lafo.ssw.uni-linz.ac.at/pub/idealgraphvisualizer/idealgraphvisualizer-1.20-ea624c6066a.zip)
Copy link
Member Author

Choose a reason for hiding this comment

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

@Akirathan, @4e6, @hubertp please make sure you upgrade your IGV.

Copy link
Member Author

Choose a reason for hiding this comment

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

@Akirathan, what's the best way to regenerate all .enso-sources* files? Is there a way to compile everything in our sbt based system? Right now I have problems with wrappers like akka-wrapper - Not even clean and compile works for them. At the end I did:

enso$ rm -rf *
enso$ git checkout -f
enso$ sbt
sbt:enso> buildEngineDistribution
sbt:enso> testOnly Nothing
sbt:enso> bench^C

However that's very tedious. Do you think there is a way to invoke all Java compilations only? Moreover just generate the .enso-sources* files, but don't perform any compilation (that might be done with a simple property check in FrgaalJavaCompiler.scala)? E.g. a command to do all Java compilations (main, test, bench, etc.) for all aggregated projects is what I am looking for.

Copy link
Member

Choose a reason for hiding this comment

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

akka-wrapper/compile does not do anything on purpose. The "correct" command to compile this project is akka-wrapper/exportedModule. The thing is that it is not possible to change the default behavior of the compile command without breaking everything else in sbt. Therefore, the new command.

But I understand your frustration in the context of this task. Generating .enso-sources* files is currently done in FrgaalJavaCompiler as part of the compile command, but it seems that it is, in fact, independent of the compilation and therefore, can be moved to a completely independent task. If you are interested in this pursuit, please, create an issue for that and assign it to me.

Copy link
Member Author

Choose a reason for hiding this comment

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

I can type sbt:enso> exportedModule - if that is the right command to force compilation even of akka-wrapper.

Copy link
Member

Choose a reason for hiding this comment

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

I am not sure that will work. buildEngineDistributionNoIndex works for sure - it invokes exportedModule for all the dependencies that are build into the built-distribution/.../component directory, including all the wrappers.

@Test
public void verifyEngineCommonSourcesFile() throws Exception {
var url = EnsoSourcesTest.class.getProtectionDomain().getCodeSource().getLocation();
var where = new File(url.toURI());
Copy link
Member Author

Choose a reason for hiding this comment

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

Massive introduction of module-info.java done in #10823 confuses our VSCode & IGV support and breaks debugging. Writing a test to ensure the input property is properly computed and similar regressions are avoided next time.

Copy link
Member Author

Choose a reason for hiding this comment

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

In addition to the test, here is a visual verification. Projects are found and there are no errors among them:

no errors in Enso projects

@JaroslavTulach JaroslavTulach changed the title Adjusting to new IGV 1.20 Fixing Enso project classpath and updating to IGV 1.20 Oct 1, 2024
@JaroslavTulach JaroslavTulach changed the title Fixing Enso project classpath and updating to IGV 1.20 Fixing Enso project classpath while updating to IGV 1.20 Oct 1, 2024
@JaroslavTulach JaroslavTulach merged commit 7f9cf7a into develop Oct 1, 2024
41 checks passed
@JaroslavTulach JaroslavTulach deleted the wip/jtulach/NewIgvIsOut branch October 1, 2024 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: No changelog needed Do not require a changelog entry for this PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants