-
Notifications
You must be signed in to change notification settings - Fork 63
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
Gradlew not longer used to run dev version of lf cli tools #1988
Gradlew not longer used to run dev version of lf cli tools #1988
Conversation
We've talked about this at quite some length, and the consensus was that it was OK to have these script, but they shouldn't have the same name as the executables built for production (which Gradle places in the We resolved to just add |
Related: lf-lang/playground-lingua-franca#81 |
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.
Let's go ahead and merge this so that other problems dependent on this can be worked on.
Let's squash merge this commit because it's relatively small and most commits are small cosmetic surgery. |
It's already on the merge queue... |
else | ||
"${gradlew}" -p "${base}" "cli:${tool}:run" --args="$*" | ||
fi | ||
"${gradlew}" --quiet assemble ":cli:${tool}:assemble" |
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.
Using --quiet
is a very good idea! However, by dropping the -p
it is now not possible anymore to run lfc-dev
from an arbitrary directory. For me, this was the main reason for using the script instead of the corresponding gradle run command. I will provide a fix in another PR.
This PR fixes #1909.
Right now, we have two ways of executing
lfc
(mutatis mutandis forlfd
andlff
):build/install/lf-cli/bin/
gradlew
to invokecli:lfc:run
, which is handled by./bin/lfc
The issue is these two methods handle strings differently - specifically,
gradlew
will parse strings again. If we do not distinguish them and use them interchangeably, we will get screwed (#1909 )This PR renames the executables in
./bin
by adding a-dev
suffix to them, to distinguish them from any installed artifacts that may already be on thePATH
. In addition, the scripts have been simplified by not letting Gradle handle the invocation oflfc
,lfd
, etc. because this leads to problems like the one reported in lf-lang/playground-lingua-franca#81 because Gradle swallows exit codes.