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

fix(iroh-cli)!: Improve cli and configuration file #2532

Merged
merged 4 commits into from
Jul 25, 2024

Conversation

flub
Copy link
Contributor

@flub flub commented Jul 23, 2024

Description

The configuration file behaviour is improved:

  • Unknown fields will now cause an error rather than be silently ignored.

  • Make it possible to express GcPolicy in the TOML config file. This
    was not possible before. It was possible to disable it before, but
    it was disabled by default so that was rather moot.

The --help output is improved:

  • Update header of iroh.
  • Directly point to config file docs.
  • Use consistent style.

Breaking Changes

  • Unknown fields in the configuration file will now cause an error.

  • Configuring the GC Policy in the configuration file has changed.

Notes & open questions

Change checklist

  • Self-review.
  • Documentation updates following the style guide, if relevant.
  • Tests if relevant.
  • All breaking changes documented.

flub added 2 commits July 23, 2024 10:40
- Error on unknown fields.

- Make it possible to express GcPolicy in the TOML config file.  This
  was not possible before.
- Update header of iroh.
- Directly point to config file docs.
- Use consistent style.
flub added a commit to n0-computer/iroh.computer that referenced this pull request Jul 23, 2024
This updates the configuration docs:

- Document the config directory distinct from the data directory.

- Explain where the config file is looked for.

- Explain the configuration file format.

- Add a full example.

- Document the environment variables.

This depends on n0-computer/iroh#2532 as the
GcPolicy was not configurable before.
@matheus23
Copy link
Contributor

I'm confused by the PR title. Is it missing a feat or fix prefix?

@flub flub changed the title (iroh-cli)!: Improve cli and configuration file fix(iroh-cli)!: Improve cli and configuration file Jul 23, 2024
@flub
Copy link
Contributor Author

flub commented Jul 23, 2024

I'm confused by the PR title. Is it missing a feat or fix prefix?

lol, i forgot how to write PR titles

@flub flub requested a review from dignifiedquire July 24, 2024 09:18
@divagant-martian divagant-martian added this pull request to the merge queue Jul 25, 2024
Merged via the queue into main with commit 0fc3794 Jul 25, 2024
26 checks passed
@divagant-martian divagant-martian deleted the flub/cli-docs branch July 25, 2024 19:31
matheus23 pushed a commit that referenced this pull request Nov 14, 2024
## Description

The configuration file behaviour is improved:

- Unknown fields will now cause an error rather than be silently
ignored.

- Make it possible to express GcPolicy in the TOML config file.  This
  was not possible before.  It was possible to disable it before, but
  it was disabled by default so that was rather moot.

The --help output is improved:

- Update header of iroh.
- Directly point to config file docs.
- Use consistent style.


<!-- A summary of what this pull request achieves and a rough list of
changes. -->

## Breaking Changes

- Unknown fields in the configuration file will now cause an error.

- Configuring the GC Policy in the configuration file has changed.

<!-- Optional, if there are any breaking changes document them,
including how to migrate older code. -->

## Notes & open questions

<!-- Any notes, remarks or open questions you have to make about the -->
<!-- PR. -->

## Change checklist

- [ ] Self-review.
- [x] Documentation updates following the [style
guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text),
if relevant.
- [x] Tests if relevant.
- [x] All breaking changes documented.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants