Re: [elixir-core:11666] Change request: add triple target to default mix release output folder

2024-02-27 Thread Patrick Glind
I also looked here:
https://hexdocs.pm/elixir/config-and-releases.html#releases

On Tuesday, February 27, 2024 at 1:48:37 PM UTC+1 Patrick Glind wrote:

> Hi José,
>
> I was looking for something like this, however the mix release page only 
> shows `runtime_config_path: ...`
> here:
>
> https://hexdocs.pm/mix/1.16.1/Mix.Tasks.Release.html#module-runtime-configuration
>
> and on the bottom of the page I see CLI options, which don't mention the 
> runtime_config_path, so I assumed
> I had to use the CLI --path option (which I currently do)
>
> Is there some docs I'm missing with more information about the mix.exs 
> releases configuration/options?
> - I was also looking for a way to change the default release using the 
> mix.exs file, but couldn't really find anything about that either
> in the docs.
>
> Thank you for your ongoing development of the language!
>
> On Tuesday, February 27, 2024 at 12:34:19 PM UTC+1 José Valim wrote:
>
>> Doing this now would certainly be a breaking change as it would break all 
>> usages of mix release today.
>>
>> The easiest way to go about this is to add a "path: " key to your release 
>> configuration in your mix.exs, in which you can employ any triple target 
>> that you want. :erlang.system_info(:system_architecture) may be a good 
>> starting point.
>>
>> On Tue, Feb 27, 2024 at 12:17 PM Patrick Glind  wrote:
>>
>>> Hi team,
>>>
>>> I'm developing on a Mac and deploying/running in production on Linux.
>>>
>>> Because cross compilation currently doesn't work, I've added a simple 
>>> Docker run
>>> script that does a mix release in order to create a Linux runnable 
>>> output.
>>>
>>> Currently it's not clear that this mix release is targeting Linux and 
>>> sometimes I 'mix'
>>> the releases when I want to do a quick test on the Mac (which fails to 
>>> execute)
>>> and on occasion I remove the _build folder to ensure I'm not messing up 
>>> compilation/releases.
>>>
>>> Currently I'm solving this problem by using `mix release --path ...` in 
>>> the Docker script to add /linux/ as a sub path in the _build folder and 
>>> stay clear of the Mac output.
>>>
>>> I was dabbling a little bit into Rust the other day and saw that their 
>>> `cargo build --release`
>>> when cross compiling adds the triple target in the path like so:
>>> `/target/x86_64-pc-windows-gnu/debug/`
>>>
>>> It would be handy to have a triple target folder in the path as well for 
>>> Elixir
>>> either as a default or as a mix.exs -> releases: option
>>> (I know a default would likely break things, so a releases option might 
>>> be better)
>>>
>>> Especially if Elixir ever supports cross compilation being able to 
>>> distinguish between
>>> the _build sub folders would be a benefit.
>>>
>>> Thank you for consideration
>>>
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "elixir-lang-core" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to elixir-lang-co...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/elixir-lang-core/da2cd65f-1008-45dd-b85f-26e627a3f6cbn%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/elixir-lang-core/da2cd65f-1008-45dd-b85f-26e627a3f6cbn%40googlegroups.com?utm_medium=email_source=footer>
>>> .
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elixir-lang-core+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/582ef44a-cbf6-4e49-b4bb-4a4f450519d8n%40googlegroups.com.


Re: [elixir-core:11665] Change request: add triple target to default mix release output folder

2024-02-27 Thread Patrick Glind
Hi José,

I was looking for something like this, however the mix release page only 
shows `runtime_config_path: ...`
here:
https://hexdocs.pm/mix/1.16.1/Mix.Tasks.Release.html#module-runtime-configuration

and on the bottom of the page I see CLI options, which don't mention the 
runtime_config_path, so I assumed
I had to use the CLI --path option (which I currently do)

Is there some docs I'm missing with more information about the mix.exs 
releases configuration/options?
- I was also looking for a way to change the default release using the 
mix.exs file, but couldn't really find anything about that either
in the docs.

Thank you for your ongoing development of the language!

On Tuesday, February 27, 2024 at 12:34:19 PM UTC+1 José Valim wrote:

> Doing this now would certainly be a breaking change as it would break all 
> usages of mix release today.
>
> The easiest way to go about this is to add a "path: " key to your release 
> configuration in your mix.exs, in which you can employ any triple target 
> that you want. :erlang.system_info(:system_architecture) may be a good 
> starting point.
>
> On Tue, Feb 27, 2024 at 12:17 PM Patrick Glind  wrote:
>
>> Hi team,
>>
>> I'm developing on a Mac and deploying/running in production on Linux.
>>
>> Because cross compilation currently doesn't work, I've added a simple 
>> Docker run
>> script that does a mix release in order to create a Linux runnable output.
>>
>> Currently it's not clear that this mix release is targeting Linux and 
>> sometimes I 'mix'
>> the releases when I want to do a quick test on the Mac (which fails to 
>> execute)
>> and on occasion I remove the _build folder to ensure I'm not messing up 
>> compilation/releases.
>>
>> Currently I'm solving this problem by using `mix release --path ...` in 
>> the Docker script to add /linux/ as a sub path in the _build folder and 
>> stay clear of the Mac output.
>>
>> I was dabbling a little bit into Rust the other day and saw that their 
>> `cargo build --release`
>> when cross compiling adds the triple target in the path like so:
>> `/target/x86_64-pc-windows-gnu/debug/`
>>
>> It would be handy to have a triple target folder in the path as well for 
>> Elixir
>> either as a default or as a mix.exs -> releases: option
>> (I know a default would likely break things, so a releases option might 
>> be better)
>>
>> Especially if Elixir ever supports cross compilation being able to 
>> distinguish between
>> the _build sub folders would be a benefit.
>>
>> Thank you for consideration
>>
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "elixir-lang-core" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to elixir-lang-co...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/elixir-lang-core/da2cd65f-1008-45dd-b85f-26e627a3f6cbn%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/elixir-lang-core/da2cd65f-1008-45dd-b85f-26e627a3f6cbn%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elixir-lang-core+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/f75736e3-5bf2-4ba4-8fc4-99e42e39e04fn%40googlegroups.com.


[elixir-core:11663] Change request: add triple target to default mix release output folder

2024-02-27 Thread Patrick Glind
Hi team,

I'm developing on a Mac and deploying/running in production on Linux.

Because cross compilation currently doesn't work, I've added a simple 
Docker run
script that does a mix release in order to create a Linux runnable output.

Currently it's not clear that this mix release is targeting Linux and 
sometimes I 'mix'
the releases when I want to do a quick test on the Mac (which fails to 
execute)
and on occasion I remove the _build folder to ensure I'm not messing up 
compilation/releases.

Currently I'm solving this problem by using `mix release --path ...` in the 
Docker script to add /linux/ as a sub path in the _build folder and stay 
clear of the Mac output.

I was dabbling a little bit into Rust the other day and saw that their 
`cargo build --release`
when cross compiling adds the triple target in the path like so:
`/target/x86_64-pc-windows-gnu/debug/`

It would be handy to have a triple target folder in the path as well for 
Elixir
either as a default or as a mix.exs -> releases: option
(I know a default would likely break things, so a releases option might be 
better)

Especially if Elixir ever supports cross compilation being able to 
distinguish between
the _build sub folders would be a benefit.

Thank you for consideration


-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elixir-lang-core+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/da2cd65f-1008-45dd-b85f-26e627a3f6cbn%40googlegroups.com.