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

Simplify onboarding instructions for engine & project-manager developers #7181

Merged
merged 13 commits into from
Jul 17, 2023

Conversation

JaroslavTulach
Copy link
Member

@JaroslavTulach JaroslavTulach commented Jul 1, 2023

Pull Request Description

The current instructions to build, use and debug project-manager and its engine/ls process are complicated and require a lot of symlinks to properly point to each other. This pull requests simplifies all of that by introduction of ENSO_ENGINE_PATH and ENSO_JVM_PATH environment variables. Then it hides all the complexity behind a simple sbt command: runProjectManagerDistribution --debug.

Important Notes

I decided to tackle this problem as I have three repositories with different branches of Enso and switching between them requires me to mangle the symlinks. I hope I will not need to do that anymore with the introduction of the runProjectManagerDistribution command.

Checklist

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

  • The documentation has been updated, if necessary.
  • All code follows the
    Scala,
  • All code has been tested:
    • Scenario was manually tested

@JaroslavTulach JaroslavTulach added the CI: No changelog needed Do not require a changelog entry for this PR. label Jul 1, 2023
@JaroslavTulach JaroslavTulach self-assigned this Jul 1, 2023

```bash
$ ./run ide start --wasm-profile dev --external-backend
enso$ ./run gui watch --skip-wasm-opt
Copy link
Member Author

@JaroslavTulach JaroslavTulach Jul 1, 2023

Choose a reason for hiding this comment

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

This is the command I am using the most frequently. What do others use? The original ./run ide start ...? What's the most suitable way to start the IDE for developers not primarily focused on developing the IDE? What shall we put into the documentation?

```

```yaml
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 do remember that setting all these editions, and symlinks was a pain when I was onboarding myself. I goal is to remove that from the CONTRIBUTING.md documentation altogether...


```powershell
sbt.bat buildEngineDistribution
sbt:enso> runProjectManagerDistribution --debug
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 --debug actually debugs the engine. The instructions how to debug the project manager itself are given at

An alternative would be to require an argument to the --debug option. Either engine or project-manager and based on that debug the right process in the system.

Btw. to support debugging project-manager we would need to debug the JVM version (not the native image version).

): Boolean = {
import scala.collection.JavaConverters._

val enso = distributionRoot / "bin" / "project-manager"
Copy link
Member Author

Choose a reason for hiding this comment

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

To continue the idea of the previous comment here we would need to invoke JVM with project-manager.jar. Necessary for debugging the project manager, but also useful for plain execution as building native image takes a lot of time.

)
runProjectManagerDistribution := {
buildEngineDistribution.value
buildProjectManagerDistribution.value
Copy link
Member Author

Choose a reason for hiding this comment

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

If we wanted to run the project manager in JVM mode we'd need to replace this buildProjectManagerDistribution.value with a dependency on "something" produced by #7153. Do you know what that'd be, @hubertp?

docs/CONTRIBUTING.md Outdated Show resolved Hide resolved
docs/CONTRIBUTING.md Outdated Show resolved Hide resolved
JaroslavTulach and others added 2 commits July 4, 2023 08:03
Co-authored-by: Radosław Waśko <radoslaw.wasko@enso.org>
@JaroslavTulach JaroslavTulach force-pushed the wip/jtulach/RunProjectManagerDistribution branch from 916cc78 to ce7e4e6 Compare July 4, 2023 06:06
@JaroslavTulach JaroslavTulach added the CI: Keep up to date Automatically update this PR to the latest develop. label Jul 17, 2023
@JaroslavTulach JaroslavTulach added the CI: Ready to merge This PR is eligible for automatic merge label Jul 17, 2023
@mergify mergify bot merged commit 6a6d7db into develop Jul 17, 2023
24 of 25 checks passed
@mergify mergify bot deleted the wip/jtulach/RunProjectManagerDistribution branch July 17, 2023 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: Keep up to date Automatically update this PR to the latest develop. CI: No changelog needed Do not require a changelog entry for this PR. CI: Ready to merge This PR is eligible for automatic merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants