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

Tweak --config and --config-dir help text #2028

Closed
wants to merge 1 commit into from
Closed

Conversation

soenkehahn
Copy link
Collaborator

I thought that these options would also be used when running other subcommands, e.g. ord index. I think this PR clarifies that they're only used for ord server.

@soenkehahn
Copy link
Collaborator Author

soenkehahn commented Apr 18, 2023

@raphjaph: Will #1527 mean that the config file will also be used for other commands, e.g. ord index?

update: No, it doesn't.

@casey
Copy link
Collaborator

casey commented Apr 19, 2023

Might this be something that we just wind up undoing in the future? I.e. we start using the config file for other commands, and now the help text is out of date. I'm not opposed though, especially if it's something you found confusing.

https://www.youtube.com/watch?v=CxK_nA2iVXw

@casey casey self-requested a review April 19, 2023 19:22
Copy link
Collaborator

@casey casey left a comment

Choose a reason for hiding this comment

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

Adding review so it shows up as having changes requested.

@soenkehahn
Copy link
Collaborator Author

Might this be something that we just wind up undoing in the future? I.e. we start using the config file for other commands, and now the help text is out of date.

Very much yes. It might. But we can't predict the future and I strongly feel we should try to have the best help output for the present behavior. To put it differently: If we change the behavior of ord, of course we have to make sure that the help texts get updated.

I'm not opposed though, especially if it's something you found confusing.

Yeah, I found it very confusing. I was hoping to be able to put the --data-dir setting into the config file. I ended up looking at the code and using rust-analyzer to figure out that the config is only used for ord server.

@casey
Copy link
Collaborator

casey commented Apr 24, 2023

One issue I see is that really, the config file only supports a subset of the CLI configuration. It isn't just specific to the server, it's also specific to hiding inscriptions, since that's the only config option. So this change would make someone not look at the config file when trying to configure non-server commands, but wouldn't help someone who was trying to use the config file to configure options other than hiding things.

This makes me think that perhaps the best solution to this problem is actually just documenting which options are supported in the config file, and pointing to that documentation. That documentation (probably in the form of an example config file with all options) would then make it obvious that the only supported config option is hiding inscriptions when using the server.

@soenkehahn
Copy link
Collaborator Author

@casey: I think what you say is true and makes sense. I still think it shouldn't stop this PR from being merged. This PR does make the help texts more accurate and helpful, while not solving all problems you point out. So I would still merge this. And -- if this is a high priority -- further improve documentation of the config file in other issues and PRs.

@soenkehahn
Copy link
Collaborator Author

Closing in favor of #2044.

@soenkehahn soenkehahn closed this Apr 25, 2023
@soenkehahn soenkehahn deleted the tweak-help branch April 25, 2023 18:08
@aguinaldok4
Copy link

'sever deleted _0fd079902825c00ed761eab06ff2f5cd8c544d57#*

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