-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
introduce "repo" package to manage IPFS_DIR concerns #376
Comments
👍 Ahh great, we're on the same page. #380 (comment) |
👍 probably the level db constructor as well. that way, config, datastore, and logs all live in repo.
👍 Future work: Would be nice to also get rid of the
👍 It becomes a lot easier to manage cores with an instance-scoped repo (rather than package scoped)
👍 very useful for programmatic use-cases
👍 yup |
@briantigerchow is this ready to close? or things remaining? |
#578 closes this |
issue
Introducing
daemon --init
brokeeventlog
configuration. Here's why:daemon
without an initialized repo.configureLogger
hook checks to see whether the commandusesConfig
andusesRepo
. If both are true, the logger is configured to use the IPFS_DIR. This is necessary since the logger logs to a file.Since the daemon doesn't require a repo/config and configureLogger only runs if the upcoming command uses the config/repo, logs are not configured before running the daemon.
Notice that the one actual requirement for the hook is the existence of a config/repo.
Therefore, we should just check this property directly.
proposal
I propose we introduce a
repo
package to handle IPFS_DIR concerns. This would include the concern described in #358 (locking the repo).Initially the package would have these exported functions:
Also...
We've also discussed centralizing option precedence. ie. the logic that determines whether to use environment variables, user-provided CLI arguments, or config file values to determine the value of an option (eg. debug). This may be out of the scope of this issue.
The text was updated successfully, but these errors were encountered: