Recommendations re beam files

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Recommendations re beam files

Donald Steven
To this point (I'm new at this) I've been keeping beam files for the
modules I need in the same directory as the main module.  This makes
sense for those modules that are closely allied to the main module and
unlikely to be used or modified for other programs. However, I have a
core set of modules that are used by all my programs.  I'd like to keep
these together and in *one* place so that they're easier to maintain. 
Also, I don't want to have multiple copies floating around.


How do I specify to the compiler where to find them?  (I use Linux.)


Thanks.


Don

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Recommendations re beam files

PAILLEAU Eric

Hi,

Move them to a project for all common things, and add a dependancy to it in all your projects.

This way you can specify which version you need.



Envoyé depuis mon mobile



---- Donald Steven a écrit ----

To this point (I'm new at this) I've been keeping beam files for the
modules I need in the same directory as the main module. This makes
sense for those modules that are closely allied to the main module and
unlikely to be used or modified for other programs. However, I have a
core set of modules that are used by all my programs. I'd like to keep
these together and in *one* place so that they're easier to maintain.
Also, I don't want to have multiple copies floating around.


How do I specify to the compiler where to find them? (I use Linux.)


Thanks.


Don

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Recommendations re beam files

Adhiyaman

Hi,

    You can set the code path using code module. This tell the ERTS where to locate your beams in case you've moved them from the default lib directory.

-Adhi

On 16-03-2019 04:44 PM, Eric Pailleau wrote:

Hi,

Move them to a project for all common things, and add a dependancy to it in all your projects.

This way you can specify which version you need.



Envoyé depuis mon mobile



---- Donald Steven a écrit ----

To this point (I'm new at this) I've been keeping beam files for the
modules I need in the same directory as the main module. This makes
sense for those modules that are closely allied to the main module and
unlikely to be used or modified for other programs. However, I have a
core set of modules that are used by all my programs. I'd like to keep
these together and in *one* place so that they're easier to maintain.
Also, I don't want to have multiple copies floating around.


How do I specify to the compiler where to find them? (I use Linux.)


Thanks.


Don

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Recommendations re beam files

Adhiyaman

Hi,

     code:add_path(DIRECTORY), adds the directory to the list of directories where ERTS would look for a beam file.

    To view the list of directories which are currently in this list, you can use :

    code:get_path().

    In addition to this, the following caution is needed :

        If there are multiple beams having the same name. The beam in the directory which occurs first in the list is loaded for execution by the ERTS.

        There are additional calls in the code module.

        Which would aid in the addition of the directory towards the beginning of the list

        code:add_patha(DIRECTORY).

        For including the directory in the end of the list use code:add_pathz(DIRECTORY).

Hope this helps you Donald, Cheers ! ..

-Adhi


On 16-03-2019 05:52 PM, Donald Steven wrote:

Thanks Adhi.  Can you please tell me how to do this; I don't understand what you mean by "... using code module".  Thx.

On 3/16/2019 7:35 AM, Adhiyaman wrote:

Hi,

    You can set the code path using code module. This tell the ERTS where to locate your beams in case you've moved them from the default lib directory.

-Adhi

On 16-03-2019 04:44 PM, Eric Pailleau wrote:

Hi,

Move them to a project for all common things, and add a dependancy to it in all your projects.

This way you can specify which version you need.



Envoyé depuis mon mobile



---- Donald Steven a écrit ----

To this point (I'm new at this) I've been keeping beam files for the
modules I need in the same directory as the main module. This makes
sense for those modules that are closely allied to the main module and
unlikely to be used or modified for other programs. However, I have a
core set of modules that are used by all my programs. I'd like to keep
these together and in *one* place so that they're easier to maintain.
Also, I don't want to have multiple copies floating around.


How do I specify to the compiler where to find them? (I use Linux.)


Thanks.


Don

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Recommendations re beam files

Adhiyaman

Hi,

     code:add_path(DIRECTORY), adds the directory to the list of directories where ERTS would look for a beam file.

    To view the list of directories which are currently in this list, you can use :

    code:get_path().

    In addition to this, the following caution is needed :

        If there are multiple beams having the same name. The beam in the directory which occurs first in the list is loaded for execution by the ERTS.

        There are additional calls in the code module.

        Which would aid in the addition of the directory towards the beginning of the list

        code:add_patha(DIRECTORY).

        For including the directory in the end of the list use code:add_pathz(DIRECTORY).

Hope this helps you Donald, Cheers ! ..

-Adhi


On 16-03-2019 05:52 PM, Donald Steven wrote:

Thanks Adhi.  Can you please tell me how to do this; I don't understand what you mean by "... using code module".  Thx.

On 3/16/2019 7:35 AM, Adhiyaman wrote:

Hi,

    You can set the code path using code module. This tell the ERTS where to locate your beams in case you've moved them from the default lib directory.

-Adhi

On 16-03-2019 04:44 PM, Eric Pailleau wrote:

Hi,

Move them to a project for all common things, and add a dependancy to it in all your projects.

This way you can specify which version you need.



Envoyé depuis mon mobile



---- Donald Steven a écrit ----

To this point (I'm new at this) I've been keeping beam files for the
modules I need in the same directory as the main module. This makes
sense for those modules that are closely allied to the main module and
unlikely to be used or modified for other programs. However, I have a
core set of modules that are used by all my programs. I'd like to keep
these together and in *one* place so that they're easier to maintain.
Also, I don't want to have multiple copies floating around.


How do I specify to the compiler where to find them? (I use Linux.)


Thanks.


Don

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions