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
Merge the /bin/crystal Shell script in the compiler? #7391
Comments
This isn't a problem. |
This is a problem for the Windows port, or we create |
Prevents also to set |
I think we should keep |
@straight-shoota Then who sets |
For example look on Alpine,
Environments variables:
So it's definitely possible. I've pushed commits in this way. Here the CI won't run, the draft PR being closed. |
The compiler can assign that itself. It would simply use the same default as the wrapper script, which is essentially The wrapper script doesn't do anything else when used from the distribution package. |
@j8r The value for |
Or just |
Distribution packages don't have to be portable, they know absolute paths so use Presumably if you're running |
Ok, why @straight-shoota solution won't work? What prevents this logic to be in Crystal rather than in Shell, Python or Windows batch?
A wrapper doesn't look like being needed to solve this problem. |
@RX14 We could replace the
That's actually the primary job of |
What's the net benefit of doing this? |
@asterite one less (possibly useless) file to support? (minus https://github.com/crystal-lang/distribution-scripts/commits/master/linux/files/crystal-wrapper). |
Reopening because this has come up again in #10702. I think it would be feasible and a good improvement to get rid of (the need for) the wrapper script in distribution. That is, not |
The /bin/crystal script is setting environment variables, then calling the compiler.
The questions are:
.bashrc
or.zshrc
?Issues:
I think exposing
CRYSTAL_PATH=$CRYSTAL_ROOT/src:lib
, and potentially other variables, through an API that can be used byshards
and other projects (ameba?) would be a nice plus, instead of assuming the library path in each project and hard-coding it.The text was updated successfully, but these errors were encountered: