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

apps/config: remove DEFAULT_BASE_DIR constant #1367

Closed
wants to merge 1 commit into from

Conversation

juped
Copy link
Member

@juped juped commented May 13, 2023

Now that Namada defaults to platform-compliant (e.g. XDG) default data
directories, the DEFAULT_BASE_DIR constant (".namada") should no longer
exist. Remove it, using get_default_namada_folder() in places which
referenced it.

The ultimate fallback in case get_default_namada_folder() fails remains
".namada", but this is now just a string inside
get_default_namada_folder(). This will not happen except in
pathological cases where e.g. no $HOME exists; the details are in the
documentation for the directories crate.

@juped juped mentioned this pull request May 13, 2023
@juped juped force-pushed the ray/base-directory-no-constant branch from 8b5ef3f to b9c5711 Compare May 14, 2023 13:24
Now that Namada defaults to platform-compliant (e.g. XDG) default data
directories, the DEFAULT_BASE_DIR constant (".namada") should no longer
exist. Remove it, using get_default_namada_folder() in places which
referenced it.

The ultimate fallback in case get_default_namada_folder() fails remains
".namada", but this is now just a string inside
get_default_namada_folder(). This will not happen except in
pathological cases where e.g. no $HOME exists; the details are in the
documentation for the directories crate.
@juped juped force-pushed the ray/base-directory-no-constant branch from b9c5711 to 56efbf4 Compare May 14, 2023 17:48
@@ -420,7 +421,7 @@ impl Test {
.join(self.net.chain_id.as_str())
.join(utils::NET_ACCOUNTS_DIR)
.join(format!("validator-{}", index))
.join(config::DEFAULT_BASE_DIR),
.join(default_namada_folder),
Copy link
Member

@tzemanovic tzemanovic May 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't work as default_namada_folder is an absolute path and so with .join it overrides the path in full. We could probably keep using .namada for e2e tests, or perhaps better just use the "validator-{}" as a base dir

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a lot of this won't work, i just can't proceed with this yet

@juped juped marked this pull request as draft May 15, 2023 07:39
@Fraccaman
Copy link
Member

should we close this one?

@Fraccaman Fraccaman closed this Jul 6, 2023
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

Successfully merging this pull request may close these issues.

3 participants