-
Notifications
You must be signed in to change notification settings - Fork 992
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
Base directory octopus #1370
Closed
Closed
Base directory octopus #1370
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
The application data directory standards on Windows and Mac use organization names in the directory paths. On Windows, this is a path like `%AppData%\OrgName\AppName`, while on Mac it is a path like `$HOME/Library/Application Support/com.example.AppName`, using a Java-like embedding into DNS, for Mac application bundles. Namada does not provide a Mac application bundle, so the DNS embedding is unnecessary, and "heliax.com" is not the correct domain name in any case. Therefore, use an empty string for the domain qualifier. The correct organization name for Namada might be "Namada" if one were necessary, but it would be redundant with the application name. Therefore, use an empty string for the organization name. This results in paths like `%AppData\namada` for Windows and `$HOME/Library/Application Support/namada` for Mac. The Unix directory name, `$XDG_DATA_HOME/namada`, is unaffected. A useful citation follows: File System Programming Guide (for Mac): https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/FileSystemOverview/FileSystemOverview.html (see Table 1-3; note that it specifies "your app's bundle identifier or your company" but many organizations or communities, like Namada, are not companies; we can read this broadly to encompass "Namada", and it is not unheard of to use a simple application name here.)
By Mac and Windows convention, application names are upcased, while by Unix convention they are downcased. The directories crate will downcase it on Unix for us; therefore, upcase it here.
The Namada data directory contains very large blockchain databases which should not be included in a user's roaming profile. Note that, if the data directory is split in the future, files like e.g. wallets would belong in the roaming profile.
The CLI help needs to reflect the updated default data dirs.
1f6d1f4
to
8a85a37
Compare
Closed
8a85a37
to
f6a0e22
Compare
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.
…y-no-constant' and 'ray/base-directory-organizations' into main * ray/base-directory-windows-local: apps/config: use non-roaming profile on Windows * ray/base-directory-no-constant: apps/config: remove DEFAULT_BASE_DIR constant * ray/base-directory-organizations: apps/cli: update default data dirs in cli help apps/config: upcase "Namada" for data directories apps/config: use blank domain and organization
f6a0e22
to
800d275
Compare
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.
An octopus of:
Review those individually please, ignore their CI which will certainly fail. (Cancelling it now actually)