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

Add compiler path to $PATH for subcommands #15186

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

straight-shoota
Copy link
Member

Resolves #15145

@straight-shoota
Copy link
Member Author

I dropped the test code for exit_code because it was failing on Windows. It was unrelated to this change anyway. I'll investigate further and add it in a follow-up.

@bcardiff
Copy link
Member

An upside of the $CRYSTAL env variable is that if the compiler is not crystal but something else crystal-1.0, crystal-1.14, crystal-2 then the external commands still works.

I don't mind prepending to the $PATH and having a $CRYSTAL_EXEC_PATH, but I don't see how we enable binaries named differently.

$CRYSTAL is also used in shards as a convention, so I thought it was convenient to keep the same pattern. (which happens to be the same as in cabal with $CABAL)

@bcardiff
Copy link
Member

If no one thinks that supporting different names of the compiler binary is needed then 👍

@RX14
Copy link
Contributor

RX14 commented Nov 16, 2024

The interface between the compiler and extension scripts is likely to be a long-lived interface, so I think it's worth spending the time to get it working when the compiler isn't named just crystal. This PR is an improvement already, but I think using $CRYSTAL is a good thing to encourage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Propagating the target compiler to subcommands
4 participants