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
Expand elixir.bat to erl.exe with arguments to workaround mix quoting bug on Windows #789
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fixes #603 See also elixir-lang/elixir#6455. `elixir.bat` in at least Elixir 1.5.1, will not properly parse a mix path with spaces in it on Windows even when the path has outer quotes. It is not possible to use inner quotes, as you can do in cmd.exe, using the JetBrains and Java libraries hat auto-matically quote, so instead bypass the bad quoting in `elixir.bat` by doing what `elixir.bat` does: call `erl.exe` with all the SDK ebin paths added with `-pa`, then `-noshell -s elixir start_cli` to run Elixir and -extra to run requires (`-r`), mix and it's task.
KronicDeth
added a commit
that referenced
this pull request
Aug 13, 2017
KronicDeth
added a commit
that referenced
this pull request
Sep 10, 2017
Elixir SDK will now have an Internal Erlang SDK, which can be supplied one of two ways: 1. If `intellij-erlang` is installed: its Erlang SDK can be used 2. Otherwise: the Erlang SDK for Elixir SDK from this plugin can be used Either Internal Erlang SDK's home path is used to locate the `erl` (or `erl.exe` on Windows) executable and it is used to run Elixir; bypassing the `elixir` (or `elixir.bat` on Windows) script. Instead, as was done in #789, the ebin directories for the Elixir SDK are passed as `-pa` options to `erl`. The Elixir SDK's configuration becomes more important: the classpath entries are now the list of `ebin` directories to pass to `erl` using `-pa` instead of scanning for ebins in the homepath, so additional code paths can be added to the Classpaths configuration and they will be used when running `mix` and `mix test`. The classpaths will be initialized to the ebin directories under the home path.
Merged
KronicDeth
added a commit
that referenced
this pull request
Sep 10, 2017
Elixir SDK will now have an Internal Erlang SDK, which can be supplied one of two ways: 1. If `intellij-erlang` is installed: its Erlang SDK can be used 2. Otherwise: the Erlang SDK for Elixir SDK from this plugin can be used Either Internal Erlang SDK's home path is used to locate the `erl` (or `erl.exe` on Windows) executable and it is used to run Elixir; bypassing the `elixir` (or `elixir.bat` on Windows) script. Instead, as was done in #789, the ebin directories for the Elixir SDK are passed as `-pa` options to `erl`. The Elixir SDK's configuration becomes more important: the classpath entries are now the list of `ebin` directories to pass to `erl` using `-pa` instead of scanning for ebins in the homepath, so additional code paths can be added to the Classpaths configuration and they will be used when running `mix` and `mix test`. The classpaths will be initialized to the ebin directories under the home path.
KronicDeth
added a commit
that referenced
this pull request
Sep 10, 2017
Elixir SDK will now have an Internal Erlang SDK, which can be supplied one of two ways: 1. If `intellij-erlang` is installed: its Erlang SDK can be used 2. Otherwise: the Erlang SDK for Elixir SDK from this plugin can be used Either Internal Erlang SDK's home path is used to locate the `erl` (or `erl.exe` on Windows) executable and it is used to run Elixir; bypassing the `elixir` (or `elixir.bat` on Windows) script. Instead, as was done in #789, the ebin directories for the Elixir SDK are passed as `-pa` options to `erl`. The Elixir SDK's configuration becomes more important: the classpath entries are now the list of `ebin` directories to pass to `erl` using `-pa` instead of scanning for ebins in the homepath, so additional code paths can be added to the Classpaths configuration and they will be used when running `mix` and `mix test`. The classpaths will be initialized to the ebin directories under the home path.
KronicDeth
added a commit
that referenced
this pull request
Sep 10, 2017
Elixir SDK will now have an Internal Erlang SDK, which can be supplied one of two ways: 1. If `intellij-erlang` is installed: its Erlang SDK can be used 2. Otherwise: the Erlang SDK for Elixir SDK from this plugin can be used Either Internal Erlang SDK's home path is used to locate the `erl` (or `erl.exe` on Windows) executable and it is used to run Elixir; bypassing the `elixir` (or `elixir.bat` on Windows) script. Instead, as was done in #789, the ebin directories for the Elixir SDK are passed as `-pa` options to `erl`. The Elixir SDK's configuration becomes more important: the classpath entries are now the list of `ebin` directories to pass to `erl` using `-pa` instead of scanning for ebins in the homepath, so additional code paths can be added to the Classpaths configuration and they will be used when running `mix` and `mix test`. The classpaths will be initialized to the ebin directories under the home path.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #603
Changelog
Enhancements
MixRunningStateUtil
and fix warnings.Bug Fixes
elixir.bat
in at least Elixir 1.5.1, will not properly parse a mix path with spaces in it on Windows even when the path has outer quotes (see elixir.bat can't use quoted mix path as argument elixir-lang/elixir#6455). It is not possible to use inner quotes, as you can do in cmd.exe, using the JetBrains and Java libraries hat auto-matically quote, so instead bypass the bad quoting inelixir.bat
by doing whatelixir.bat
does: callerl.exe
with all the SDK ebin paths added with-pa
, then-noshell -s elixir start_cli
to run Elixir and-extra
to run requires (-r
), mix and its tasks.