-
Notifications
You must be signed in to change notification settings - Fork 323
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
Derive --in-project from --run source location #8775
Conversation
This is exactly one of the problems the I'm not against that, but let's bear in mind we are duplicating this logic.
|
static scala.Tuple3<Boolean, File, String> findFileAndProject(String path, String projectPath) | ||
throws IOException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to be +- replicating the logic of
https://github.com/enso-org/enso/blob/develop/engine/launcher/src/main/scala/org/enso/launcher/project/ProjectManager.scala#L34-L37
"It is not possible to run a project (" | ||
+ canonicalFile | ||
+ ") in context of another " | ||
+ "project (" | ||
+ canonicalProjectFile | ||
+ "), please do not use the `--in-project` option for " | ||
+ "running projects."; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think I understand this message.
please do not use the
--in-project option for running projects
? What is this option supposed to be used for, if not exactly that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The message has been there for ages.
It is activated when the two options --run project1 --in-project project2
are combined and point to different project.
I have to admit I never understood why you claimed launcher was the primary entry point!? When I joined enso and read contributing docs I hardly ever noticed there is a note about However there always have been notes about Can you explain why you believe launcher is/should be the main entry point? |
I think that was the whole rationale for creating it, otherwise why would it even exist? It essentially had 2 purposes:
The idea was that the launcher may provide simple to use and 'smart' commands, like As for the debugging docs, I guess they were never update + they were meant more for internal use so using the internal runner was more acceptable. I'm not negating that it sometimes makes sense to use the runner as the entry point for development work, it does have some advantages. I'm a bit skeptical about essentially re-implementing the UX improvements we already had for years in the launcher, instead of just using it. |
I see. Certainly we don't want Enso users to think about the right JVM/GraalVM to use. That has to be addressed somehow and using |
That's exactly one of the things that the |
I guess that's OK. The logic doesn't seem to be in conflict and the new behavior is going to be useful for engine developers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice DevX improvement and nice tests, as always.
LGTM |
Pull Request Description
Tired of specifying
--run
as well as--in-project
paths? Let the launcher detect the project for you. According to the packaging structure there is supposed to bepackage.yaml
next tosrc
folder (which hosts.enso
source files). Let's traverse parent folders offile
specified in--run file
argument and if one of them is namedsrc
check, if there is alsopackage.yaml
sibling. If so, use it as an--in-project
argument.Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:
Scala,
Java,
style guides.