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

Explain the differences in using shebang vs scala-cli directly in script #1740

Merged
merged 3 commits into from
Jan 9, 2023

Conversation

lwronski
Copy link
Contributor

Fixes #1309.

@lwronski lwronski added the SIP-46 All the issues related to SIP-46 to turn Scala CLI into the official scala runner command. label Jan 2, 2023
@lwronski lwronski force-pushed the shebang-doc branch 2 times, most recently from 317db67 to d88d855 Compare January 5, 2023 10:36
@lwronski lwronski marked this pull request as ready for review January 5, 2023 10:38
website/docs/commands/shebang.md Outdated Show resolved Hide resolved
website/docs/commands/shebang.md Outdated Show resolved Hide resolved
website/docs/commands/shebang.md Outdated Show resolved Hide resolved
website/docs/guides/shebang.md Outdated Show resolved Hide resolved
website/docs/guides/shebang.md Outdated Show resolved Hide resolved
website/docs/guides/shebang.md Outdated Show resolved Hide resolved
website/docs/guides/shebang.md Outdated Show resolved Hide resolved
website/docs/guides/shebang.md Outdated Show resolved Hide resolved
website/docs/guides/shebang.md Outdated Show resolved Hide resolved
website/docs/guides/shebang.md Show resolved Hide resolved
Copy link
Contributor

@Gedochao Gedochao left a comment

Choose a reason for hiding this comment

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

LGTM

@SethTisue
Copy link
Contributor

Can we do better than shebang on the name? It seems like obscure jargon to me

@Gedochao
Copy link
Contributor

Gedochao commented Jan 9, 2023

Can we do better than shebang on the name? It seems like obscure jargon to me

@SethTisue any suggestions for an alias?

I actually don't think it's that obscure of a jargon...
The current shebang sub-command has 2 main use cases:

  • to be used in the shebang header, as per the Unix standard, for which the name seems appropriate;
  • to be used from the command line with legacy syntax backwards compatible with the old scala runner.

Although I believe we'll be keeping the shebang name, as the former usecase is the main one, I think we could potentially have an alias to make it easier to guess the second one... provided that we can think of a good name for it, of course.
Would something like run-legacy do the trick? feels verbose to me...

Also, I wonder if an alias is even necessary... if a user cares about backwards compatibility in this context when migrating from the old scala runner to Scala CLI, then it's probably fair to assume he's a rare specimen of a power user. Which means he should probably be okay with obscurely named sub-commands...

We don't want to promote using shebang from the command line for regular users, they should just learn the run syntax.

@Gedochao
Copy link
Contributor

Gedochao commented Jan 9, 2023

@SethTisue I created a dedicated discussion for the shebang naming in #1755, let's continue that topic there

@lwronski lwronski requested a review from julienrf January 9, 2023 10:20
@lwronski lwronski merged commit bf8d065 into VirtusLab:main Jan 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
SIP-46 All the issues related to SIP-46 to turn Scala CLI into the official scala runner command.
Projects
None yet
4 participants