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

Make the odin root directory configurable through an environment variable #913

Closed
gingerBill opened this issue Apr 25, 2021 · 7 comments
Closed

Comments

@gingerBill
Copy link
Member

Is your feature request related to a problem? Please describe.
Make the odin root directory configurable through an environment variable. Currently and by default for the proposal, it will default to the directory that the executable exists in.

Describe the solution you'd like

set ODIN_ROOT=path/to/new/root
@ThisDevDane
Copy link
Member

Shouldn't we also have an ODIN_SHARED so you can also separate the shared collection?

@gingerBill
Copy link
Member Author

shared is weird since by default it assumes it is located in ODIN_ROOT.
You can already override shared's location with -collection:shared=path/to/shared.

Why is ODIN_ROOT different? Because I need a root directory for other tools in the future, not just the core library collection.

@ThisDevDane
Copy link
Member

I know it's assumed to be in ODIN_ROOT by default, but you can make it so that is assumed if ODIN_SHARED is not set, but if it is, remove that assumption and just use the path in ODIN_SHARED.
I know you can override it on the CLI but would be annoying having to do that for everything of you wanna store shared somewhere differently. I don't see a good reason to not have ODIN_SHARED

@gingerBill
Copy link
Member Author

I am not a fan of having two way to do things. The reason for ODIN_ROOT is purely because I will be storing more in the ODIN_ROOT beyond core:, such as many executables and DLLs for external tools like odinfmt.

It might have been better to not have shared: in the first place.

@oskarnp
Copy link
Member

oskarnp commented Apr 26, 2021

It might have been better to not have shared: in the first place.
👍

gingerBill added a commit that referenced this issue Apr 26, 2021
@ghost
Copy link

ghost commented Apr 27, 2021

$ODIN_ROOT/shared < $ODIN_SHARED < -collection:shared=path
If checked in this order i think it's fine and useful. I don't want to put my shared stuff in Odin's root, and $ODIN_SHARED seems like a better alternative, since i already define a varible and call it like this for every project: -collection:shared=$ODIN_SHARED. I don't see it being an overcomplication.

@gingerBill
Copy link
Member Author

gingerBill commented May 31, 2021

Implemented in 06e0da9

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

No branches or pull requests

3 participants